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

WX-1339 Make throwExceptionOnExecuteError false for PAPI aborts #7245

Merged
merged 3 commits into from
Nov 2, 2023

Conversation

aednichols
Copy link
Collaborator

Adding setThrowExceptionOnExecuteError(false) call causes execution flow to go into the path we want that inspects the error more precisely in handleGoogleError.

I tested this by deliberately breaking the request so it always gets a 400 back. With the existing code, the log looks just like what we see in prod:

2023-11-01 19:54:12 cromwell-system-akka.dispatchers.backend-dispatcher-91 WARN  - PAPI request worker had 2 failures making 5 requests: 
400 Bad Request
POST https://lifesciences.googleapis.com/v2beta/projects/1005074806481/locations/us-central1/operations/6175597626605185257:cancel
{
  "code": 400,
  "errors": [
    {
      "domain": "global",
      "message": "Invalid JSON payload received. Unexpected token.\nasdf\n^ Payload appears to be compressed. It may either be corrupt or uncompressed data may be too large for the server to handle.",
      "reason": "parseError"
    }
  ],
  "message": "Invalid JSON payload received. Unexpected token.\nasdf\n^ Payload appears to be compressed. It may either be corrupt or uncompressed data may be too large for the server to handle.",
  "status": "INVALID_ARGUMENT"
}
Screenshot 2023-11-01 at 15 43 59

Changing throwExceptionOnExecuteError to false, we see that we no longer throw an exception and we get the expected "no longer running" message in the log!

2023-11-01 19:57:48 cromwell-system-akka.dispatchers.backend-dispatcher-162 INFO  - PAPI declined to abort job projects/1005074806481/locations/us-central1/operations/5250112889402522122 in workflow b70eafc9-66a7-4b22-b9bc-621c22b5a4ed, most likely because it is no longer running. Marking as finished. Message: Invalid JSON payload received. Unexpected token.
asdf
^ Payload appears to be compressed. It may either be corrupt or uncompressed data may be too large for the server to handle.
Screenshot 2023-11-01 at 15 45 48

@aednichols aednichols requested a review from a team as a code owner November 1, 2023 20:00
Copy link
Contributor

@jgainerdewar jgainerdewar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Contributor

@THWiseman THWiseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent find, nice work!

@aednichols aednichols merged commit e880371 into develop Nov 2, 2023
33 of 35 checks passed
@aednichols aednichols deleted the aen_wx_1339 branch November 2, 2023 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants