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

Adds long PAN functionality to send-pan task #3885

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adtisdal-ASDC
Copy link
Contributor

@adtisdal-ASDC adtisdal-ASDC commented Dec 16, 2024

Summary: Adds Long PAN

Changes

  • Adds long Pan functionality
  • Adds panType variable for configuring

PR Checklist

  • Update CHANGELOG
  • Unit tests
  • Ad-hoc testing - Deploy changes and test manually
  • Integration tests

@Jkovarik
Copy link
Member

Thanks for the contribution @adtisdal-ASDC - I've flagged the PR and let the team know it's here.

@@ -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;
Copy link
Contributor Author

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

Copy link
Contributor Author

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;
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants