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

Update get-codeowners.ps1 to work with the updated RetrieveCodeOwners executable + add some tests; make assorted refactorings #5103

Merged
4 commits merged into from
Feb 16, 2023

Conversation

konrad-jamrozik
Copy link
Contributor

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

This PR is part of work required in preparation to merge:

Specifically, to enable review of ownership changes due to upcoming wildcards support, as explained in:

As such, this PR contributes to:

This PR is a prerequisite for following PRs:

Merging prerequisite

This PR can be merged only after the following PRs are merged and relevant NuGet package published

This is because this PR depends on that NuGet package.

@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 self-assigned this Jan 10, 2023
@konrad-jamrozik konrad-jamrozik added the Central-EngSys This issue is owned by the Engineering System team. label Jan 10, 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

ghost pushed a commit that referenced this pull request Jan 14, 2023
…r all paths matching given glob path. (#5134)

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:
- #5135

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:
- #5088 (review)

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

And as such, also contributes to:
- #2770

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

### Additional changes

- Removed logger from `CodeOwnersParser`; replaced with `Console.Out` and `Console.Error`. This addresses the following comment:
    - #5063 (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`](https://www.nuget.org/packages/Microsoft.Extensions.FileSystemGlobbing).
Doc: https://learn.microsoft.com/en-us/dotnet/core/extensions/file-globbing
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/codeowners_compare branch from d4d2fed to ac64d1d Compare February 14, 2023 04:04
@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

@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

@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

@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

@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

@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 changed the title Add support for TargetPath to get-codeowners.ps1 + refactor & document Update get-codeowners.ps1 to work with the updated RetrieveCodeOwners executable; make assorted refactororing Feb 14, 2023
ghost pushed a commit that referenced this pull request Feb 14, 2023
…le + remove obsolete tests (#5437)

This is a follow-up PR to:
- #5241

That PR was supposed to enable the regex-based matcher everywhere, but didn't. This PR fixes that.

This PR also:
- removes the obsolete `ProgramSimplePathTests` test class; it is superseded by `ProgramGlobPathTests`, which is renamed in:
    - #5431
- removes obsolete tests from `get-codeowners.ps1`

This PR is a prerequisite for following PRs:
- #5103
- #5431
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/codeowners_compare branch from 3a85471 to f902ada Compare February 14, 2023 23:02
- capitalization fixups + some naming refactoring
- update ToolVersion to 1.0.0-dev.20230213.7
- fix param: --codeowners-file-path -> --codeowners-file-path-or-url; minor fixes
- update Azure.Sdk.Tools.RetrieveCodeOwners package ver to 20230213.2
- document params + add TargetPath
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/codeowners_compare branch from f902ada to 866c321 Compare February 14, 2023 23:03
@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 changed the title Update get-codeowners.ps1 to work with the updated RetrieveCodeOwners executable; make assorted refactororing Update get-codeowners.ps1 to work with the updated RetrieveCodeOwners executable; make assorted refactorings Feb 14, 2023
@konrad-jamrozik konrad-jamrozik requested a review from a team February 14, 2023 23:24
@konrad-jamrozik konrad-jamrozik marked this pull request as ready for review February 15, 2023 00:01
@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 changed the title Update get-codeowners.ps1 to work with the updated RetrieveCodeOwners executable; make assorted refactorings Update get-codeowners.ps1 to work with the updated RetrieveCodeOwners executable + add some tests; make assorted refactorings Feb 15, 2023
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/codeowners_compare branch 3 times, most recently from f67b238 to 2d07972 Compare February 15, 2023 00:41
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/codeowners_compare branch from 2d07972 to 84d7319 Compare February 15, 2023 00:41
@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

@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 Feb 16, 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.

@ghost ghost merged commit 0b01239 into main Feb 16, 2023
@ghost ghost deleted the users/kojamroz/codeowners_compare branch February 16, 2023 21:42
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
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants