Skip to content

Conversation

@JenniferMah
Copy link
Contributor

Jira: DI-1972

uses: actions/checkout@v2

- name: Updating semver dependencies
run: make update-deps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why run these step again instead of adding the Add & Commit step to the end of the "update-dependencies-and-test" job?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I separated the commit into a separate job because the update-dependencies-and-test runs on the java 8 and 11. If the commit is included in the update-dependencies-and-test job tries to commit the changes to the pom file twice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just add an if: condition to the step? Like we do for sonarcloud scanning in twilio (https://github.com/twilio/twilio-python/blob/main/.github/workflows/test-and-deploy.yml#L43)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is what if 8 and 17 pass but 11 fails tests for some non-transient issue. Then 17 would commit the change (assuming the if is for 17) but the tests would be failing for 11.

May be able to limit job concurrency so only 1 job can run at a time: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency

Note that the order of the matrix would then be crucial as we'd only want to commit on the last matrix value.

The order that you define a matrix matters. The first option you define will be the first job that runs in your workflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up using max-parallel to force the matrix to run 1 version at a time. After a the first language version successfully passes the next language version job runs.

@JenniferMah JenniferMah merged commit 1ca4a08 into main Feb 24, 2022
@JenniferMah JenniferMah deleted the DI-1972 branch February 24, 2022 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants