Skip to content
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

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

JimSuplizio
Copy link
Member

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.

@JimSuplizio JimSuplizio added the GitHub Event Processor Anything related to the GitHub Event Processor label Mar 8, 2024
@JimSuplizio JimSuplizio self-assigned this Mar 8, 2024
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

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>
@JimSuplizio JimSuplizio enabled auto-merge (squash) March 8, 2024 19:13
@JimSuplizio JimSuplizio merged commit 168f10d into Azure:main Mar 8, 2024
7 checks passed
@JimSuplizio JimSuplizio deleted the SeparateJobForAzureCLI branch March 8, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GitHub Event Processor Anything related to the GitHub Event Processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants