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

Regression tests: require manual approval for certified connectors #41627

Merged
merged 7 commits into from
Jul 11, 2024

Conversation

clnoll
Copy link
Contributor

@clnoll clnoll commented Jul 11, 2024

What

Modifies the CI pipeline for certified connectors so that a manual regression test approval is required.

How

  • Updates airbyte-ci to add a status check for manual regression test approval if any of the connectors changed in the PR are certified. This status check will initially be in a failing state.
  • Adds a /-command, approve-regression-tests, that will update the status check to succeed.

Developer impact

When a PR is opened that has changes to one or more certified connector, the developer will see a failing status check in the list of CI checks.

Once regression tests have been run and the reviewer has approved them, they can add an /approve-regression-tests slash-command as a comment in the PR, and the status check will succeed.

@clnoll clnoll requested a review from alafanechere July 11, 2024 13:27
Copy link

vercel bot commented Jul 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2024 4:17pm

@clnoll clnoll force-pushed the catherine/require-regression-tests branch 2 times, most recently from a3f9ccd to 49b1f29 Compare July 11, 2024 13:33
Copy link
Contributor

@alafanechere alafanechere left a comment

Choose a reason for hiding this comment

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

Approving as the logic LGTM.
Please consider cleaning up the approve-regression-tests-command.yml, I spotted a couple of extra steps / env vars that are not required for what you want to do.
In any case feel free to merge, test the workflow once on master and tweak it on a new PR, it's very hard to merge an error free new workflow as we can't test them until they're on master.

@@ -124,6 +125,17 @@ async def test(

if ctx.obj["selected_connectors_with_modified_files"]:
update_global_commit_status_check_for_tests(ctx.obj, "pending")
if any([connector.support_level == "certified" for connector in ctx.obj["selected_connectors"]]):
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be worth adding a comment about why we're emitting this status check even if the pipeline is not running regression tests. (It could be added the hacks.py)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -27,6 +27,7 @@ jobs:
test-performance
publish-java-cdk
connector-performance
approve-regression-tests
Copy link
Contributor

Choose a reason for hiding this comment

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

I always find difficult to understand slash commands as these commands must match <workflow-name>-command ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes that wasn't obvious to me either.

Comment on lines 26 to 29
concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.pr }}
# Cancel any previous runs on the same branch if they are still in progress
cancel-in-progress: true
Copy link
Contributor

Choose a reason for hiding this comment

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

💅 This block could be superfluous right? We don't really care about concurrency if I'm not mistaken.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes that's probably true. Removed.

.github/workflows/approve-regression-tests-command.yml Outdated Show resolved Hide resolved
.github/workflows/approve-regression-tests-command.yml Outdated Show resolved Hide resolved
Comment on lines +38 to +36
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This env var is not used if I'm not mistaken

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is required to us the gh cli.

Comment on lines 77 to 78
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This env var is not used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 removed.

.github/workflows/approve-regression-tests-command.yml Outdated Show resolved Hide resolved
@clnoll clnoll force-pushed the catherine/require-regression-tests branch from 7b39f97 to 1df7172 Compare July 11, 2024 15:42
@clnoll clnoll force-pushed the catherine/require-regression-tests branch from 1df7172 to 754e581 Compare July 11, 2024 15:53
@clnoll clnoll merged commit fdf3764 into master Jul 11, 2024
32 checks passed
@clnoll clnoll deleted the catherine/require-regression-tests branch July 11, 2024 16:45
xiaohansong pushed a commit that referenced this pull request Jul 12, 2024
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.

2 participants