Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Implements Milestone 1 from docs/release/remove-v1-checklist.md: flips default build/docker targets to v2 while preserving v1 for specific exception targets and maintaining override capability.

Changes

scripts/makefiles/BuildBinaries.mk

  • Sets JAEGER_VERSION ?= 2 by default
  • Exception targets default to v1: build-all-in-one, build-query, build-collector, build-ingester
  • Override: JAEGER_VERSION=1 make <target>
ifneq ($(filter $(MAKECMDGOALS),build-all-in-one build-query build-collector build-ingester),)
  JAEGER_VERSION ?= 1
else
  JAEGER_VERSION ?= 2
endif

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

  • Parses --version, --dry-run, --include-legacy-v1 flags
  • Defaults to JAEGER_VERSION=2
  • Passes version parameters to compute-tags.sh

scripts/utils/compute-tags.sh

  • Accepts --version, --branch, --include-legacy-v1 arguments
  • Defaults VERSION=2
  • Maintains backward compatibility with positional image name argument

Notes

  • VERSION, INCLUDE_LEGACY_V1, and DRY_RUN parameters are infrastructure for future milestones when v1/v2 image differentiation is fully implemented
  • No changes to release/publish automation—v1 artifacts remain publishable
  • Developer/CI workflows now default to v2
Original prompt

Update branch copilot/update-default-version-to-v2 with minimal changes implementing Milestone 1 from docs/release/remove-v1-checklist.md. The branch may already exist; create or update it and push the following changes, committing with message: "chore(release): reassign build and docker targets to use v2 by default (Milestone 1)". Do not remove any v1 publish logic; only flip defaults for developer/CI convenience flows.

Files & exact changes (minimal edits):

  1. scripts/makefiles/BuildBinaries.mk
  • Add header comment explaining default flip and how to override.
  • Set JAEGER_VERSION ?= 2 by default.
  • If MAKECMDGOALS contains any of: build-all-in-one build-query build-collector build-ingester then default JAEGER_VERSION ?= 1 for those exception targets.
  • Do not modify other build logic; ensure existing rules reference $(JAEGER_VERSION).

Replace or insert at top of file the following snippet (keep rest unchanged):

Default to v2 for most developer/CI convenience targets.

To override to v1 explicitly, set JAEGER_VERSION=1 on the command line.

Exceptions (remain v1 by default): build-all-in-one, build-query, build-collector, build-ingester.

Milestone 1 change: v2 is now the default for build targets unless an explicit override

or an exception target is requested. This keeps release/publish automation intact while

making the developer/CI convenience flows v2-first.

--- Begin minimal change ---

Default to v2 unless caller explicitly sets JAEGER_VERSION

JAEGER_VERSION ?= 2

If any of the explicit v1-only convenience targets are being requested,

default those to v1 unless the caller explicitly set JAEGER_VERSION.

ifneq ($(filter $(MAKECMDGOALS),build-all-in-one build-query build-collector build-ingester),)
JAEGER_VERSION ?= 1
endif

--- End minimal change ---

  1. scripts/build/build-upload-a-docker-image.sh
  • Add header comment.
  • Parse --version and --dry-run and --include-legacy-v1 flags.
  • Default JAEGER_VERSION to 2 when unspecified.
  • Call scripts/utils/compute-tags.sh --version ${JAEGER_VERSION} (and pass --include-legacy-v1 if requested).
  • Keep rest of build/push logic unchanged; only default selection changes.

Replace or update the script to include the following logic near the top (keep rest unchanged):

DRY_RUN=0
JAEGER_VERSION="${JAEGER_VERSION:-}"
ARGS=""
INCLUDE_LEGACY_V1=0
while [[ $# -gt 0 ]]; do
case "$1" in
--version)
shift
JAEGER_VERSION="$1"
shift
;;
--dry-run)
DRY_RUN=1
shift
;;
--include-legacy-v1)
INCLUDE_LEGACY_V1=1
shift
;;
*)
ARGS="${ARGS} $1"
shift
;;
esac
done

if [[ -z "${JAEGER_VERSION:-}" ]]; then
JAEGER_VERSION=2
fi

COMPUTE_TAGS_CMD="./scripts/utils/compute-tags.sh --version ${JAEGER_VERSION}"
if [[ "${INCLUDE_LEGACY_V1:-0}" -eq 1 ]]; then
COMPUTE_TAGS_CMD="${COMPUTE_TAGS_CMD} --include-legacy-v1"
fi
TAGS="$(eval ${COMPUTE_TAGS_CMD})"

Use $TAGS in existing build/push logic. Preserve v1 push code paths but only exercise

them when JAEGER_VERSION=1 or INCLUDE_LEGACY_V1=1.

  1. scripts/utils/compute-tags.sh
  • Add header comment.
  • Default VERSION to 2 when unspecified.
  • Support --include-legacy-v1 to append v1 tags after v2 tags.
  • Produce one tag per line as before.

Replace or update top of script with the following logic (keep rest unchanged):

VERSION=""
BRANCH=""
INCLUDE_LEGACY_V1=0
while [[ $# -gt 0 ]]; do
case "$1" in
--version)
shift
VERSION="$1"
shift
;;
--branch)
shift
BRANCH="$1"
shift
;;
--include-legacy-v1)
INCLUDE_LEGACY_V1=1
shift
;;
*)
shift
;;
esac
done

if [[ -z "${VERSION}" ]]; then
VERSION="2"
fi
BRANCH="${BRANCH:-main}"

Build tags array: v2 tags first when VERSION=2; append v1 tags only if requested.

Commit message

  • chore(release): reassign build and docker targets to use v2 by default (Milestone 1)

PR metadata

  • Branch: copilot/update-default-version-to-v2 (update existing or create it)
  • Base: main
  • PR title: chore(release): reassign build and docker targets to use v2 by default
  • Requested reviewers: @yurishkuro, @jaegertracing/ci

Testing steps to include in PR description (copy into PR body):

  1. Checkout branch and run representative make targets (e.g., make build-linux-amd64) 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 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.

Notes: keep changes minimal and reversible; do not remove v1 publish code in this PR. If copilot/update-default-version-to-v2 already exists, update it with these commits and push; if not, create branch from main and push ...

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

Update branch copilot/update-default-version-to-v2 with minimal changes implementing Milestone 1 from docs/release/remove-v1-checklist.md. The branch may already exist; create or update it and push the following changes, committing with message: "chore(release): reassign build and docker targets to use v2 by default (Milestone 1)". Do not remove any v1 publish logic; only flip defaults for developer/CI convenience flows.

Files & exact changes (minimal edits):

  1. scripts/makefiles/BuildBinaries.mk
  • Add header comment explaining default flip and how to override.
  • Set JAEGER_VERSION ?= 2 by default.
  • If MAKECMDGOALS contains any of: build-all-in-one build-query build-collector build-ingester then default JAEGER_VERSION ?= 1 for those exception targets.
  • Do not modify other build logic; ensure existing rules reference $(JAEGER_VERSION).

Replace or insert at top of file the following snippet (keep rest unchanged):

Default to v2 for most developer/CI convenience targets.

To override to v1 explicitly, set JAEGER_VERSION=1 on the command line.

Exceptions (remain v1 by default): build-all-in-one, build-query, build-collector, build-ingester.

Milestone 1 change: v2 is now the default for build targets unless an explicit override

or an exception target is requested. This keeps release/publish automation intact while

making the developer/CI convenience flows v2-first.

--- Begin minimal change ---

Default to v2 unless caller explicitly sets JAEGER_VERSION

JAEGER_VERSION ?= 2

If any of the explicit v1-only convenience targets are being requested,

default those to v1 unless the caller explicitly set JAEGER_VERSION.

