Skip to content

[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

Open
wants to merge 3 commits into
base: 18.0
Choose a base branch
from

Conversation

Williambraecky
Copy link
Contributor

No description provided.

The file does not contain any templates anymore.
@Williambraecky Williambraecky changed the title [IMP] runbot: docker file variants [IMP] runbot: dockerfile variants Mar 31, 2025
@C3POdoo C3POdoo requested a review from a team March 31, 2025 10:51
@Williambraecky Williambraecky force-pushed the 18.0-docker-variants-wbr branch 2 times, most recently from 84f0f00 to be9d43e Compare March 31, 2025 11:40
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())
Copy link
Contributor

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)

@Williambraecky Williambraecky force-pushed the 18.0-docker-variants-wbr branch from be9d43e to f80588b Compare March 31, 2025 15:33
UPDATE runbot_dockerfile
SET name=REGEXP_REPLACE(
REPLACE(name, '.', '_'),
'[ /:\(\)\[\]]', '', 'g'
Copy link
Contributor

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 _)

Copy link
Contributor Author

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.

@Williambraecky Williambraecky force-pushed the 18.0-docker-variants-wbr branch from f80588b to 3c35165 Compare April 1, 2025 07:59
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.
@Williambraecky Williambraecky force-pushed the 18.0-docker-variants-wbr branch from 3c35165 to 074839c Compare April 1, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants