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-connector-ops: declare review requirements on source connectors changes #20303
ci-connector-ops: declare review requirements on source connectors changes #20303
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it will be super helpful! Might be worth sharing this action and how you implemented it (Loom?) to other teams who may be unsatisfied with how static codeowners is
requirements_file_content = [{ | ||
"name": "Required reviewers from the connector org teams", | ||
"paths": "unmatched", | ||
"teams": mandatory_reviewers | ||
}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool idea to generate this on each run!
if isinstance(mandatory_reviewer, dict): | ||
teams += mandatory_reviewer["any-of"] | ||
else: | ||
teams.append(mandatory_reviewer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing the any-of
check here feels a little un-DRY, since you also manually add any-of
in find_mandatory_reviewers
-- maybe you could put this logic of adding the any-of into a helper method you call in find_mandatory_reviewers
?
if: steps.write-review-requirements-file.outputs.REVIEW_REQUIREMENTS_FILE != '' | ||
uses: Automattic/action-required-review@v3 | ||
with: | ||
status: ${{ steps.get-mandatory-reviewers.outputs.MANDATORY_REVIEWERS }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, generating and outputting this separately is a requirement of the github action, right? We can't generate that into connector_org_review_requirements.yaml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, I added the MANDATORY_REVIEWERS
to conveniently display a detailed status like A review is required from teams: A, B, C
instead of the default Review required
status. But all the essential information is captured in the REVIEW_REQUIREMENTS_FILE
whose format is defined by the external action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I figured. Strange that you can't configure different status messages for the different sets of requirements in the action 😄
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>
This makes sense at a high-level to me. Adding @lazebnyi as a reviewer to make sure that GL is plugged into this conversation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a comment and that triggered a failing check!
https://github.com/airbytehq/airbyte/actions/runs/3680412195
[Invalid workflow file: .github/workflows/connector_ops_ci.yml#L49](https://github.com/airbytehq/airbyte/actions/runs/3680412195/workflow)
The workflow is not valid. .github/workflows/connector_ops_ci.yml (Line: 49, Col: 13): Unexpected symbol: '""'. Located at position 74 within expression: steps.write-review-requirements-file.outputs.REVIEW_REQUIREMENTS_FILE != ""
@evantahler, there was a glitch in the boolean check to conditionally run the final action. I fixed it in e7202ff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 assuming I don't get another failing comment :D
What
Closes #20304
This GitHub action can help us check if a set of teams gave a review on a PR by creating a "review requirements" file.
I made a new command in
ci-connector-ops
to write this file according to the current changes in the branch.I changed the
connector_ops_ci.yml
workflow to:write-review-requirements-file
command to write the requirements file. This file structure is defined by theAutomattic/action-required-review@v3
actionAutomattic/action-required-review@v3
if this file was written.When the requirements are not met, a status check as this one will appear:
The new following review requirements rules:
gl-python
team is requiredacceptance-test-config.yml
: a review fromconnector-operations
teams is requiredacceptance-test-config.yml
: a review fromconnector-operations
orconnector-extensibility
is required.Suggested review order:
ci_connector_ops
python packageairbyte/tools/ci_connector_ops/ci_connector_ops/sat_config_checks.py
Line 76 in 9da4887
get_changed_acceptance_test_config
to track changes onacceptance-test-config.yml
:airbyte/tools/ci_connector_ops/ci_connector_ops/utils.py
Line 55 in 9da4887
airbyte/tools/ci_connector_ops/tests/test_sat_config_checks.py
Line 90 in 9da4887
connector_ops_ci.yml
GitHub action workflowcheck-review-requirements
jobairbyte/.github/workflows/connector_ops_ci.yml
Line 25 in 45d990a