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

Create-ApiReview honors PackageProperty files #9412

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

scbedd
Copy link
Member

@scbedd scbedd commented Nov 21, 2024

See title.

@praveenkuttappan Detect-Api-Changes explicitly walks the prop files to begin with. So we're already covered there.

Pardon the other spacing updates. My powershell vscode extension is aggressive 👍

@scbedd scbedd requested a review from a team as a code owner November 21, 2024 01:06
@scbedd scbedd self-assigned this Nov 21, 2024
@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

$result = ProcessPackage -packageName $artifact.name
$responses[$artifact.name] = $result
$propFiles = Get-ChildItem -Path $ConfigFileDir -Recurse -Filter "*.json"
$artifactPackages = $ArtifactList | ForEach-Object { $_["name"] }
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be $_.name or is this a hashtable object?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a hashtable object, both will actually work here.

$artifact = Get-Content $propFile.FullName -Raw | ConvertFrom-Json -AsHashtable
if ($artifactPackages -contains $propFile.Name.Replace(".json", ""))
{
Write-Host "Processing $($artifact.ArtifactName)"
Copy link
Member

Choose a reason for hiding this comment

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

Isn't the artifact name the same as the file or are their cases where they are different? If they are the same, we probably can avoid reading the json file. If they aren't the same we probably should use the artifactname in your condition instead of the file name.

Copy link
Member Author

@scbedd scbedd Nov 21, 2024

Choose a reason for hiding this comment

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

$pkgInfo.ArtifactName == <package-json-file-name> everywhere I'm aware of. I'll add comments for clarity and double check, but I'm fairly certain.

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.

couple questions but otherwise looks good

Copy link
Member

@praveenkuttappan praveenkuttappan left a comment

Choose a reason for hiding this comment

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

Looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔬 Dev in PR
Development

Successfully merging this pull request may close these issues.

5 participants