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

require extra review for breaking change messages #31361

Merged
merged 15 commits into from
Oct 16, 2023

Conversation

pedroslopez
Copy link
Contributor

@pedroslopez pedroslopez commented Oct 12, 2023

What

We want to add Kat as a required reviewer when breaking change releases are made. This adds some logic to our existing checks to do so.

This also sets request-reviewers: true on our action so reviews are automatically requested when required.

Close #31141

How

  • Created new group, breaking-change-reviewers of which Kat is the only member currently to make a bit more flexible if we do want to change who gets notified or add more people.
  • Refactor mandatory reviewer logic to support multiple required review groups at a time, rather than just requesting the first group.
  • Add a method to get diff from connector metadata, + refactor the current method to get acceptance test config changes to use a common method.
    • Since it's not just acceptance test config changes that cause required reviewers, also moved out some code from acceptance_test_config_checks to required-reviewer_checks

@vercel
Copy link

vercel bot commented Oct 12, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2023 11:20pm

Copy link
Contributor Author

pedroslopez commented Oct 12, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@pedroslopez pedroslopez force-pushed the pedro/required-breaking-change-reviewers branch 2 times, most recently from f0af9c2 to 6a1780d Compare October 13, 2023 23:40
@@ -39,4 +39,5 @@ jobs:
with:
status: ${{ steps.get-mandatory-reviewers.outputs.MANDATORY_REVIEWERS }}
token: ${{ secrets.OCTAVIA_4_ROOT_ACCESS }}
request-reviews: true
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 action now supports auto requesting reviews! Specially since the check isn't required, I think it's important to add else reviews can be missed

@@ -13,6 +13,7 @@
TEST_STRICTNESS_LEVEL_REVIEWERS = {"connector-operations"}
GA_BYPASS_REASON_REVIEWERS = {"connector-operations"}
GA_CONNECTOR_REVIEWERS = {"gl-python"}
BREAKING_CHANGE_REVIEWERS = {"breaking-change-reviewers"}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

new group - atm kat is the only member but can add as needed

Comment on lines 71 to 82
if backward_compatibility_changes:
return [{"any-of": list(BACKWARD_COMPATIBILITY_REVIEWERS)}]
required_reviewers.append({"name": "Backwards Compatibility Test Skip", "teams": list(BACKWARD_COMPATIBILITY_REVIEWERS)})
if test_strictness_level_changes:
return [{"any-of": list(TEST_STRICTNESS_LEVEL_REVIEWERS)}]
required_reviewers.append({"name": "Acceptance Test Strictness Level", "teams": list(TEST_STRICTNESS_LEVEL_REVIEWERS)})
if ga_bypass_reason_changes:
return [{"any-of": list(GA_BYPASS_REASON_REVIEWERS)}]
required_reviewers.append({"name": "GA Acceptance Test Bypass", "teams": list(GA_BYPASS_REASON_REVIEWERS)})
if important_connector_changes:
return list(GA_CONNECTOR_REVIEWERS)
return []
required_reviewers.append({"name": "GA Connectors", "teams": list(GA_CONNECTOR_REVIEWERS)})
if breaking_change_changes:
required_reviewers.append({"name": "Breaking Changes", "teams": list(BREAKING_CHANGE_REVIEWERS)})

return required_reviewers
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 used to have early returns, which meant cases where multiple requirements are involved didn't work. Instead, we're adding multiple requirement groups that all have to pass. The contents of this dict is based on the format laid out in https://github.com/Automattic/action-required-review#requirements-format

As seen in the example, they list out multiple review groups that each have a name and team list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved all required reviewer-related stuff here since it was no longer just for acceptance test config

@pedroslopez pedroslopez force-pushed the pedro/required-breaking-change-reviewers branch from a4fe92a to 102c25c Compare October 14, 2023 00:55
@pedroslopez pedroslopez marked this pull request as ready for review October 14, 2023 00:57
@pedroslopez pedroslopez requested review from alafanechere and a team October 14, 2023 01:03
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.

Super cool!

@@ -30,7 +30,7 @@ freezegun = "^1.1.0"

[tool.poetry.scripts]
Copy link
Contributor

Choose a reason for hiding this comment

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

