Skip to content

DockerV1: skip redundant tag and bump task version#22199

Draft
v-nairin wants to merge 4 commits into
masterfrom
users/v-nairin/docker-v1-skip-redundant-tag
Draft

DockerV1: skip redundant tag and bump task version#22199
v-nairin wants to merge 4 commits into
masterfrom
users/v-nairin/docker-v1-skip-redundant-tag

Conversation

@v-nairin
Copy link
Copy Markdown

@v-nairin v-nairin commented May 22, 2026

Context
This PR addresses a DockerV1 behavior issue where the tag command could be invoked even when source and target resolve to the same image name.
Related issue: #21974
Closes #21974

Task Name
DockerV1

Description
Added a guard to skip the tag operation when source and target image names are identical.
Added a debug log message for the skipped no-op tag scenario.
Bumped task version for sprint alignment:
Major: 1
Minor: 275
Patch: 1
Updated version consistently in both task metadata files.
Risk Assessment (Low / Medium / High)
Low

Reasoning:

Change is narrowly scoped to tag flow behavior.
Existing behavior is preserved for all non-identical source/target cases.
Prevents unnecessary command execution in a clear no-op scenario.
Build and L0 tests passed.
Change Behind Feature Flag (Yes / No)
No

Reasoning:

This is a correctness and efficiency fix for an existing path.
Scope is small and does not introduce a new user-facing feature toggle scenario.
Tech Design / Approach
Small defensive check added before constructing/executing tag arguments.
If resolved source and target image strings are equal, operation returns early.
No architectural changes, no new dependencies, and no protocol/API contract changes.
Documentation Changes Required (Yes/No)
No

Reasoning:

No new input/output contract or user workflow introduced.
Existing task usage remains unchanged.
Unit Tests Added or Updated (Yes / No)
No

Reasoning:

Existing L0 suite already covers task behavior sufficiently for this scoped change, and it passed.
Additional Testing Performed
Focused build: node make.js build --task DockerV1 --BypassNpmAudit
Focused L0 tests: node make.js test --task DockerV1 --suite L0
Result: 35 passing, 0 failing
Logging Added/Updated (Yes/No)
Yes

Reasoning:

Added debug-level logging for skipped redundant tag operation.
No sensitive information introduced beyond resolved image reference already used in task flow.
Telemetry Added/Updated (Yes/No)
No

Reasoning:

Change does not require new telemetry for this scoped fix.
Rollback Scenario and Process (Yes/No)
Yes

Rollback process:

Revert this PR commit.
Rebuild DockerV1.
Re-run DockerV1 L0 test suite to confirm restoration of previous behavior.
Dependency Impact Assessed and Regression Tested (Yes/No)
Yes

Reasoning:

No new package dependencies added for this functional change.
Regression checked via focused build and DockerV1 L0 suite.
Checklist
Related issue linked (if applicable)
Task version was bumped — see versioning guide
Verified the task behaves as expected

@v-abhishera
Copy link
Copy Markdown
Contributor

@microsoft-github-policy-service agree company="Microsoft"

@v-nairin
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Microsoft"

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.

[BUG]: Docker@1 - Docker v1 Tag image command retags existing image

2 participants