-
Notifications
You must be signed in to change notification settings - Fork 183
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
Create a separate job for events requiring Az CLI #7845
Conversation
The following pipelines have been queued for testing: |
Co-authored-by: Wes Haggard <[email protected]>
The following pipelines have been queued for testing: |
…8842) Sync .github/workflows directory with azure-sdk-tools for PR Azure/azure-sdk-tools#7845 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: James Suplizio <[email protected]> Co-authored-by: Wes Haggard <[email protected]>
There were recent changes to the azure/login@v1 step that inject pre/post Az CLI commands. The pre Az CLI command, more often than not, costs more in terms of time than it does to install the event processor and process the action. The injected commands do not honor the conditionals around the step, meaning that every action would pay this price regardless not just the issues opened which is the only command that needs the Az CLI to get the Label Service key.
The solution was to create two jobs with conditions around each job. The first job will only run for issues opened, the second job will run for all the other events. The only difference between the two are the Az CLI usage, everything else is the same. This does mean that there are two jobs for each Action but one job is always skipped due to the conditions and this doesn't cause any inflation of the Action run time.
Here's an example of an Action processing and issues opened event. Notice that it has all of the Az CLI steps.
Here's an example of an Action processing anything other than issues opened. Notice there are no Az CLI steps.