Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Implements Milestone 1 from docs/release/remove-v1-checklist.md: reassign build and docker targets to produce v2 artifacts by default while preserving v1 overrides and four v1 exception targets.

Changes

scripts/makefiles/BuildBinaries.mk

  • Defaults JAEGER_VERSION ?= 2 for most build targets
  • Auto-detects exception targets (build-all-in-one, build-query, build-collector, build-ingester) in MAKECMDGOALS and sets JAEGER_VERSION=1 for those
  • Routes to BUILD_INFO (v1) or BUILD_INFO_V2 based on JAEGER_VERSION
# Default behavior
make build-jaeger          # uses v2
make build-all-in-one      # uses v1 (exception)

# Explicit override
JAEGER_VERSION=1 make build-jaeger        # forces v1
JAEGER_VERSION=2 make build-all-in-one    # forces v2

scripts/build/build-upload-a-docker-image.sh

  • Defaults JAEGER_VERSION=2
  • Adds --version <1|2>, --include-legacy-v1, --dry-run flags
  • Passes version context to compute-tags.sh via environment

scripts/utils/compute-tags.sh

  • Defaults VERSION=2 (reads from VERSION or JAEGER_VERSION env)
  • Produces v2-style tags by default: jaegertracing/component:X.Y.Z
  • Produces v1-style tags when VERSION=1: jaegertracing/component-v1:X.Y.Z
  • Produces both when INCLUDE_LEGACY_V1=1
# Tag computation examples
VERSION=2 compute-tags.sh jaegertracing/jaeger
# → jaegertracing/jaeger:2.1.0, jaegertracing/jaeger:latest

VERSION=1 compute-tags.sh jaegertracing/jaeger
# → jaegertracing/jaeger-v1:2.1.0, jaegertracing/jaeger-v1:latest

INCLUDE_LEGACY_V1=1 compute-tags.sh jaegertracing/jaeger
# → both v2 and v1 tags

Scope

  • No v1 code paths removed (Milestone 3)
  • No changes to publish/release workflows
  • All v1 functionality accessible via explicit override

Fixes #7497 (Milestone 1)

Original prompt

Create branch chore/reassign-to-v2-defaults and open a pull request that implements Milestone 1 from docs/release/remove-v1-checklist.md: flip build and docker defaults so v2 artifacts are produced by default for most targets while preserving explicit v1 overrides and keeping four exception targets v1 by default (build-all-in-one, build-query, build-collector, build-ingester).

Scope (minimal, non-publishing changes):

  • Flip default version variables and tag computation so v2 is implied by default across Makefiles and helper scripts used by maintainers and CI.
  • Preserve explicit override to v1 via environment variable or Makefile variable (e.g., JAEGER_VERSION=1).
  • Do not remove v1 publish/push code paths (Milestone 3 covers that).
  • Keep four exception targets defaulting to v1: build-all-in-one, build-query, build-collector, build-ingester.

Files to modify (minimal edits):

  1. scripts/makefiles/BuildBinaries.mk
  • Add header comment describing the change and override method.
  • Set JAEGER_VERSION ?= 2 by default.
  • If user requested one of the exception targets in MAKECMDGOALS, default JAEGER_VERSION ?= 1 for those targets.
  • Ensure existing build rules reference $(JAEGER_VERSION) (do not change build logic beyond defaults).
  1. scripts/build/build-upload-a-docker-image.sh
  • Add header comment.
  • Default JAEGER_VERSION to 2 unless overridden by env or --version flag.
  • Parse --version and --dry-run args; allow --include-legacy-v1 to append v1 tags.
  • Use scripts/utils/compute-tags.sh to compute tags (compute-tags will default to v2-first).
  • Keep v1 push code present but executed only when JAEGER_VERSION=1 or INCLUDE_LEGACY_V1=1.
  1. scripts/utils/compute-tags.sh
  • Add header comment.
  • Default VERSION to 2 when unspecified.
  • Produce v2 tags first when VERSION=2; optionally append v1 tags when --include-legacy-v1 or env var is set.
  • When VERSION=1, produce v1 tags only.
  • Preserve output format (one tag per line) for compatibility.

Additional instructions:

  • Commit messages should be: "chore(release): reassign build and docker targets to use v2 by default (Milestone 1)"
  • Base branch: main
  • PR title: chore(release): reassign build and docker targets to use v2 by default
  • PR body must include: short description, list of changed files with explanation, acceptance criteria, test plan (as in docs/release/remove-v1-checklist.md Milestone 1), and requested reviewers @yurishkuro and @jaegertracing/ci.
  • Keep changes minimal and easily reversible. Do not modify release/publish automation that is required to produce v1 artifacts.

