Skip to content

CICD: Move OWNERS to .github/CODEOWNERS#3983

Merged
TomOnTime merged 5 commits into
DNSControl:mainfrom
chicks-net:chicks/2026-01-14-rename-codeowners-fix-3978
May 12, 2026
Merged

CICD: Move OWNERS to .github/CODEOWNERS#3983
TomOnTime merged 5 commits into
DNSControl:mainfrom
chicks-net:chicks/2026-01-14-rename-codeowners-fix-3978

Conversation

@chicks-net
Copy link
Copy Markdown
Collaborator

@chicks-net chicks-net commented Jan 14, 2026

Summary

Fixes #3978

GitHub requires the CODEOWNERS file to be located in the .github/ directory (or repository root with that exact name) to function properly. This PR moves OWNERS to .github/CODEOWNERS and updates all references throughout the codebase.

Changes Made

  • Renamed OWNERS.github/CODEOWNERS
  • Updated .gitattributes to reference the new location
  • Updated build/generate/ownersFile.go to generate the file in the correct location
  • Updated documentation in writing-providers.md to reference .github/CODEOWNERS
  • Added Tim as global owner
  • EXOSCALE: Giza is now maintainer and the generated feature flags are updated.

Test Plan

  • Ran /bin/generate-all.sh to verify the generator creates the file in the new location
  • Verified all file references were updated
  • Checked that the file move preserves all content
% git grep OWNERS
.gitattributes:.github/CODEOWNERS eol=lf
build/generate/ownersFile.go:   file, err := os.Create(".github/CODEOWNERS")
documentation/advanced-features/writing-providers.md:  * `CODEOWNERS`

🤖 Generated with Claude Code

@tlimoncelli
Copy link
Copy Markdown
Contributor

Hello friend!

Github is complaining that the people in CODEOWNERS do not have write permission. Each one gets an error such as:

Unknown owner on line 31: make sure @juliusrickert exists and has write access to the repository
providers/hostingde @juliusrickert

They don't have write permission because the current policy (from my employer) is that I have to approve any merge to main. Is there some other way to comply with the policy but give people write access?

@chicks-net
Copy link
Copy Markdown
Collaborator Author

chicks-net commented Jan 22, 2026

Hello friend!

Howdy sir! 🙇

Github is complaining that the people in CODEOWNERS do not have write permission. Each one gets an error such as:

Unknown owner on line 31: make sure @juliusrickert exists and has write access to the repository
providers/hostingde @juliusrickert

They don't have write permission because the current policy (from my employer) is that I have to approve any merge to main. Is there some other way to comply with the policy but give people write access?

Oh dear, github policy and stackexchange policy are not playing nicely together here. 😭 Changing the policies is not a practical option. Effectively this means that the CODEOWNERS features won't work for us. I've given this some thought and research and suggest:

  1. Going ahead with the rename to CODEOWNERS is moving things in a more correct direction even if it isn't going to do much for us as-is.
  2. We should probably add in a comment to the generated CODEOWNERS file indicating the policy limitation.
  3. The hoped-for functionality can be regained with https://github.com/marketplace/actions/assign-reviewers if we want to stick with CODEOWNERS format for the config or https://github.com/marketplace/actions/auto-request-review if we want to generate a new format too.

Would adding the comment be enough to make this PR worth landing? I'm happy to work on the other github actions in this PR or a new one.

@chicks-net chicks-net added the github_actions Pull requests that update Github_actions code label Feb 2, 2026
@chicks-net
Copy link
Copy Markdown
Collaborator Author

This is unblocked now that we're in the new github org. 😄

Comment thread .github/CODEOWNERS Outdated
@chicks-net chicks-net force-pushed the chicks/2026-01-14-rename-codeowners-fix-3978 branch from dec9067 to 8d93d28 Compare May 9, 2026 20:47
@chicks-net
Copy link
Copy Markdown
Collaborator Author

I rebased and fixed the one issue @cafferata noticed. I don't think I caused any of the CI jobs failing.

How does it look now?

Comment thread build/generate/ownersFile.go Outdated
@chicks-net
Copy link
Copy Markdown
Collaborator Author

CI Failure Analysis

All 7 failing checks share a single root cause: go.mod / go.sum need updating. Running go mod tidy locally produces changes in both files. Every red check is a downstream victim:

Failed Check Error
go mod tidy Dirty git status: go.mod and go.sum changed after go mod tidy
go fmt go: updates to go.mod needed; to update it: go mod tidy
go fix Same
go generate Same
fmtjson (build) go build fails: go: updates to go.mod needed
build (unit tests) Same
golangci-lint no go files to analyze: running go mod tidy may solve the problem

The fix is straightforward: run go mod tidy, commit the resulting changes, and push. Should I include that commit in this PR?

@chicks-net chicks-net requested a review from cafferata May 10, 2026 15:30
Comment thread .github/CODEOWNERS
Comment thread documentation/advanced-features/writing-providers.md Outdated
Comment thread documentation/provider/index.md
@cafferata
Copy link
Copy Markdown
Member

I would advise keeping go.mod / go.sum changes out of scope of this PR. Those tend to pull in unrelated dependency bumps that make the diff harder to review and bisect later. A separate PR (or a rebase onto a fresh main that already has them) would be cleaner.

@chicks-net chicks-net requested a review from cafferata May 10, 2026 17:46
@chicks-net
Copy link
Copy Markdown
Collaborator Author

I would advise keeping go.mod / go.sum changes out of scope of this PR. Those tend to pull in unrelated dependency bumps that make the diff harder to review and bisect later. A separate PR (or a rebase onto a fresh main that already has them) would be cleaner.

Sounds good to me. I'd prefer to keep the PRs more focused and not glom unrelated changes onto them just so we can fix the GHAs.

I think this is ready for review again. 😁

@TomOnTime
Copy link
Copy Markdown
Collaborator

Suggestion: Once we merge this, we should create a new "role" called "provider" which has just enough privs to update labels and be a reviewer. (I assume that's possible.) However they shouldn't have merge privs. (I should be the only one that can merge to main for now)

@chicks-net
Copy link
Copy Markdown
Collaborator Author

Suggestion: Once we merge this, we should create a new "role" called "provider" which has just enough privs to update labels and be a reviewer. (I assume that's possible.) However they shouldn't have merge privs. (I should be the only one that can merge to main for now)

100% agree. This is exactly what I was hoping for.

@TomOnTime
Copy link
Copy Markdown
Collaborator

FYI: #4242 should fix the go mod tidy stuff for you.

@TomOnTime TomOnTime changed the title BUGFIX: Move OWNERS to .github/CODEOWNERS to fix #3978 CICD: Move OWNERS to .github/CODEOWNERS to fix #3978 May 12, 2026
Signed-off-by: Christopher Hicks <chicks.net@gmail.com>
Signed-off-by: Christopher Hicks <chicks.net@gmail.com>
Signed-off-by: Christopher Hicks <chicks.net@gmail.com>
@chicks-net chicks-net force-pushed the chicks/2026-01-14-rename-codeowners-fix-3978 branch from 70f68b8 to 50b24f1 Compare May 12, 2026 18:33
@TomOnTime TomOnTime merged commit f6a0068 into DNSControl:main May 12, 2026
12 checks passed
@cafferata cafferata changed the title CICD: Move OWNERS to .github/CODEOWNERS to fix #3978 CICD: Move OWNERS to .github/CODEOWNERS May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update Github_actions code

Development

Successfully merging this pull request may close these issues.

Rename OWNERS to CODEOWNERS

4 participants