Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the logic of tagging kube container as local latest #14367

Merged
merged 9 commits into from
Mar 30, 2023

Conversation

lixiaoyuner
Copy link
Contributor

@lixiaoyuner lixiaoyuner commented Mar 21, 2023

Why I did it

We found a bug when pilot, the tag function doesn't remove the ACR domain when do tag, it makes the latest tag not work. And in the original tag function, it calls os.system and os.popen which are not recommend, need to refactor.

How I did it

Do a split("/") when get image_rep to fix the acr domain bug
Refactor the tag function code and add test cases

How to verify it

Check whether container images are tagged as latest when in kube mode.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Sorry, something went wrong.

lixiaoyuner and others added 5 commits March 21, 2023 07:48

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…/sonic-buildimage into fix-tag-image-with-acr-issue
@lixiaoyuner lixiaoyuner marked this pull request as ready for review March 21, 2023 08:27
@lixiaoyuner lixiaoyuner changed the title Refine tag kube contaimer as local latest logic Refactor tag kube container as local latest logic Mar 28, 2023
@lixiaoyuner lixiaoyuner changed the title Refactor tag kube container as local latest logic Refactor the logic of tagging kube container as local latest Mar 28, 2023
@losha228 losha228 self-requested a review March 29, 2023 03:35
@yxieca yxieca merged commit f51e5bb into sonic-net:master Mar 30, 2023
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Mar 31, 2023
…et#14367)

Why I did it
We found a bug when pilot, the tag function doesn't remove the ACR domain when do tag, it makes the latest tag not work. And in the original tag function, it calls os.system and os.popen which are not recommend, need to refactor.

How I did it
Do a split("/") when get image_rep to fix the acr domain bug
Refactor the tag function code and add test cases

How to verify it
Check whether container images are tagged as latest when in kube mode.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202205: #14484

mssonicbld pushed a commit that referenced this pull request Apr 3, 2023
Why I did it
We found a bug when pilot, the tag function doesn't remove the ACR domain when do tag, it makes the latest tag not work. And in the original tag function, it calls os.system and os.popen which are not recommend, need to refactor.

How I did it
Do a split("/") when get image_rep to fix the acr domain bug
Refactor the tag function code and add test cases

How to verify it
Check whether container images are tagged as latest when in kube mode.
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Apr 20, 2023
…et#14367)

Why I did it
We found a bug when pilot, the tag function doesn't remove the ACR domain when do tag, it makes the latest tag not work. And in the original tag function, it calls os.system and os.popen which are not recommend, need to refactor.

How I did it
Do a split("/") when get image_rep to fix the acr domain bug
Refactor the tag function code and add test cases

How to verify it
Check whether container images are tagged as latest when in kube mode.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202211: #14764

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants