Skip to content

Conversation

@Ayaz-Microsoft
Copy link
Contributor

…r efficiency

Purpose

  • ... Oprimized pipelines using path based filtering

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances CI/CD workflow efficiency by adding path-based filtering to trigger workflows only when relevant files change. While the path filters are correctly configured, the implementation is incomplete as it omits necessary branch filters, causing workflows to trigger on all branches rather than specific target branches as indicated by the workflow comments.

Key Changes

  • Added path-based filtering to azd-ai-template-validation.yml to trigger only on changes to azure.yaml, infra/**, or the workflow file itself
  • Added path-based filtering to assign-workspace-admins.yml to trigger only on changes to Fabric/utils scripts or the workflow file itself

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/azd-ai-template-validation.yml Adds push/pull_request triggers with path filters for azure.yaml, infra directory, and workflow file, but missing branch filters mentioned in comments
.github/workflows/assign-workspace-admins.yml Adds push/pull_request triggers with path filters for Fabric and utils scripts, but missing branch filters mentioned in comments

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6 to +10
push:
paths:
- "azure.yaml"
- "infra/**"
- ".github/workflows/azd-ai-template-validation.yml"
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The push trigger is missing branch filters. According to the comment on line 2, this workflow should only run when commits are pushed to "pre-deploy-alguadam", but the current configuration will trigger on pushes to ANY branch. This could lead to unnecessary workflow runs and resource consumption.

Consider adding a branches filter under the push trigger, similar to how it's done in azure-dev.yml. For example:

push:
  branches:
    - pre-deploy-alguadam
  paths:
    - "azure.yaml"
    - "infra/**"
    - ".github/workflows/azd-ai-template-validation.yml"

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +15
pull_request:
paths:
- "azure.yaml"
- "infra/**"
- ".github/workflows/azd-ai-template-validation.yml"
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The pull_request trigger is missing branch filters. While the path filters are correct, the workflow will now trigger on pull requests targeting ANY branch. This is inconsistent with the typical pattern seen in azure-dev.yml where pull requests are filtered to target specific branches (e.g., main).

Consider adding a branches filter to limit which target branches will trigger this workflow. For example:

pull_request:
  branches:
    - main
  paths:
    - "azure.yaml"
    - "infra/**"
    - ".github/workflows/azd-ai-template-validation.yml"

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +11
push:
paths:
- "infra/scripts/fabric/**"
- "infra/scripts/utils/**"
- ".github/workflows/assign-workspace-admins.yml"
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The push trigger is missing branch filters. The comment on line 3 states this workflow should trigger "on push to main/master", but the current configuration will trigger on pushes to ANY branch. This is inconsistent with the stated intent and could cause unnecessary workflow runs.

Consider adding a branches filter under the push trigger to match the comment's description. For example:

push:
  branches:
    - main
    - master
  paths:
    - "infra/scripts/fabric/**"
    - "infra/scripts/utils/**"
    - ".github/workflows/assign-workspace-admins.yml"

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +16
pull_request:
paths:
- "infra/scripts/fabric/**"
- "infra/scripts/utils/**"
- ".github/workflows/assign-workspace-admins.yml"
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The pull_request trigger is missing branch filters. While the path filters are correct, this will trigger on pull requests targeting ANY branch. Following the pattern in azure-dev.yml (lines 14-20), it's a best practice to specify which target branches should trigger the workflow.

Consider adding a branches filter to limit which target branches will trigger this workflow. For example:

pull_request:
  branches:
    - main
  paths:
    - "infra/scripts/fabric/**"
    - "infra/scripts/utils/**"
    - ".github/workflows/assign-workspace-admins.yml"

Copilot uses AI. Check for mistakes.
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.

2 participants