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

Setup CODEOWNERS #1669

Merged
merged 9 commits into from
Dec 6, 2024
Merged

Setup CODEOWNERS #1669

merged 9 commits into from
Dec 6, 2024

Conversation

chmeliik
Copy link
Contributor

CODEOWNERS will allow us to make the ownership of individual tasks
actually mean something.

We will have to give every owner write permissions, but we will be able
to set up branch protection rules to block PRs from getting merged if
they don't have approvals from the owners.

This will allow the CODEOWNERS of tasks and stepactions to fully
self-service their PRs without giving them the ability to mess with
other parts of the repository.

@chmeliik
Copy link
Contributor Author

TODO before this could be merged:

  • Invite everyone in the CODEOWNERS file to konflux-ci and give them write permissions for this repo
  • Address mismatches between the github teams and the teams defined in OWNERS_ALIASES
#!/bin/bash
set -o errexit -o nounset -o pipefail

export owners_alias=$1
gh_team=$2

owners=$(yq < OWNERS_ALIASES '.aliases[strenv(owners_alias)][]' | sort -u)
members=$(gh api orgs/konflux-ci/teams/"$gh_team"/members --jq '.[].login' | sort)

diff --color <(echo "$owners") <(echo "$members")
./compare-members.sh integration-team integration-service-maintainers
1a2
> chipspeak
4a6
> jencull

./compare-members.sh ec-team ec                                      
1d0
< cuipinghuo
4d2
< robnester-rh

And the build-maintainers GH team is not a good match for the build-team from OWNERS_ALIASES at all, TBD

@chmeliik
Copy link
Contributor Author

chmeliik commented Dec 2, 2024

Changed the CODEOWNERS based on #1658

Addressed the OWNERS_ALIASES vs. GH team mismatches

  • build-maintainers matches the previous build-team now, minus the prefetch-only maintainers
  • ec matches ec-team now
  • integration-service-maintainers is integration-team + chipspeak, jencull (and those are integration team members, so that seems fine)

@chmeliik chmeliik marked this pull request as ready for review December 4, 2024 12:01
@chmeliik
Copy link
Contributor Author

chmeliik commented Dec 4, 2024

/retest

@chmeliik chmeliik marked this pull request as draft December 4, 2024 13:20
@chmeliik
Copy link
Contributor Author

chmeliik commented Dec 4, 2024

Need to add one more thing - Renovate groupings based on CODEOWNERS. Otherwise Renovate PRs will need approvals from many different sets of owners

@chmeliik chmeliik marked this pull request as ready for review December 4, 2024 18:09
@chmeliik chmeliik requested a review from a team December 4, 2024 18:10
@chmeliik
Copy link
Contributor Author

chmeliik commented Dec 4, 2024

CC @acornett21 @amisstea @arewm @avi-biton @bcrochet @brianwcook @brunoapimentel @cgwalters @eskultety @gbenhaim @gurnben @hmariset @jbpratt @kdudka @komish @ligangty @oamsalem @Omeramsc @ralphbean @scoheb @skattoju @taylormadore @yftacherzog @yma96

This PR adds you as a CODEOWNER (because you were already in an OWNERS file), which means you'll now have the power to self-service changes to your tasks. On the other hand, it means your approval will be required in order for those changes to be merged. Let me know if you have any concerns about that.

@chmeliik
Copy link
Contributor Author

chmeliik commented Dec 4, 2024

/test

@chmeliik
Copy link
Contributor Author

chmeliik commented Dec 4, 2024

Btw, the Renovate groupings based on filenames seem to work well. See for example chmeliik#45, chmeliik#46, which both update the oras image, but in two separate PRs according to the matchFileNames groupings

@chmeliik
Copy link
Contributor Author

chmeliik commented Dec 5, 2024

Added /task/validate-fbc and fixed the formatting (my auto-aligner script had a bug)

CODEOWNERS Outdated Show resolved Hide resolved
Copy link
Contributor

@tnevrlka tnevrlka left a comment

Choose a reason for hiding this comment

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

🌮

hack/update_renovate_json_based_on_codeowners.py Outdated Show resolved Hide resolved
CODEOWNERS Outdated Show resolved Hide resolved
Signed-off-by: Adam Cmiel <acmiel@redhat.com>
CODEOWNERS will allow us to make the ownership of individual tasks
actually mean something.

We will have to give every owner write permissions, but we will be able
to set up branch protection rules to block PRs from getting merged if
they don't have approvals from the owners.

This will allow the CODEOWNERS of tasks and stepactions to fully
self-service their PRs without giving them the ability to mess with
other parts of the repository.

The file was generated based on the current **/OWNERS

Signed-off-by: Adam Cmiel <acmiel@redhat.com>
Signed-off-by: Adam Cmiel <acmiel@redhat.com>
Signed-off-by: Adam Cmiel <acmiel@redhat.com>
And a python script to update renovate.json based on those directives.

Signed-off-by: Adam Cmiel <acmiel@redhat.com>
Align to 2-space indentation everywhere because we'll be making
automated changes to the file.

Signed-off-by: Adam Cmiel <acmiel@redhat.com>
Signed-off-by: Adam Cmiel <acmiel@redhat.com>
They will be assigned based on CODEOWNERS

Signed-off-by: Adam Cmiel <acmiel@redhat.com>
Make sure the groups will stay up to date with CODEOWNERS

Signed-off-by: Adam Cmiel <acmiel@redhat.com>
@chmeliik
Copy link
Contributor Author

chmeliik commented Dec 6, 2024

/retest

@chmeliik
Copy link
Contributor Author

chmeliik commented Dec 6, 2024

There hasn't been pushback to this approach (or the pushback has been resolved). The CODEOWNERS file is now fully valid. Merging

@chmeliik chmeliik added this pull request to the merge queue Dec 6, 2024
Merged via the queue into konflux-ci:main with commit 92020c1 Dec 6, 2024
16 checks passed
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