Create a separate job for events requiring Az CLI#7845
Merged
JimSuplizio merged 2 commits intoAzure:mainfrom Mar 8, 2024
Merged
Create a separate job for events requiring Az CLI#7845JimSuplizio merged 2 commits intoAzure:mainfrom
JimSuplizio merged 2 commits intoAzure:mainfrom
Conversation
Collaborator
|
The following pipelines have been queued for testing: |
jsquire
approved these changes
Mar 8, 2024
weshaggard
reviewed
Mar 8, 2024
weshaggard
approved these changes
Mar 8, 2024
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Collaborator
|
The following pipelines have been queued for testing: |
This was referenced Mar 8, 2024
Merged
Merged
Merged
Merged
Merged
Merged
Merged
JimSuplizio
added a commit
to Azure/azure-sdk-for-js
that referenced
this pull request
Mar 8, 2024
…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 <jasupliz@microsoft.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.