Skip to content

NCC-29 Adding fixes so that if a dataset is not fully submitted yet, … - #2

Merged
sedv8808 merged 1 commit into
mainfrom
dev/ghactions
Aug 18, 2026
Merged

NCC-29 Adding fixes so that if a dataset is not fully submitted yet, …#2
sedv8808 merged 1 commit into
mainfrom
dev/ghactions

Conversation

@sedv8808

Copy link
Copy Markdown
Contributor

…it can be skipped.

This pull request introduces several improvements to the DOI minting workflow and codebase, focusing on better handling of not-yet-ready datasets, improved error messaging, and enhanced infrastructure automation. The main changes include introducing a new exception to skip datasets that are not ready for DOI minting, surfacing missing required secrets earlier in the deployment process, simplifying notification messages, and exporting subnet information for better automation.

Error handling and workflow robustness:

  • Added a new DatasetNotReady exception in src/neotomadoi/exceptions.py and integrated it into neotomaDOI.mint_doi to skip datasets that have not been submitted yet (i.e., missing submission date), rather than treating them as failures. This ensures that one not-ready dataset does not block the minting process for others. Updated ndbdoi.py to track and report skipped datasets separately from errors. [1] [2] [3] [4] [5] [6] [7] [8]

Deployment and infrastructure improvements:

  • Added a step in .github/workflows/deploy.yml to check for the presence of all required secrets before deployment, providing clear error messages if any are missing, to prevent opaque failures later in the process.
  • Modified the CloudFormation template infrastructure/doi-minter.yaml to export the list of private subnet IDs as a stack output, allowing automation to fetch subnets dynamically instead of relying on secrets. Updated run-minting.yml to use this output. [1] [2] [3]

Notification simplification:

  • Simplified the SNS notification InputTemplate strings in infrastructure/doi-minter.yaml to be single-line messages, avoiding issues with quoted multi-line strings in EventBridge and making notifications clearer. [1] [2]

Copilot AI lite review requested due to automatic review settings August 18, 2026 20:42
@sedv8808
sedv8808 merged commit 167271c into main Aug 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the DOI minting pipeline’s resilience by treating “not yet submitted” datasets as a normal skip condition (instead of a failure), and by making the AWS deployment/run automation more robust and less secret-dependent.

Changes:

  • Introduces DatasetNotReady and raises it from mint_doi() when a dataset has no “Submitted” date, enabling callers to skip those datasets.
  • Updates the CLI runner (ndbdoi.py) to track/report skipped datasets separately from failures.
  • Improves AWS automation: preflight validation for required deploy secrets, exports private subnet IDs from CloudFormation, and consumes them in the manual run workflow; simplifies EventBridge → SNS notification templates.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/neotomadoi/neotomaDOI.py Raises DatasetNotReady when submission date is missing to skip not-yet-ready datasets.
src/neotomadoi/exceptions.py Adds DatasetNotReady exception type for “expected/transient” skip conditions.
src/neotomadoi/__init__.py Re-exports DatasetNotReady for external callers.
ndbdoi.py Tracks/report skips separately from errors during batch DOI processing.
infrastructure/doi-minter.yaml Simplifies SNS templates and exports private subnet IDs for automation.
.github/workflows/run-minting.yml Uses CloudFormation output for subnets instead of an Actions secret.
.github/workflows/deploy.yml Adds an early step to fail fast when required secrets are missing/empty.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ndbdoi.py
Comment on lines 148 to 149
else:
print(f"○ Dataset {dataset_id}: Skipped (already has DOI: {doi_obj.identifiers.get('identifier')})")
Comment on lines 55 to 60
echo "CLUSTER=$(get_output ClusterName)" >> $GITHUB_ENV
echo "TASK_DEF=$(get_output TaskDefinitionArn)" >> $GITHUB_ENV
echo "TASK_SG=$(get_output TaskSecurityGroupId)" >> $GITHUB_ENV
echo "TASK_SUBNETS=$(get_output PrivateSubnetIds)" >> $GITHUB_ENV
echo "LOG_BUCKET=$(get_output LogBucketName)" >> $GITHUB_ENV
echo "LOG_GROUP=$(get_output LogGroupName)" >> $GITHUB_ENV
Comment on lines +534 to +537
if not submitted:
raise DatasetNotReady(
f"dataset {self.datasetid} has no submission date; not submitted yet"
)
Comment on lines +530 to +537
# No submission date means the owner has not submitted the dataset yet,
# which is a normal transient state rather than a fault. Raise in both
# modes, not just `prod`: the sandbox pass is a rehearsal of the mint, so
# it should skip exactly what production would skip.
if not submitted:
raise DatasetNotReady(
f"dataset {self.datasetid} has no submission date; not submitted yet"
)
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.

2 participants