Opened 15 years ago
Last modified 13 years ago
#410 new defect
Add ability to ignore build
Reported by: | wbell | Owned by: | cmlenz |
---|---|---|---|
Priority: | major | Milestone: | 0.6.1 |
Component: | General | Version: | 0.5.3 |
Keywords: | Cc: | felix.schwarz@…, techtonik@… | |
Operating System: | BSD |
Description
There should be a function to mark a build as ignored-- that it shouldn't be built. Every once in a while, we get a build that we know won't build (either it'll get stuck or we don't want to waste the resources on a build.) Right now, we hand-edit the database to mark these builds as failed.
Attachments (1)
Change History (13)
comment:1 Changed 15 years ago by osimons
comment:2 Changed 15 years ago by wbell
Not really-- #380 concerns what happens when a build is running and won't stop. This ticket is a request to make it so that certain builds don't get built at all.
comment:3 Changed 15 years ago by osimons
- Milestone changed from 0.6 to 0.6.1
comment:4 Changed 15 years ago by Felix Schwarz <felix.schwarz@…>
- Cc felix.schwarz@… added
comment:5 Changed 13 years ago by osimons
I've added a simple patch that just allows to fail a pending build. What is missing is a way to actually reach pending builds to fail them - current patch assumes that the build number is known and that the URL is manually entered to access the empty build directly. Then the button will be available.
Options:
- Leave it as is. It is a rare need, and for problematic builds the ID will be known anyway. Manually accessing it seems a fair precaution against random usage, and leaves its use in the hands of 'power users'.
- 'Invalidate' button could just redirect to same empty build page instead of back to the config overview. Then the 'Fail' button would be immediately visible.
- Try to get the list of pending builds into the template, and redo much of the config display logic to also list build ID of pending builds if they exist. This is not an easy task.
Missing: A few simple unit tests to verify the feature.
comment:6 Changed 13 years ago by fbrettschneider@…
What is the set of build states? Your patch uses build.status = Build.FAILURE, maybe rather use build.status = Build.SKIPPED
comment:7 Changed 13 years ago by osimons
They are just constants defined on the Build class - easier to read verbose constants than single letters:
# Build status codes PENDING = 'P' IN_PROGRESS = 'I' SUCCESS = 'S' FAILURE = 'F'
Adding a new SKIPPED or IGNORED or whatever, requires that the full stack of code is made aware of this new possible status and its meaning. How should it be displayed? How would it affect the success/failure rate of graphs? What color to use when rendering it in overview? So many details...
Personally I think failing the build is quite appropriate for the use case, but I also found an old patch in my patch queue for this ticket that started the work of adding a new status code (IGNORED). Such a change quickly involved so many changes to so many files, that I simply put it on hold: It just wasn't worth it all the work for what is essentially not all that valuable.
comment:8 Changed 13 years ago by anonymous
yes, better just set links to appropriate tickets (e.g. #669)
comment:9 Changed 13 years ago by olaf.meeuwissen@…
Just had a quick look at the patch. Looks mostly okay to my untrained Python eyes. Only one thing struck me as my use case is the one where a build is IN_PROGRESS already. From the code, it seems that the "Fail build" button will not be available then. Is that right? If so, my use case is not addressed by this patch.
comment:10 Changed 13 years ago by osimons
You'd need to invalidate an IN_PROGRESS build. Then you can either try to build it again, or just mark it as failed. At least that it what I figured was the natural flow.
comment:11 Changed 13 years ago by olaf.meeuwissen@…
Now why didn't I think of that? Flagging caffeine level?
Thanks for the cluebat.
comment:12 Changed 13 years ago by anatoly techtonik <techtonik@…>
- Cc techtonik@… added
Duplicate of #380?