Skip to content

Reduce duplication in nextest/ODBC CI target lists and arm64 test templates - #154

Draft
Saurabh Singh (saurabh500) with Copilot wants to merge 2 commits into
mainfrom
copilot/reduce-duplication-odbc-arm64
Draft

Reduce duplication in nextest/ODBC CI target lists and arm64 test templates#154
Saurabh Singh (saurabh500) with Copilot wants to merge 2 commits into
mainfrom
copilot/reduce-duplication-odbc-arm64

Conversation

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

The Alpine and deb/rhel distro target lists in validation-stages.yml were written out twice each — once for x64 stages (matrix format) and once for arm64 stages (targets-list format). Adding or removing a distro required editing multiple places and invited drift.

Changes

Unified parameter format for x64 matrix templates

  • test-matrix-template.yml and test-matrix-template-alpine.yml: replaced matrix: {} parameter with targets: [] (matching the existing arm64 template contract). The ADO strategy.matrix is generated internally via ${{ each target in parameters.targets }}, so runtime variables $(container) and $(entry) in script steps are unchanged.

Single source of truth for target lists (validation-stages.yml)

YAML anchors replace the four inline duplicate lists:

# Defined once in Test_alpine:
targets: &alpine_targets
  - name: Alpine3_18
    container: ghcr.io/microsoft/mssql-rs/import/alpine:3.18
    entry: alpine.sh
  ...

# Aliased in Test_alpine_arm64:
targets: *alpine_targets

Same pattern for &deb_rhel_targets / *deb_rhel_targets across Test_amd64 and Test_arm64. Adding or removing a distro is now a single-location edit.

Sync comments on arm64 templates

Added comments to both test-matrix-template-arm64.yml and test-matrix-template-alpine_arm64.yml noting that the shared-mode and per-job-mode steps: blocks are structurally identical — differing only in variable sourcing ($(…) runtime vs ${{ target.* }} compile-time) — and must be kept in sync. ADO template constraints prevent further factoring.

Copilot AI changed the title [WIP] Refactor ODBC CI target lists and arm64 test template to reduce duplication Reduce duplication in nextest/ODBC CI target lists and arm64 test templates Jul 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 reduces CI matrix duplication by standardizing target parameters and documenting synchronized ARM64 paths.

Changes:

  • Converts x64 matrix templates to target lists.
  • Reuses distro lists via YAML anchors.
  • Documents duplicated ARM64 step blocks.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.pipeline/templates/validation-stages.yml Shares distro target lists between architectures.
.pipeline/templates/test-matrix-template.yml Generates the amd64 matrix from targets.
.pipeline/templates/test-matrix-template-arm64.yml Documents synchronized ARM64 paths.
.pipeline/templates/test-matrix-template-alpine.yml Generates the Alpine matrix from targets.
.pipeline/templates/test-matrix-template-alpine_arm64.yml Documents synchronized Alpine ARM64 paths.

artifactName: 'Build_Linux'
matrix:
Alpine3_18:
targets: &alpine_targets
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.

Reduce duplication in ODBC/nextest CI target lists and arm64 test template

3 participants