-
Notifications
You must be signed in to change notification settings - Fork 107
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
Adds long PAN functionality to send-pan task #3885
base: master
Are you sure you want to change the base?
Conversation
Thanks for the contribution @adtisdal-ASDC - I've flagged the PR and let the team know it's here. |
06cb6fc
to
000067a
Compare
@@ -91,7 +91,7 @@ function buildOutput(event, groupedExecutions) { | |||
|
|||
const parseFailedExecution = (execution) => { | |||
let reason = 'Workflow Failed'; | |||
if (execution.output) reason = JSON.parse(execution.output).exception; | |||
if (execution.error) reason = execution.error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
execution.error
gets the error from the failed ingest granule workflow. The line "ErrorPath": "$.exception.Cause"
has to be added into the WorkflowFailed
step definition for the actual error to propagate. I added it to the README.
https://docs.aws.amazon.com/step-functions/latest/dg/state-fail.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I used ErrorPath
instead of CausePath
since I wasn't 100 percent sure if Cause was being used for something else
|
||
const disposition = (input.failed.length > 0) ? 'FAILED' : 'SUCCESSFUL'; | ||
const pan = pdrHelpers.generateShortPAN(disposition); | ||
let pan; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided on 3 pan types:
- longPan: Only creates long PANs when there's more than one granule, else just a short
- shortPan: Always creates short PANs
- longPanAlways: Always creates long PANs
@@ -17,6 +18,38 @@ function generateShortPAN(disposition) { | |||
); | |||
} | |||
|
|||
async function getGranuleFromExecution(executionArn) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this function for getting some of the granule information from the execution. There could be a better alternative I'm not familiar with
Summary: Adds Long PAN
Changes
PR Checklist