please bump the package version 🙏

@@ -38,43 +31,6 @@ def find_connectors_with_bad_strictness_level() -> List[utils.Connector]:
return connectors_with_bad_strictness_level


def find_changed_important_connectors() -> Set[utils.Connector]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for moving it to a separate module!

Comment on lines 47 to 56
if backward_compatibility_changes:
required_reviewers.append({"name": "Backwards Compatibility Test Skip", "teams": list(BACKWARD_COMPATIBILITY_REVIEWERS)})
if test_strictness_level_changes:
required_reviewers.append({"name": "Acceptance Test Strictness Level", "teams": list(TEST_STRICTNESS_LEVEL_REVIEWERS)})
if ga_bypass_reason_changes:
required_reviewers.append({"name": "GA Acceptance Test Bypass", "teams": list(GA_BYPASS_REASON_REVIEWERS)})
if important_connector_changes:
required_reviewers.append({"name": "GA Connectors", "teams": list(GA_CONNECTOR_REVIEWERS)})
if breaking_change_changes:
required_reviewers.append({"name": "Breaking Changes", "teams": list(BREAKING_CHANGE_REVIEWERS)})
Copy link
Contributor

Choose a reason for hiding this comment

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

a mapping between change detection function and mandatory reviewers can be more readable

@pedroslopez pedroslopez force-pushed the pedro/required-breaking-change-reviewers branch from 102c25c to 4f384c4 Compare October 16, 2023 20:03
@pedroslopez pedroslopez changed the base branch from master to pedro/fix_airbyte_ci_tests October 16, 2023 22:42
@pedroslopez pedroslopez force-pushed the pedro/required-breaking-change-reviewers branch from bd156dd to af68e13 Compare October 16, 2023 22:42
@pedroslopez pedroslopez force-pushed the pedro/fix_airbyte_ci_tests branch from 74b02f1 to 6e0c579 Compare October 16, 2023 22:44
@pedroslopez pedroslopez force-pushed the pedro/required-breaking-change-reviewers branch from af68e13 to 22205a5 Compare October 16, 2023 22:44
Base automatically changed from pedro/fix_airbyte_ci_tests to master October 16, 2023 23:19
Copy link
Contributor Author

pedroslopez commented Oct 16, 2023

Merge activity

  • Oct 16, 7:20 PM: Graphite rebased this pull request as part of a merge.
  • Oct 16, 7:32 PM: @pedroslopez merged this pull request with Graphite.

@pedroslopez pedroslopez force-pushed the pedro/required-breaking-change-reviewers branch from 22205a5 to c95b2ae Compare October 16, 2023 23:20
@pedroslopez pedroslopez merged commit c207a7f into master Oct 16, 2023
14 checks passed
@pedroslopez pedroslopez deleted the pedro/required-breaking-change-reviewers branch October 16, 2023 23:32
ariesgun pushed a commit to ariesgun/airbyte that referenced this pull request Oct 23, 2023
<!--
Thanks for your contribution! 
Before you submit the pull request, 
I'd like to kindly remind you to take a moment and read through our guidelines
to ensure that your contribution aligns with the type of contributions our project accepts.
All the information you need can be found here:
   https://docs.airbyte.com/contributing-to-airbyte/

We truly appreciate your interest in contributing to Airbyte,
and we're excited to see what you have to offer! 

If you have any questions or need any assistance, feel free to reach out in #contributions Slack channel.
-->

## What

We want to add Kat as a required reviewer when breaking change releases are made. This adds some logic to our existing checks to do so.

This also sets `request-reviewers: true` on our action so reviews are automatically requested when required.

Close airbytehq#31141

## How

- Created new group, `breaking-change-reviewers` of which Kat is the only member currently to make a bit more flexible if we do want to change who gets notified or add more people.
- Refactor mandatory reviewer logic to support multiple required review groups at a time, rather than just requesting the first group.
- Add a method to get diff from connector metadata, + refactor the current method to get acceptance test config changes to use a common method.
    - Since it's not just acceptance test config changes that cause required reviewers, also moved out some code from `acceptance_test_config_checks` to `required-reviewer_checks`
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.

Add Kat to required reviewers on breaking changes
2 participants