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

Do full run of "Arduino IDE" workflow on tag push #2177

Merged
merged 1 commit into from
Aug 20, 2023

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 19, 2023

Motivation

The project was recently switched to using a "trunk-based" development strategy (#2120). This necessitated some adjustments to the configuration of the GitHub Actions workflows in order to ensure the CI system could be used to effectively validate the project at the state staged for release in the release branch.

A run-determination job was added to the workflow. This job determines whether the conditions under which the workflow was triggered indicate that the rest of the jobs in the workflow should be run.

A validation workflow should run fully under any of the following conditions:

Since the project is fully validated prior to a release, running the workflow when triggered by a release tag is pointless (and even harmful in some specific standardized workflows not currently used in this repository), so (even if for no other reason than efficiency) verification workflows are configured to not run under these conditions.

The standardized Arduino tooling project workflows follow a modular design where each workflow has a narrow scope of purpose. That path was not taken by those who set up the infrastructure for this repository. They instead created a single massive monolithic "Arduino IDE" workflow that performs many unrelated operations under various conditions. This workflow generates releases in addition to doing validation. Even though it is pointless to run the workflow's validation operations when the workflow is triggered by a release tag, it is essential to run it for the release generation.

Previously, the code used in the "Arduino IDE" workflow's run-determination job was configured as appropriate for a verification workflow. This meant that a release would not be generated on push of a release tag as intended.

Change description

The bug is fixed by adjusting the code to do a full run of the workflow when triggered by a release tag.

Other information

Release made in my fork to demonstrate the functionality of the workflow with the proposed changes:

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

@per1234 per1234 added topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project labels Aug 19, 2023
@per1234 per1234 requested a review from kittaakos August 19, 2023 09:10
@per1234 per1234 self-assigned this Aug 19, 2023
@per1234
Copy link
Contributor Author

per1234 commented Aug 19, 2023

I see the "Arduino IDE" workflow run for this PR failed due to a test failure:

https://github.com/arduino/arduino-ide/actions/runs/5910586435/job/16032331224#step:7:1016

This test failure also occurs on the main branch:

https://github.com/arduino/arduino-ide/actions/runs/5909092994/job/16029290009#step:7:1016

So it is unrelated to the changes proposed in this pull request.

The project was recently switched to using a "trunk-based" development strategy. This necessitated some adjustments to
the configuration of the GitHub Actions workflows in order to ensure the CI system could be used to effectively validate
the project at the state staged for release in the release branch.

A `run-determination` job was added to the workflow. This job determines whether the conditions under which the workflow
was triggered indicate that the rest of the jobs in the workflow should be run.

A validation workflow should run fully under any of the following conditions:

- The trigger event was something other than a branch creation
- The trigger event was a release branch creation

Since the project is fully validated prior to a release, running the workflow when triggered by a release tag is
pointless (and even harmful in some specific standardized workflows not currently used in this repository), so (even if
for no other reason than efficiency) verification workflows are configured to not run under these conditions.

The standardized Arduino tooling workflows follow a modular design where each workflow has a narrow scope of purpose.
That path was not taken by those who set up the infrastructure for this repository. They instead created a single
massive monolithic "Arduino IDE" workflow that performs many unrelated operations under various conditions. This workflow generates
releases in addition to doing validation. Even though it is pointless to run the workflow's validation operations when
the workflow is triggered by a release tag, it is essential to run it for the release generation.

Previously, the code used in the "Arduino IDE" workflow's `run-determination` job was configured as appropriate for a
verification workflow. This meant that a release would not be generated on push of a release tag as intended. The bug is
fixed by adjusting the code to do a full run of the workflow when triggered by a release tag.
Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

Thank you, Per!

@per1234 per1234 merged commit ea91904 into arduino:main Aug 20, 2023
15 checks passed
@per1234 per1234 deleted the build-run-determination branch August 20, 2023 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants