-
Notifications
You must be signed in to change notification settings - Fork 155
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
fix: Faulty parsing of customized image's tag_set
#3028
base: main
Are you sure you want to change the base?
Conversation
tag_set
Let’s avoid embedding special keywords or gimmicks directly into the parsing logic. |
@@ -312,6 +312,10 @@ def __init__(self, tags: Iterable[str], value: Optional[str] = None) -> None: | |||
self._data = dict() | |||
rx = type(self)._rx_ver | |||
for tag in tags: | |||
if re.match(r"^customized_[0-9a-fA-F]{32}$", tag): | |||
self._data["bai_customized_image_tag"] = tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't you remove customized_
from tag
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this PR, I mappped the tag itself to the special keyword bai_customized_image_tag
.
If we’re only mapping the UUID of the custom image, it might be better to rename the keyword to something like bai_customized_image_id
.
Fixed incorrect
tag_set
parsing of customized images generated via the session commit introduced in PR #1909.Before & After
For example, in the case of the following image, the
tag_set
data of the parsing result is updated as shown below.Image canonical:
registry.gitlab.com/project/img_name:3.9-ubuntu20.04-customized_ecab90f3618b4ad394c737200c7f5a44
Before
After
Checklist: (if applicable)