Testing instructions to include in PR body:

  1. Checkout branch and run representative make targets (e.g., make build-linux-amd64, make image) and confirm produced artifacts/tags are v2 by default.
  2. Verify override: JAEGER_VERSION=1 make produces v1 artifacts.
  3. Dry-run docker builder: ./scripts/build/build-upload-a-docker-image.sh --dry-run (or equivalent) and confirm v2 tags are computed first.
  4. Direct test: ./scripts/utils/compute-tags.sh --version 2 --branch main => v2 tags first.
  5. Request a staging CI run for convenience flows to validate no default v1 builds.

Please create the branch, commit the minimal edits, push, and open the PR. Include the PR URL in the response.

This pull request was created as a result of the following prompt from Copilot chat.

Create branch chore/reassign-to-v2-defaults and open a pull request that implements Milestone 1 from docs/release/remove-v1-checklist.md: flip build and docker defaults so v2 artifacts are produced by default for most targets while preserving explicit v1 overrides and keeping four exception targets v1 by default (build-all-in-one, build-query, build-collector, build-ingester).

Scope (minimal, non-publishing changes):

  • Flip default version variables and tag computation so v2 is implied by default across Makefiles and helper scripts used by maintainers and CI.
  • Preserve explicit override to v1 via environment variable or Makefile variable (e.g., JAEGER_VERSION=1).
  • Do not remove v1 publish/push code paths (Milestone 3 covers that).
  • Keep four exception targets defaulting to v1: build-all-in-one, build-query, build-collector, build-ingester.

Files to modify (minimal edits):

  1. scripts/makefiles/BuildBinaries.mk
  • Add header comment describing the change and override method.
  • Set JAEGER_VERSION ?= 2 by default.
  • If user requested one of the exception targets in MAKECMDGOALS, default JAEGER_VERSION ?= 1 for those targets.
  • Ensure existing build rules reference $(JAEGER_VERSION) (do not change build logic beyond defaults).
  1. scripts/build/build-upload-a-docker-image.sh
  • Add header comment.
  • Default JAEGER_VERSION to 2 unless overridden by env or --version flag.
  • Parse --version and --dry-run args; allow --include-legacy-v1 to append v1 tags.
  • Use scripts/utils/compute-tags.sh to compute tags (compute-tags will default to v2-first).
  • Keep v1 push code present but executed only when JAEGER_VERSION=1 or INCLUDE_LEGACY_V1=1.
  1. scripts/utils/compute-tags.sh
  • Add header comment.
  • Default VERSION to 2 when unspecified.
  • Produce v2 tags first when VERSION=2; optionally append v1 tags when --include-legacy-v1 or env var is set.
  • When VERSION=1, produce v1 tags only.
  • Preserve output format (one tag per line) for compatibility.

Additional instructions:

  • Commit messages should be: "chore(release): reassign build and docker targets to use v2 by default (Milestone 1)"
  • Base branch: main
  • PR title: chore(release): reassign build and docker targets to use v2 by default
  • PR body must include: short description, list of changed files with explanation, acceptance criteria, test plan (as in docs/release/remove-v1-checklist.md Milestone 1), and requested reviewers @yurishkuro and @jaegertracing/ci.
  • Keep changes minimal and easily reversible. Do not modify release/publish automation that is required to produce v1 artifacts.

Testing instructions to include in PR body:

  1. Checkout branch and run representative make targets (e.g., make build-linux-amd64, make image) and confirm produced artifacts/tags are v2 by default.
  2. Verify override: JAEGER_VERSION=1 make produces v1 artifacts.
  3. Dry-run docker builder: ./scripts/build/build-upload-a-docker-image.sh --dry-run (or equivalent) and confirm v2 tags are computed first.
  4. Direct test: ./scripts/utils/compute-tags.sh --version 2 --branch main => v2 tags first.
  5. Request a staging CI run for convenience flows to validate no default v1 builds.

Please create the branch, commit the minimal edits, push, and open the PR. Include the PR URL in the response.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Implement Milestone 1 to flip build defaults to v2 chore(release): flip build and docker defaults to v2 (Milestone 1) Nov 12, 2025
Copilot AI requested a review from yurishkuro November 12, 2025 19:45
Copilot finished work on behalf of yurishkuro November 12, 2025 19:45
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.

[Feature]: Upgrade release process to v2 only

2 participants