-
Notifications
You must be signed in to change notification settings - Fork 135
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
[IMP] runbot: reinforce version #852
base: 17.0
Are you sure you want to change the base?
Conversation
runbot/views/bundle_views.xml
Outdated
@@ -50,7 +50,8 @@ | |||
<field name="project_id"/> | |||
<field name="sticky" readonly="0"/> | |||
<field name="to_upgrade" readonly="0"/> | |||
<field name="is_base"/> | |||
<field name="match_base" invisible="1"/> | |||
<field name="is_base" invisible="not match_base"/> |
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.
I would put it visible but readonly in all cases
This is a useful visual information but it makes no sense to modify it most of the time.
When updating a bundle and changing the is_base field to True, it creates a new version based on the bundle name. This can potentially breaks builds and moreover, it can breaks the whole runbot when a duplicate version name is created. With this commit: - a constraint on the version name uniqueness is added - the is_base field is now readonky - a version cannot be created by the compute version if the version name does not match the above mentioned regular expression
fca01cf
to
e07fcd6
Compare
13e3d9d
to
e7d1cc9
Compare
@@ -25,6 +25,10 @@ class Version(models.Model): | |||
|
|||
dockerfile_id = fields.Many2one('runbot.dockerfile', default=lambda self: self.env.ref('runbot.docker_default', raise_if_not_found=False)) | |||
|
|||
_sql_constraints = [ |
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.
we should actually ensure number uniqueness too
When updating a bundle and changing the is_base field to True, it creates a new version based on the bundle name. This can potentially breaks builds and moreover, it can breaks the whole runbot when a duplicate version name is created.
With this commit: