DockerV1: skip redundant tag and bump task version#22199
Draft
v-nairin wants to merge 4 commits into
Draft
Conversation
Contributor
|
@microsoft-github-policy-service agree company="Microsoft" |
Author
|
@microsoft-github-policy-service agree company="Microsoft" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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