ifneq ($(filter $(MAKECMDGOALS),build-all-in-one build-query build-collector build-ingester),)
JAEGER_VERSION ?= 1
endif

--- End minimal change ---

  1. scripts/build/build-upload-a-docker-image.sh
  • Add header comment.
  • Parse --version and --dry-run and --include-legacy-v1 flags.
  • Default JAEGER_VERSION to 2 when unspecified.
  • Call scripts/utils/compute-tags.sh --version ${JAEGER_VERSION} (and pass --include-legacy-v1 if requested).
  • Keep rest of build/push logic unchanged; only default selection changes.

Replace or update the script to include the following logic near the top (keep rest unchanged):

DRY_RUN=0
JAEGER_VERSION="${JAEGER_VERSION:-}"
ARGS=""
INCLUDE_LEGACY_V1=0
while [[ $# -gt 0 ]]; do
case "$1" in
--version)
shift
JAEGER_VERSION="$1"
shift
;;
--dry-run)
DRY_RUN=1
shift
;;
--include-legacy-v1)
INCLUDE_LEGACY_V1=1
shift
;;
*)
ARGS="${ARGS} $1"
shift
;;
esac
done

if [[ -z "${JAEGER_VERSION:-}" ]]; then
JAEGER_VERSION=2
fi

COMPUTE_TAGS_CMD="./scripts/utils/compute-tags.sh --version ${JAEGER_VERSION}"
if [[ "${INCLUDE_LEGACY_V1:-0}" -eq 1 ]]; then
COMPUTE_TAGS_CMD="${COMPUTE_TAGS_CMD} --include-legacy-v1"
fi
TAGS="$(eval ${COMPUTE_TAGS_CMD})"

Use $TAGS in existing build/push logic. Preserve v1 push code paths but only exercise

them when JAEGER_VERSION=1 or INCLUDE_LEGACY_V1=1.

  1. scripts/utils/compute-tags.sh
  • Add header comment.
  • Default VERSION to 2 when unspecified.
  • Support --include-legacy-v1 to append v1 tags after v2 tags.
  • Produce one tag per line as before.

Replace or update top of script with the following logic (keep rest unchanged):

VERSION=""
BRANCH=""
INCLUDE_LEGACY_V1=0
while [[ $# -gt 0 ]]; do
case "$1" in
--version)
shift
VERSION="$1"
shift
;;
--branch)
shift
BRANCH="$1"
shift
;;
--include-legacy-v1)
INCLUDE_LEGACY_V1=1
shift
;;
*)
shift
;;
esac
done

if [[ -z "${VERSION}" ]]; then
VERSION="2"
fi
BRANCH="${BRANCH:-main}"

Build tags array: v2 tags first when VERSION=2; append v1 tags only if requested.

Commit message

  • chore(release): reassign build and docker targets to use v2 by default (Milestone 1)

PR metadata

  • Branch: copilot/update-default-version-to-v2 (update existing or create it)
  • Base: main
  • PR title: chore(release): reassign build and docker targets to use v2 by default
  • Requested reviewers: @yurishkuro, @jaegertracing/ci

Testing steps to include in PR description (copy into PR body):

  1. Checkout branch and run representative make targets (e.g., make build-linux-amd64) 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 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.

Notes: keep changes minimal and reversible; do not remove v1 publish code in this PR. If copilot/update-default-version-to-v2 already exists, update it with these commits and push; if not, create branch from main and push commits. Open or update the PR 7642 to point to this branch if possible; if updating an existing PR is not possible automatically, create a new PR and mention PR #7642 in the description. Include the PR URL in the response.


💡 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.

Copilot AI changed the title [WIP] Update default version to v2 for build and docker targets chore(release): reassign build and docker targets to use v2 by default (Milestone 1) Nov 12, 2025
Copilot AI requested a review from yurishkuro November 12, 2025 19:54
Copilot finished work on behalf of yurishkuro November 12, 2025 19:54
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.

2 participants