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

[CI] Never skip required matrix-rollup jobs #12296

Merged
merged 3 commits into from
Jul 13, 2022

Conversation

djaglowski
Copy link
Member

@djaglowski djaglowski commented Jul 11, 2022

Resolves #12334

The solution here works as follows:

The Matrix Job

  • An output value is defined for each of the matrix jobs. By default, this value is empty.
  • If a job does not succeed (failed, cancelled, or skipped) its output value is set to a non-empty value.

The Rollup Job

  • Always runs.
  • Concatenates all of the output values from the corresponding matrix jobs.
  • If all of the output values are empty (all jobs passed), the concatenated value is empty as well.
  • Success or failure of the rollup job is determined by evaluating whether the concatenated value is empty or not.

@djaglowski djaglowski added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jul 11, 2022
@djaglowski
Copy link
Member Author

With the intentional failures introduced by the last change, the appropriate rollup jobs have all failed:
image
image

Links to failure messages:

@djaglowski
Copy link
Member Author

With the intentional failures removed, everything passes as expected.

Direct links to rollup job validation steps:

@djaglowski djaglowski marked this pull request as ready for review July 12, 2022 17:41
@djaglowski djaglowski requested a review from a team as a code owner July 12, 2022 17:41
@mx-psi
Copy link
Member

mx-psi commented Jul 13, 2022

Thank you for having a look Dan!

@mx-psi mx-psi merged commit a95ae4a into open-telemetry:main Jul 13, 2022
@mx-psi
Copy link
Member

mx-psi commented Jul 13, 2022

Looks like the rollup job can fail even if all jobs have passed https://github.com/open-telemetry/opentelemetry-collector-contrib/runs/7318709078?check_suite_focus=true

@mx-psi
Copy link
Member

mx-psi commented Jul 13, 2022

Revert PR: #12353, will wait in case there is an easy solution

@mx-psi
Copy link
Member

mx-psi commented Jul 13, 2022

It sounds like the issue only happens if you re-run failed jobs

@djaglowski
Copy link
Member Author

Thanks @mx-psi. I think I have an idea for how to address this but I'll merge the reversion to ensure it's not blocking anyone while I test it.

djaglowski pushed a commit that referenced this pull request Jul 13, 2022
Revert "[CI] Never skip required matrix-rollup jobs (#12296)"

This reverts commit a95ae4a.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[github-actions] Required check is skipped if prerequisite job fails
3 participants