box / box/ClusterRunner

Queue API response should not include error builds

Open
#385 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
184
Forks
41
PR merge metrics
No merged PRs in 30d

Description

The logic to get the build queue [looks like](https://github.com/box/ClusterRunner/blob/master@{2017-07-10}/app/master/cluster_master.py#L71-L76):
```python
def active_builds(self):
"""
Returns a list of incomplete builds
:rtype: list[Build]
"""
return [build for build in self.builds() if not build.is_finished]
```
The `build.is_finished` property includes the CANCELED state but not the ERROR state. This leads to the `/queue` API returning any build that ever ran that ended in ERROR state.

I'd like to get rid of `build.is_finished` entirely and have calling logic specify exact build states.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.