Skip to content

feat: add scripts hotfix pipeline for test#8046

Merged
Devinwong merged 1 commit intomainfrom
devinwon/add-scripts-hotfix-pipeline
Mar 9, 2026
Merged

feat: add scripts hotfix pipeline for test#8046
Devinwong merged 1 commit intomainfrom
devinwon/add-scripts-hotfix-pipeline

Conversation

@Devinwong
Copy link
Collaborator

What this PR does / why we need it:
Add scripts hotfix pipeline for test because ADO pipeline only can be created based on yaml file on main branch.

Which issue(s) this PR fixes:

Fixes #

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

Adds a manually triggered Azure DevOps pipeline intended to build, validate (via e2e), and publish “provisioning scripts hotfix” OCI artifacts to AKS-managed ACR and onward MCR syndication.

Changes:

  • Introduces a new .pipelines/.vsts-provisioning-scripts-hotfix.yaml pipeline with Build / Validate / Publish stages.
  • Adds parameter validation (SKU + affected VHD version format) and conditional validation skipping.

Comment on lines +72 to +79
- bash: |
set -euo pipefail
bash vhdbuilder/provisioning-manifest/build-hotfix-oci.sh \
--sku "${{ parameters.sku }}" \
--affected-version "${{ parameters.affectedVersion }}" \
--description "${{ parameters.description }}" \
--files "${{ parameters.changedFiles }}" \
--dry-run
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The pipeline invokes vhdbuilder/provisioning-manifest/build-hotfix-oci.sh, but there is no vhdbuilder/provisioning-manifest/ directory (or build-hotfix-oci.sh) in the repo. As written, the Build stage will fail immediately. Either add the missing script/directory in this PR or update the path to the correct existing script location.

Copilot uses AI. Check for mistakes.
Comment on lines +100 to +109
inlineScript: |
set -euo pipefail
az acr login --name $(E2E_HOTFIX_ACR_NAME)

bash vhdbuilder/provisioning-manifest/build-hotfix-oci.sh \
--sku "${{ parameters.sku }}" \
--affected-version "${{ parameters.affectedVersion }}" \
--description "${{ parameters.description }}" \
--files "${{ parameters.changedFiles }}" \
--registry "$(E2E_HOTFIX_ACR_NAME).azurecr.io"
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

Same issue as the Build stage: this job calls vhdbuilder/provisioning-manifest/build-hotfix-oci.sh, but that script/path does not exist in the repository, so pushing to the test ACR cannot work.

Copilot uses AI. Check for mistakes.
Comment on lines +194 to +203
inlineScript: |
set -euo pipefail
az acr login --name aksnipackages

bash vhdbuilder/provisioning-manifest/build-hotfix-oci.sh \
--sku "${{ parameters.sku }}" \
--affected-version "${{ parameters.affectedVersion }}" \
--description "${{ parameters.description }}" \
--files "${{ parameters.changedFiles }}" \
--registry "aksnipackages.azurecr.io"
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

Same issue as earlier stages: the Publish job calls vhdbuilder/provisioning-manifest/build-hotfix-oci.sh, but the referenced script/path is missing from the repo, so production publishing will fail.

Copilot uses AI. Check for mistakes.
Comment on lines +128 to +135
set -euo pipefail
# Override the hotfix registry so check_for_script_hotfix()
# pulls from the test ACR instead of mcr.microsoft.com
export HOTFIX_REGISTRY="$(E2E_HOTFIX_ACR_NAME).azurecr.io"

# Run the standard e2e harness — the test node will detect
# and apply the hotfix from the test ACR during provisioning
bash .pipelines/scripts/e2e_run.sh
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The Validate stage claims setting HOTFIX_REGISTRY will cause the node to “detect and apply the hotfix”, but there is no HOTFIX_REGISTRY reference nor check_for_script_hotfix() implementation anywhere in the repo. As a result, this validation run won’t actually exercise the hotfix mechanism and could provide false confidence. Either wire the hotfix registry into the e2e harness/provisioning flow (e.g., via SIG/customData inputs) or remove/replace the misleading logic/comments.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

@Devinwong Devinwong Mar 9, 2026

Choose a reason for hiding this comment

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

Other functions and scripts will be provided in the topic branch. I need a pipeline so that I can test my topic branch

BUILD_SRC_DIR: $(System.DefaultWorkingDirectory)
DefaultWorkingDirectory: $(Build.SourcesDirectory)
HOTFIX_REGISTRY: $(E2E_HOTFIX_ACR_NAME).azurecr.io
TAGS_TO_RUN: "os=linux"
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

affectedVersion is a required parameter, but it is only used when building the artifact; the e2e validation job never uses it to select or validate against the affected VHD version (e2e uses SIG_VERSION_TAG_NAME/SIG_VERSION_TAG_VALUE or VHD_BUILD_ID). This means the Validate stage may test an unrelated image (default main) instead of the version being hotfixed.

Suggested change
TAGS_TO_RUN: "os=linux"
AFFECTED_VERSION: ${{ parameters.affectedVersion }}
TAGS_TO_RUN: "os=linux,affectedVersion=${{ parameters.affectedVersion }}"

Copilot uses AI. Check for mistakes.
inlineScript: |
bash .pipelines/scripts/e2e_delete_vmss.sh

# Stage 3: Publish to production ACR (syndicates to MAR)
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The comment says “syndicates to MAR” but earlier in the file you refer to “MCR syndication”. If this is meant to be Microsoft Container Registry, this should be “MCR” for consistency; otherwise clarify what “MAR” refers to.

Suggested change
# Stage 3: Publish to production ACR (syndicates to MAR)
# Stage 3: Publish to production ACR (syndicates to MCR)

Copilot uses AI. Check for mistakes.
@Devinwong Devinwong merged commit b622f5d into main Mar 9, 2026
24 checks passed
@Devinwong Devinwong deleted the devinwon/add-scripts-hotfix-pipeline branch March 9, 2026 22:16
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.

3 participants