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

feat(ci): analyses snapshot skip pr on fail label #15792

Merged
merged 15 commits into from
Jul 25, 2024

Conversation

y3rsh
Copy link
Member

@y3rsh y3rsh commented Jul 24, 2024

Overview

  • Keep making the analyses snapshot test workflow more flexible allowing a label on the PR to prevent failure PRs from opening. Adding the label no-analyses-snapshot-pr on your PR will cause the workflow to skip opening a PR for snapshot updates if the snapshot tests fail.
  • Added a step to diff the snapshots in the PR target branch against the PR branch. No action is taken based on the outcome. Purely informational. Will this information be noticed and used as a reminder to synchronize with the target branch?

Updates from feedback

  • default OPEN_PR_ON_FAILURE to false
  • as is the case currently if the analyses snapshot test fails you will see a red X on that test and you can read the logs or download and view the HTML test report.
  • if you want to open a PR into your branch that would heal the snapshots, add gen-analyses-snapshot-pr label and a PR will get opened
  • create a specific step to handle PRs for the overnight scheduled test of edge.

Risk

No risk or change to application code, CI only

@y3rsh y3rsh self-assigned this Jul 24, 2024
@y3rsh y3rsh requested a review from a team as a code owner July 24, 2024 22:11
@y3rsh
Copy link
Member Author

y3rsh commented Jul 24, 2024

Proof

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

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

Cool, thanks!

I have been thinking that this behavior should be the default. Like, we'd somehow get it so that if a snapshot test fails, you get just a normal red X in the CI section. And if you want a PR, you need to take some deliberate action, like commenting with a /slashcommand, tagging the PR with a magic tag, clicking a magic link, merging from a magic branch, or just doing it locally.

Because a recurring situation seems to be:

  1. Analysis snapshot tests start failing on edge for whatever reason
  2. 5 people branch their PRs off of edge
  3. The snapshot tests fail in those 5 people's PRs
  4. The system creates 5 snapshot PRs

(1)-(3) happen occasionally for normal tests and it's merely mildly annoying; (4) is the thing that's been uniquely noisy about snapshot tests.

Copy link
Contributor

@DerekMaggio DerekMaggio left a comment

Choose a reason for hiding this comment

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

oooh... fancy.
I do agree with Max about how noisy the snapshots are.
I like the idea of a /command on the PR

@sfoster1
Copy link
Member

Agree with @DerekMaggio and @SyntaxColoring

Also can we get the opened PR (if it does exist) to link to the pr for the branch that it's targeting, if possible? And ideally backlink to itself in the comment on that PR?

@y3rsh
Copy link
Member Author

y3rsh commented Jul 25, 2024

Addressed the comments. Went with label as it is more visible than a comment and easier to handle for this binary circumstance.

Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/Opentrons/opentrons/pull/

Copy link
Contributor

@SyntaxColoring SyntaxColoring 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!

Comment on lines 3 to 14
{
"commandType": "home",
"completedAt": "TIMESTAMP",
"createdAt": "TIMESTAMP",
"id": "UUID",
"key": "50c7ae73a4e3f7129874f39dfb514803",
"notes": [],
"params": {},
"result": {},
"startedAt": "TIMESTAMP",
"status": "succeeded"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Reminder to undo this if it was just a change for testing.

Comment on lines +111 to +113
commit-message: 'fix(analyses-snapshot-testing): heal analyses snapshots'
title: 'fix(analyses-snapshot-testing): heal ${{ env.ANALYSIS_REF }} snapshots'
body: 'This PR was requested on the PR https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice.

Copy link
Contributor

github-actions bot commented Jul 25, 2024

A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/Opentrons/opentrons/pull/

fixed this issue where the pr number was not being added to the URL correctly

@y3rsh y3rsh added the gen-analyses-snapshot-pr Generate a healing PR if the analyses snapshot test fails label Jul 25, 2024
Copy link
Contributor

github-actions bot commented Jul 25, 2024

A PR has been opened to address analyses snapshot changes. Please review the changes here: #15803


The above was on purpose to see the PR was opened with a link correctly after adding the tag.

@y3rsh y3rsh removed the gen-analyses-snapshot-pr Generate a healing PR if the analyses snapshot test fails label Jul 25, 2024
@y3rsh y3rsh merged commit eaf9657 into edge Jul 25, 2024
6 checks passed
@y3rsh y3rsh deleted the analyses-snapshots-more-options branch July 25, 2024 22:17
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.

4 participants