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

Filter out Exclude Paths for PR Pipelines #9649

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

JimSuplizio
Copy link
Member

@JimSuplizio JimSuplizio commented Jan 16, 2025

@scbedd and @weshaggard

These are the common changes required to filter out PackageInfo generation by what should be excluded from the pull request pipelines. This is the example in Python, which excludes sdk/cosmos. The unfortunate thing here is that we can't access the pr->paths->exclude meaning this needs to be duplicated. Because of the default in the save-package-properties.yml nothing will break if the ExcludePaths aren't plumbed through. The only downside here is that wildcards aren't accepted but then again, most excludes in yml files aren't wildcarded.

I'd created a draft PR in Python to test these changes. Notice that the PR had changes in Cosmos and Template. This is the test run and if you notice, Cosmos no longer has a PackageInfo file in the artifacts and it's no longer running tests for azure-cosmos in the pullrequest pipeline. The diff.json for the PR is below which correctly has ExcludePaths.

{
  "ChangedFiles": [
    "eng/common/pipelines/templates/steps/save-package-properties.yml",
    "eng/common/scripts/Generate-PR-Diff.ps1",
    "eng/common/scripts/Package-Properties.ps1",
    "eng/pipelines/templates/jobs/ci.yml",
    "eng/pipelines/templates/stages/archetype-sdk-client.yml",
    "eng/pipelines/templates/steps/build-package-artifacts.yml",
    "sdk/cosmos/azure-cosmos/README.md",
    "sdk/pullrequest.yml",
    "sdk/template/azure-template/README.md"
  ],
  "ChangedServices": [
    "cosmos",
    "pullrequest.yml",
    "template"
  ],
  "ExcludePaths": [
    "sdk/cosmos"
  ],
  "PRNumber": "39185"
}

Last but not least, the test PR in Python also shows where ExcludePaths would have to be plumbed through. Once this gets reviewed and pushed out to the repositories, I'll end up making those changes in Python. For Java, we'll have more excludes, mostly for Track1 libraries, Cosmos, resourcemanagerhybrid and possibly Spring.

Fixes #9634

@JimSuplizio JimSuplizio self-assigned this Jan 16, 2025
@JimSuplizio JimSuplizio requested a review from a team as a code owner January 16, 2025 16:48
@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 added a commit to Azure/azure-sdk-for-js that referenced this pull request Jan 16, 2025
@JimSuplizio JimSuplizio merged commit c2ff453 into Azure:main Jan 16, 2025
12 checks passed
@JimSuplizio JimSuplizio deleted the FilterOutExcludesForPRPipelines branch January 16, 2025 20:38
swathipil pushed a commit to swathipil/azure-sdk-tools that referenced this pull request Feb 4, 2025
* Filter out Excludes for PR Pipelines

* Updates for feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generating Diff PRs should honor excludes when creating PackageInfo files.
5 participants