Skip to content

Commit

Permalink
GP-3353 More informative error messages for 'input files have not bee…
Browse files Browse the repository at this point in the history
…n converted' migration actions
  • Loading branch information
callunity committed May 19, 2022
1 parent 25d55f1 commit 17c9a6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

* Add more informative text to 'input files not yet converted' WAITING migration actions
* Fix bug where dumpers are not cleaned up
* Doc improvement to clarify how ties are handled in `Pick Max`/`Pick Min`
* Use the aggregate skip status from cerberus to categorize cerberus_fp records
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,27 @@ public synchronized ActionState perform(ActionServices actionServices) {
+ ")");

final var arrayNode = MAPPER.createArrayNode();
List<String> foundFileIds = new ArrayList<>();
var count = 0;
while (rs.next()) {
String hashId = rs.getString("hash_id");
var node = MAPPER.createObjectNode();
node.put("type", "INTERNAL");
node.putArray("contents").add("vidarr:_/file/" + hashId);
arrayNode.add(node);
foundFileIds.add("vidarr:_/file/" + hashId);
count++;
}
if (count != inputFiles.size()) {
this.errors = List.of("Input files have not been converted");
this.errors = new ArrayList<>();
errors.add(
String.format(
"Input files have not been converted for workflow run %i", workflowRunSWID));
errors.add(
String.format(
"Need entries for file SWIDs %s but only found files %s in vidarr database",
inputFiles.stream().map(String::valueOf).collect(Collectors.joining(", ")),
foundFileIds.stream().collect(Collectors.joining(", "))));
return ActionState.WAITING;
}

Expand Down

0 comments on commit 17c9a6e

Please sign in to comment.