You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
metadata.owner field in Ruby package.yml files not being respected #141
The code_ownership documentation states that Ruby packages support ownership via both:
Top-level owner field
Nested metadata.owner field
However, the codeowner-rs documentation only mentions the top-level owner field. The code suggests metadata.owner is not currently supported for Ruby packages (though it is supported for JavaScript packages).
Expected Behavior
Ruby package.yml files should support ownership in either format:
# Format 1: top-level owner
owner: TeamName
# Format 2: nested metadata.owner
metadata:
owner: TeamName
Current Behavior
Only Format 1 is supported (with code_ownership 2.0.0 and RustCodeOwners.version returning 0.3.0)
Questions
Is the code_ownership documentation correct? Should codeowners-rs support metadata.owner for Ruby packages, to support the previous behavior of code_ownership?
If yes, how should it handle conflicts when both fields are present (e.g., precedence rules or validation warnings)?
If no, should the code_ownership docs be updated to remove mention of metadata.owner support?
I'd be happy to submit a PR in codeowner-rs or code_ownership depending on the direction.
thanks for the submitting this @joshuaylee. This seems like a regression, but I'm not sure which is the best path.
I do like keeping it simple with a single key, but I don't want to decide that on my own if it causes a lot of problems for other teams. Is there a reason to support the metadata key as well?
Mainly an "FYI" so that other people searching for the error message displayed find this ticket:
When upgrading from code_ownership to version 2+, we got a message saying "Some files are missing ownership" - and then all ruby files were listed as not having an owner :)
In our case, all our package.yml files had the owner in the JSON file as metadata.owner rather than using the top level key, so the Rust version of CodeOwnership excluded them.
I personally don't mind much if it's "metadata.owner" or just "owner". Note that:
Activity
martinemde commentedon Nov 13, 2025
thanks for the submitting this @joshuaylee. This seems like a regression, but I'm not sure which is the best path.
I do like keeping it simple with a single key, but I don't want to decide that on my own if it causes a lot of problems for other teams. Is there a reason to support the metadata key as well?
oskarpearson commentedon Nov 26, 2025
Mainly an "FYI" so that other people searching for the error message displayed find this ticket:
When upgrading from code_ownership to version 2+, we got a message saying "Some files are missing ownership" - and then all ruby files were listed as not having an owner :)
In our case, all our package.yml files had the owner in the JSON file as
metadata.ownerrather than using the top level key, so the Rust version of CodeOwnership excluded them.I personally don't mind much if it's "metadata.owner" or just "owner". Note that:
withparse_packwerk#49 for that.Perhaps updating the README.md and adding something to the CHANGELOG would be sufficient?
Fix regression in package.yml metadata.owner key
Fix regression in package.yml metadata.owner key
Fix regression in package.yml metadata.owner key
Fix regression in package.yml metadata.owner key
Fix regression in package.yml metadata.owner key
Fix regression in package.yml metadata.owner key
Fix regression in package.yml metadata.owner key
Fix regression in package.yml metadata.owner key
Fix regression in package.yml metadata.owner key
Fix regression in package.yml metadata.owner key
Fix regression in package.yml metadata.owner key (#85)
Honor metadata.owner in for-file for Ruby packages (#131)
Cover metadata.owner and autocorrect in specs; document the team cache
Update codeowners-rs to v0.5.0 and clear its team cache in bust_cache…