-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
De-duplicate builds #7123
De-duplicate builds #7123
Changes from 4 commits
e76a948
95350aa
030b0a5
9fcf10d
141bbf5
6ce7617
2802da9
e9767f1
30dde39
8ed21f6
954e004
190a628
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.12 on 2020-06-03 15:17 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('builds', '0022_migrate_protected_versions'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='build', | ||
name='status_code', | ||
field=models.BooleanField(blank=True, default=None, null=True, verbose_name='Status code'), | ||
), | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,8 @@ class BuildMaxConcurrencyError(BuildEnvironmentError): | |
|
||
class DuplicatedBuildError(BuildEnvironmentError): | ||
message = ugettext_noop('Duplicated build.') | ||
exit_code = 1 | ||
status_code = 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be a constant probably, and something other than 0? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because 0 to me means "normal" status -- we want a status that represents the issue of "duplicated build", which should be assigned a specific number. |
||
|
||
|
||
class BuildEnvironmentWarning(BuildEnvironmentException): | ||
|
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 wonder if we should make this nullable and set it to
None
here? It didn't succeed or fail, so it kinda makes sense.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.
It makes sense to me. However, I don't think we can change it now without changing the UI (knockout code) that renders in the frontend; which I'm not sure if we want to touch at this point.
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.
Yea, I just worry this will break the badge display.