daemon: only add short cid to aliases for custom networks#47181
Merged
thaJeztah merged 1 commit intomoby:masterfrom Jan 23, 2024
Merged
daemon: only add short cid to aliases for custom networks#47181thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah merged 1 commit intomoby:masterfrom
Conversation
Member
|
I changed the milestone for this one to v26.0.0 (as this PR is for master); can you open a cherry-pick for the v25.0 branch (for v25.0.1) ? |
thaJeztah
approved these changes
Jan 23, 2024
Member
thaJeztah
left a comment
There was a problem hiding this comment.
LGTM
can we have a test for this?
a8001a4 to
9cc48be
Compare
robmry
approved these changes
Jan 23, 2024
thaJeztah
reviewed
Jan 23, 2024
thaJeztah
reviewed
Jan 23, 2024
| skip.If(t, testEnv.DaemonInfo.OSType == "windows") | ||
|
|
||
| ctx := setupTest(t) | ||
| apiClient := request.NewAPIClient(t) |
Member
There was a problem hiding this comment.
double-check; does this test depend on API version, or is this for all versions? Because the code updated is in a branch for specific API versions;
case versions.LessThan(version, "1.45"):
Member
Author
There was a problem hiding this comment.
Prior to v1.45, we did automatically add short cid to network-scoped aliases. That's not the case anymore, thus short cid should still not appear there so I didn't scope this test to a specific API version.
9cc48be to
1f419cb
Compare
This comment was marked as resolved.
This comment was marked as resolved.
thaJeztah
reviewed
Jan 23, 2024
1f419cb to
0587835
Compare
thaJeztah
reviewed
Jan 23, 2024
Prior to 7a9b680, the container short ID was added to the network aliases only for custom networks. However, this logic wasn't preserved in 6a2542d and now the cid is always added to the list of network aliases. This commit reintroduces the old logic. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
0587835 to
9f37672
Compare
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.
Related to:
- What I did
Prior to 7a9b680, the container short ID was added to the network aliases only for custom networks. However, this logic wasn't preserved in 6a2542d and now the cid is always added to the list of network aliases.
This commit reintroduces the old logic.
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)