Skip to content

codeownership validate --diff not respecting owned_globs #147

@kendix

Description

@kendix

I recently noticed that my calls to codeownership validate --diff had started to fail for files that were not specifically included in the owned_globs part of our code_ownership.config file.

I first verified that when running just codeownership validate without --diff that the validation was still succeeding (which it was).

Then I verified that adding the extension of the file I was expecting to not fail validation to my owned_globs did cause it to fail.

Additionally, I verified that specifically excluding the file path in unowned_globs did not allow the --diff command to succeed.

Then I decided to figure out the last version that the --diff command was running successfully for my setup.

I determined that the change occurred in the 2.0.0.5 release and has been an issue since.

The specific error that occurs in the validate command is:

% bin/codeownership validate --diff
.local/share/mise/installs/ruby/3.4.6/lib/ruby/gems/3.4.0/gems/code_ownership-2.0.0.pre.5-arm64-darwin/lib/code_ownership.rb:236:in 'RustCodeOwners.generate_and_validate': Unowned files detected: (RuntimeError)

I suspect that for some reason the --diff command is somehow ignoring the config file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageA new issue that needs review by the core team

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions