Skip to content

Add to the retrieve-codeowners tool support for returning owners for all paths matching given glob path.#5134

Merged
2 commits merged intomainfrom
users/kojamroz/tool_add_owners_diff
Jan 14, 2023
Merged

Add to the retrieve-codeowners tool support for returning owners for all paths matching given glob path.#5134
2 commits merged intomainfrom
users/kojamroz/tool_add_owners_diff

Conversation

@konrad-jamrozik
Copy link
Contributor

@konrad-jamrozik konrad-jamrozik commented Jan 13, 2023

This PR implements for the retrieve-codeowners tool the ability to return not only owners for a single path, but a list of all owners for all paths resolved when matching a glob path given as input.

As such, this PR contributes to:

This work is necessary to be able to compare and diff the owners of all files in repository before and after the regex matcher is turned on, per this comment:

In other words, this PR contributes to unblocking to the following PR:

And as such, also contributes to:

This PR will require some upstream changes, which are captured by:

Additional changes

  • Removed logger from CodeOwnersParser; replaced with Console.Out and Console.Error. This addresses the following comment:
  • Prevented the new regex matcher from matching paths that have * in them - such paths are malformed anyway (at least on Windows).
  • A lot of assorted changes to surrounding production & test code - please see the file diff for details.

Implementation notes

This PR leverages Microsoft.Extensions.FileSystemGlobbing.
Doc: https://learn.microsoft.com/en-us/dotnet/core/extensions/file-globbing

@konrad-jamrozik konrad-jamrozik added the Central-EngSys This issue is owned by the Engineering System team. label Jan 13, 2023
@konrad-jamrozik konrad-jamrozik self-assigned this Jan 13, 2023
@konrad-jamrozik konrad-jamrozik requested a review from a team as a code owner January 13, 2023 09:48
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/tool_add_owners_diff branch from f88fb89 to 5659e9e Compare January 13, 2023 09:59
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/tool_add_owners_diff branch from 5659e9e to 95c3691 Compare January 13, 2023 09:59
@konrad-jamrozik konrad-jamrozik changed the title Add to retrieve-codeowners tools support for returning owners for all paths matching given glob path. Add to the retrieve-codeowners tool support for returning owners for all paths matching given glob path. Jan 13, 2023
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/tool_add_owners_diff branch from 95c3691 to f7a5ade Compare January 13, 2023 10:09
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow


<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10.0</LangVersion>
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary to specify? What is the default language feature?

Copy link
Contributor Author

@konrad-jamrozik konrad-jamrozik Jan 14, 2023

Choose a reason for hiding this comment

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

@weshaggard Prompted by your question I investigated a bit and I think it is coming from Directory.Build.props. I will make a PR to update this to 10.0, now that we have moved everything to net6.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

A few questions/comments but otherwise seems reasonable.

@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/tool_add_owners_diff branch from 2eb8b7e to b1d1774 Compare January 14, 2023 00:28
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/tool_add_owners_diff branch from b1d1774 to 3ed5c92 Compare January 14, 2023 00:28
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@ghost
Copy link

ghost commented Jan 14, 2023

Hello @azure-sdk!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants