Skip to content
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

Fix parsing of Cromwell tasks to accommodate reattempted tasks #695

Merged
merged 1 commit into from
May 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Tes/TaskSubmitters/CromwellTaskSubmitter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ public partial class CromwellTaskSubmitter() : TaskSubmitter(SubmitterName)
public const string SubmitterName = "cromwell";

// Parses out the task and shard along with its workflow name & id from the execution path. Note that is expected to be the most deeply nested workflow.
[GeneratedRegex("/*?/(.+)/([^/]+)/([0-9A-Fa-f]{8}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{12})/call-([^/]+)(?:/shard-([^/]+))?/execution/rc", RegexOptions.Singleline)]
[GeneratedRegex("/*?/(.+)/([^/]+)/([0-9A-Fa-f]{8}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{12})/call-([^/]+)(?:/shard-([^/]+))?(?:/attempt-([^/]+))?/execution/rc", RegexOptions.Singleline)]
// examples: /cromwell-executions/test/daf1a044-d741-4db9-8eb5-d6fd0519b1f1/call-hello/execution/rc
// examples: /cromwell-executions/test/daf1a044-d741-4db9-8eb5-d6fd0519b1f1/call-hello/test-subworkflow/b5227f73-f6e8-43be-8b18-520b1fd789b6/call-subworkflow/shard-8/execution/rc
// examples: /cromwell-executions/test/daf1a044-d741-4db9-8eb5-d6fd0519b1f1/call-hello/test-subworkflow/b5227f73-f6e8-43be-8b18-520b1fd789b6/call-subworkflow/shard-8/attempt-2/execution/rc
private static partial Regex CromwellPathRegex();

// Parses the task instance name from the description
Expand Down Expand Up @@ -91,7 +92,7 @@ private static bool IsCromwellCommandScript(TesInput inputFile) =>
// match.Groups[4] <= task name
// match.Groups[5] <= shard, if present

if (match.Success && match.Captures.Count == 1 && match.Groups.Count == 6)
if (match.Success && match.Captures.Count == 1 && match.Groups.Count == 7)
{
var workflowName = path[2];
var workflowId = path[3]; // This is how we set WorkflowId before making this pre-submitter determinable
Expand Down
Loading