-
Notifications
You must be signed in to change notification settings - Fork 142
[IMP] runbot: dockerfile variants #1118
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
base: 18.0
Are you sure you want to change the base?
Conversation
The file does not contain any templates anymore.
84f0f00
to
be9d43e
Compare
runbot/models/docker.py
Outdated
def _compute_image_tag(self): | ||
for rec in self: | ||
if rec.name: | ||
if rec.parent_id and rec.variant_name: | ||
variant_sub_tag = re.sub(r'[ /:\(\)\[\]]', '', rec.variant_name.lower()) |
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.
Would be simpler to have a constraints on name instead of cleaning it (historical mistake)
be9d43e
to
f80588b
Compare
UPDATE runbot_dockerfile | ||
SET name=REGEXP_REPLACE( | ||
REPLACE(name, '.', '_'), | ||
'[ /:\(\)\[\]]', '', 'g' |
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.
Maybe we could just use the tag ? (still replacing dots by _)
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.
Tbh the query is not complete as we disallow a lot more characters than before, this query takes care of our data mostly.
(only concerns 13.0
and DockerSaas17.2
)
I don't think it's worth doing much more.
f80588b
to
3c35165
Compare
Dockerfile variants are dockerfile that depend on another dockerfile while adding layers, which should not be present in the regular image. Strictly speaking it is the same as creating a new dockerfile with a reference docker layer at the top, except that layer is implicit and will not clutter the docker image. Variants must be unique.
The field was there for historical and migration reasons but is not used any longer and docker layer answer to all the needs we have.
3c35165
to
074839c
Compare
No description provided.