Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 4, 2025

This PR configures the Azure Pipeline nightly release to run efficiently by implementing two key behaviors:

  1. Schedule-only execution: The pipeline now runs only on the scheduled cron (3 AM daily) and removes automatic triggering on code changes
  2. Skip when no changes: Uses always: false to automatically skip scheduled runs when there are no new commits in the develop branch since the last execution

Pipeline Configuration

Updated .azure-pipelines/release/release-nightly.yml:

schedules:
  - cron: 0 3 * * *
    branches:
      include:
        - develop
    always: false

trigger: none

Coordination with Build Pipeline

The timing remains coordinated with the existing build pipeline:

  • Build pipeline (vscode-gradle-nightly.yml): Runs at 2 AM and creates artifacts
  • Release pipeline (release-nightly.yml): Runs at 3 AM and publishes artifacts

This ensures the build completes before the release pipeline attempts to download and publish artifacts, while avoiding unnecessary releases when no code changes have occurred.

Fixes #1705.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Author

Copilot AI commented Sep 4, 2025

@wenytang-ms 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

- Add schedule with cron '0 3 * * *' to run at 3 AM daily
- Add trigger on develop branch for automatic nightly releases on code changes
- Ensure release runs 1 hour after build pipeline (2 AM vs 3 AM)
- Both schedule and trigger target develop branch for consistency

Co-authored-by: wenytang-ms <[email protected]>
@Copilot Copilot AI changed the title [WIP] support nightly release Add nightly release schedule and trigger support to Azure Pipeline Sep 4, 2025
@wenytang-ms wenytang-ms marked this pull request as ready for review September 4, 2025 07:38
Copilot finished work on behalf of wenytang-ms September 4, 2025 07:38
@wenytang-ms
Copy link
Contributor

@copilot Does this trigger mechanism guarantee that the pipeline will be executed during the current cron interval upon a PR merge or code change?

Copy link
Author

Copilot AI commented Sep 4, 2025

@copilot Does this trigger mechanism guarantee that the pipeline will be executed during the current cron interval upon a PR merge or code change?

No, the trigger mechanism does not wait for the cron interval. With the current configuration:

When code is pushed to develop:

  • The release pipeline runs immediately due to the trigger section
  • It does NOT wait for the 3 AM scheduled time

Potential Issue:
The build pipeline (vscode-gradle-nightly.yml) only runs at 2 AM (has trigger: none), but the release pipeline now runs both:

  1. At 3 AM (scheduled)
  2. Immediately on code changes (trigger)

This means if code is pushed at 10 AM, the release pipeline will try to run immediately but may not find fresh artifacts since the build pipeline only ran at 2 AM.

Possible solutions:

  1. Keep current behavior if you want immediate releases with potentially older artifacts
  2. Remove the trigger section to only release on schedule after builds complete
  3. Add triggers to the build pipeline as well to ensure fresh artifacts

Which behavior do you prefer for the nightly release pipeline?

@Copilot Copilot AI requested a review from wenytang-ms September 4, 2025 07:50
Copilot finished work on behalf of wenytang-ms September 4, 2025 07:50
@wenytang-ms
Copy link
Contributor

@copilot please set the pipeline follow 2 rules below

  1. only schedule release
  2. if no code change in the schedule release, skip this schedule release

Copy link
Author

Copilot AI commented Sep 4, 2025

@copilot please set the pipeline follow 2 rules below

  1. only schedule release
  2. if no code change in the schedule release, skip this schedule release

I've updated the pipeline configuration to follow both rules:

  1. Only schedule release: Removed the trigger section and set trigger: none so the pipeline only runs on the scheduled cron (3 AM daily)
  2. Skip if no code changes: Added always: false to the schedule configuration, which automatically skips the scheduled run when there are no new changes in the develop branch since the last execution

The pipeline will now only run at 3 AM daily and only when there have been code changes, ensuring efficient resource usage and avoiding unnecessary releases.

Changes in commit f0916a1.

@Copilot Copilot AI changed the title Add nightly release schedule and trigger support to Azure Pipeline Configure nightly release pipeline to run only on schedule and skip when no changes Sep 4, 2025
Copilot finished work on behalf of wenytang-ms September 4, 2025 07:59
@wenytang-ms wenytang-ms marked this pull request as draft September 4, 2025 08:32
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.

support nightly release
3 participants