chore(release): reassign build and docker targets to use v2 by default (Milestone 1) #7645
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.mkJAEGER_VERSION ?= 2by defaultbuild-all-in-one,build-query,build-collector,build-ingesterJAEGER_VERSION=1 make <target>scripts/build/build-upload-a-docker-image.sh--version,--dry-run,--include-legacy-v1flagsJAEGER_VERSION=2compute-tags.shscripts/utils/compute-tags.sh--version,--branch,--include-legacy-v1argumentsVERSION=2Notes
VERSION,INCLUDE_LEGACY_V1, andDRY_RUNparameters are infrastructure for future milestones when v1/v2 image differentiation is fully implementedOriginal prompt
Update branch
copilot/update-default-version-to-v2with 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):
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 ---
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.
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
PR metadata
Testing steps to include in PR description (copy into PR body):
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.
💡 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.