-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending the Azure DevOps Agent scaling - possibility to "ignore" demands #5579
Extending the Azure DevOps Agent scaling - possibility to "ignore" demands #5579
Comments
…ccept demands but not require them for scaling (kedacore#5579)
…ccept demands but not require them for scaling (kedacore#5579) Signed-off-by: jan-mrm <[email protected]>
hey, any discussion or feedback on this? 🙂 |
I missed this issue, sorry for that :( |
IT looks fine to me, there is an existing function that already strips the agent version from the demand array so that could be extended. Although I would suggest looking at the parent matching system rather than the demand matching system as although that is more complex to initially set up that passes the scaling problem back to ADO to handle the agent matching paradigms so that keda doesn't have to do it. |
is the parent approach worth it for your use case @jan-mrm ? |
@JorTurFer I have looked at it a while ago but I didn't really understand how to use it I guess. I can take another look at it |
If you are struggling reach out and I can help. If the documentation is insufficient I probably need to improve it :) |
I'm also facing this. Random azure pipeline tasks like CMake adds "invisible" demands to a job, release pipelines also has demands that's added based on what tasks are being used that can't be removed. A workaround for this would be to not use the
I don't think the suggestion of adding a In my opinion, this could be solved in a few ways:
Example using approve list:
So even if "CMake" is part of the demands, it will not be considered. The downside of this is that all definitions need to know about all the demands, but that could be easily automated using helm. Edit: If possible, making the |
I see your point. If there are new demands, which are added by task, encountered, then the list would need to be updated. Not sure how often that happens and for my use case I'd think that's okay. Also since you would make sure that the self-hosted agent actually fulfils the demand. How many are known to you at this point, besides cmake?
I think I do not fully understand your Just another idea: Add a flag like That would not need any lists to be updated or demands to be known. What do you think about that? Edit: Or a change of the requireAllDemands behavior to allow additional demands in general (without a new flag), but that would mean a behavior change of a current feature. |
As I mentioned in my edit, the The main issue now, is that
What we need is a flag that conveys "require at least all specified demands, ignore anything else", but coming up with a user friendly name for it seems difficult.
|
Alright, kind of got it.
Yes that is true. Having to set both flags seems ugly and also the allowAdditionalDemands would seem to have no effect when not also setting requireAllDemands.
So just so sum up the idea: Is that right? How should we handle setting both flags to true since they conflict? |
Because I opened a draft PR just to get the ball rolling on this. |
maybe @JorTurFer and/or @Eldarrin have feedback to this idea Nohac an I discussed (see draft PR of Nohac): |
I think that the approach proposed by @Nohac of having different "matching" rules can bring a lot of flexibility. @tomkerkhove @Eldarrin ? |
I feel like this is a relatively low risk feature to add, and shouldn't need to much consideration apart from the naming. If my changes looks OK and we can agree on the name, I will publish the PR I made and open a PR to update the docs as well. |
Ping @tomkerkhove @Eldarrin ? |
PR looks fine to me, its non breaking :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
so we just need to agree on a name (in the already opened draft pr) and update the docs? What about the currently proposed name 'requireAllDemandsAndIgnoreOthers'? I feel like it does match the functionality. Feels a bit clunky too but yea |
I'm sorry about the delay, the PR should be ready now. Let's just keep the name as is. It's definitely a bit clunky, but at the same time also the most descriptive name. |
Proposal
I would like the possibility within the
azure-pipelines
trigger of aScaledObject
andScaledJob
to differentiate between demands which are required for scaling up and demands which are ignore/accepted but not important for actually triggering the scaling.Idea:
This is because we are not fully in control of the demands which are requested by an Azure DevOps pipeline. Demands can be defined in the pipeline definition. But demands are also just added automatically when using certain tasks.
Use-Case
We currently use Keda to scale our Azure DevOps agents using the
azure-pipelines
trigger, with the following setup:cap-4gb
andcap-8gb
.requireAllDemands: false
for the 4GB agent, so that it would be the default, since a pipeline job with no demands at all will trigger this agent (and it is also triggered when a pipeline has the demandcap-4gb
).requireAllDemands: true
for the 8GB agent, because we want to avoid scaling both agents when a pipeline job with no demands is issuedThis worked out for us until we investigated a scaling issue where a job with demand
cap-8gb
would not trigger Keda to scale. It turned out the pipeline job uses a Npm@1 task which as stated at the bottom underRequirements
will add the demandnpm
to the pipeline just through using that task.This does conflict with
requireAllDemands: true
since it checks for the exact match (in this case the job will have demandscap-8gb
andnpm
).Is this a feature you are interested in implementing yourself?
Yes
Anything else?
Quick fixes are
cap-8gb,npm
andrequireAllDemands: true
npm
Both solutions work for now, but I'm not sure if there are more pipeline task that add demands because the possibilities that would be needed to be covered by trigger combinations would grow fast.
Would love some feedback about how you feel about adding something like
demandsToIgnore
.The text was updated successfully, but these errors were encountered: