Skip to content

Create a separate job for events requiring Az CLI#7845

Merged
JimSuplizio merged 2 commits intoAzure:mainfrom
JimSuplizio:SeparateJobForAzureCLI
Mar 8, 2024
Merged

Create a separate job for events requiring Az CLI#7845
JimSuplizio merged 2 commits intoAzure:mainfrom
JimSuplizio:SeparateJobForAzureCLI

Conversation

@JimSuplizio
Copy link
Copy Markdown
Contributor

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, commonly known as JimBot label Mar 8, 2024
@JimSuplizio JimSuplizio self-assigned this Mar 8, 2024
@azure-sdk
Copy link
Copy Markdown
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

Comment thread .github/workflows/event-processor.yml Outdated
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
@azure-sdk
Copy link
Copy Markdown
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
@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, commonly known as JimBot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants