Skip to content

Commit

Permalink
fix(artifacts): Fix successful filter for find artifacts (#2780)
Browse files Browse the repository at this point in the history
When filtering to only include successful executions, the
front-end sets the flag 'successful' in the stage config.
Orca is incorrectly looking for a value 'succeeded', and
thus ignores the value that was set on the front-end.

While 'succeeded' is slightly better named as it matches the
execution status, changing this on the backend means that
existing pipelines will work automatically.  (Whereas changing
it on the front-end would require either a pipeline migrator
or for anyone affected to re-configure the stage.)

To avoid breaking anyone who manually edited their stage config to
set 'succeeded' because that's what the back-end was looking for,
continue to accept that in the stage config.
  • Loading branch information
ezimanyi authored Mar 22, 2019
1 parent bc3af89 commit e6bad8e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,18 @@ public TaskResult execute(@Nonnull Stage stage) {

@Data
private static class ExecutionOptions {
// Accept either 'succeeded' or 'successful' in the stage config. The front-end sets 'successful', but due to a bug
// this class was only looking for 'succeeded'. Fix this by accepting 'successful' but to avoid breaking anyone who
// discovered this bug and manually edited their stage to set 'succeeded', continue to accept 'succeeded'.
boolean succeeded;
boolean successful;

boolean terminal;
boolean running;

ExecutionCriteria toCriteria() {
List<String> statuses = new ArrayList<>();
if (succeeded) {
if (succeeded || successful) {
statuses.add("SUCCEEDED");
}

Expand Down

0 comments on commit e6bad8e

Please sign in to comment.