Skip to content

engineering: use correct version of IC for rollback tests#517

Open
bfjelds wants to merge 6 commits intomainfrom
user/bfjelds/use-mic-version-for-rollback-tests
Open

engineering: use correct version of IC for rollback tests#517
bfjelds wants to merge 6 commits intomainfrom
user/bfjelds/use-mic-version-for-rollback-tests

Conversation

@bfjelds
Copy link
Member

@bfjelds bfjelds commented Feb 14, 2026

🔍 Description

The rollback tests are using :latest IC. Enable the pipeline micVersion and micBuildType to determine IC version as it does elsewhere.

@bfjelds bfjelds requested a review from a team as a code owner February 14, 2026 18:49
Copilot AI review requested due to automatic review settings February 14, 2026 18:49
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 updates the rollback testing pipeline to use a configurable Image Customizer (IC/MIC) version instead of defaulting to :latest. The changes enable the pipeline's micVersion and micBuildType parameters to control which IC version is used during rollback tests, consistent with how other testing pipelines operate.

Changes:

  • Add micBuildType and micVersion parameter passing from vm-testing.yml to all three testing-template.yml invocations
  • Add micBuildType and micVersion parameter definitions in testing-template.yml
  • Add MIC download template calls and dev build type logic to use the specified IC version

Reviewed changes

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

File Description
.pipelines/templates/stages/testing_rollback/vm-testing.yml Passes micBuildType and micVersion parameters to all three testing-template.yml invocations (qemu-grub, qemu, and uki flavors)
.pipelines/templates/stages/testing_rollback/testing-template.yml Adds micBuildType and micVersion parameter definitions, MIC download template calls, and logic to use dev IC image when micBuildType is 'dev'

- template: common/mic-download-template.yaml@platform-pipelines
parameters:
buildType: ${{ parameters.micBuildType }}
arch: ${{ parameters.micArchitecture }}
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

The micArchitecture parameter is referenced in the mic-download-template calls but is not defined in the parameters section of this template. Add a parameter definition for micArchitecture (similar to trident-testimg-template.yml lines 18-24) with a default value of "amd64" to match the hostArchitecture specified in line 77 of this file.

Copilot uses AI. Check for mistakes.
frhuelsz
frhuelsz previously approved these changes Feb 15, 2026
Changed architecture parameter to 'amd64' in mic-download-template.
Copilot AI review requested due to automatic review settings February 15, 2026 20:05
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

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

Copilot AI review requested due to automatic review settings February 15, 2026 21:59
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

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings February 15, 2026 23:12
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

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

Comment on lines +88 to 104
// Check for Image Customizer image
queryImageArgs := []string{"images", "-q", testConfig.ImageCustomizerImage}
logrus.Tracef("Checking for Image Customizer image: %v", queryImageArgs)
queryImageOutput, err := exec.Command("docker", queryImageArgs...).Output()
logrus.Tracef("Check for Image Customizer image (%v):\n%s", err, string(queryImageOutput))
if err != nil || len(queryImageOutput) == 0 {
logrus.Tracef("Image Customizer image not found locally: %s", testConfig.ImageCustomizerImage)
// Pull Image Customizer image
pullArgs := []string{"pull", testConfig.ImageCustomizerImage}
logrus.Tracef("Pulling Image Customizer image: %v", pullArgs)
pullOutput, err := exec.Command("docker", pullArgs...).CombinedOutput()
logrus.Tracef("Pull Image Customizer (%v):\n%s", err, string(pullOutput))
if err != nil {
return fmt.Errorf("failed to pull Image Customizer image: %w", err)
}
logrus.Tracef("Pulled Image Customizer image: %s", testConfig.ImageCustomizerImage)
}
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

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

Issue: the new “check locally then pull” logic can cause rollback tests to run against a stale Image Customizer image when the tag is mutable (e.g. :latest default or :dev). This undermines the goal of pinning/using the intended IC version.

Evidence: PrepareQcow2 only pulls when docker images -q returns empty, and later runs with docker run --pull=never.

Suggestion: either always docker pull the requested tag (relying on Docker layer caching), or conditionally force pull for mutable tags (latest/dev) / add a “force pull” option; also consider trimming docker images -q output and capturing stderr for easier diagnostics.

Suggested change
// Check for Image Customizer image
queryImageArgs := []string{"images", "-q", testConfig.ImageCustomizerImage}
logrus.Tracef("Checking for Image Customizer image: %v", queryImageArgs)
queryImageOutput, err := exec.Command("docker", queryImageArgs...).Output()
logrus.Tracef("Check for Image Customizer image (%v):\n%s", err, string(queryImageOutput))
if err != nil || len(queryImageOutput) == 0 {
logrus.Tracef("Image Customizer image not found locally: %s", testConfig.ImageCustomizerImage)
// Pull Image Customizer image
pullArgs := []string{"pull", testConfig.ImageCustomizerImage}
logrus.Tracef("Pulling Image Customizer image: %v", pullArgs)
pullOutput, err := exec.Command("docker", pullArgs...).CombinedOutput()
logrus.Tracef("Pull Image Customizer (%v):\n%s", err, string(pullOutput))
if err != nil {
return fmt.Errorf("failed to pull Image Customizer image: %w", err)
}
logrus.Tracef("Pulled Image Customizer image: %s", testConfig.ImageCustomizerImage)
}
// Always pull the Image Customizer image to avoid using a stale mutable tag.
pullArgs := []string{"pull", testConfig.ImageCustomizerImage}
logrus.Tracef("Pulling Image Customizer image: %v", pullArgs)
pullOutput, err := exec.Command("docker", pullArgs...).CombinedOutput()
logrus.Tracef("Pull Image Customizer (%v):\n%s", err, string(pullOutput))
if err != nil {
return fmt.Errorf("failed to pull Image Customizer image: %w", err)
}
logrus.Tracef("Pulled Image Customizer image: %s", testConfig.ImageCustomizerImage)

Copilot uses AI. Check for mistakes.
skipNetplanRuntimeTesting: true
micBuildType: ${{ parameters.micBuildType }}
micVersion: ${{ parameters.micVersion }}
isUki: true
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

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

Issue: isUki: true is set for the flavor: qemu rollback job even though that job is not the UKI flavor. This makes the template parameters misleading and risks accidentally enabling UKI-specific behavior if skipExtensionTesting changes later.

Evidence: flavor: qemu block passes isUki: true.

Suggestion: only set isUki: true for the flavor: uki job (or rename the parameter if it’s intended to mean something else).

Suggested change
isUki: true

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.

3 participants