Skip to content

Add ingest endpoint between automation and ingestion workflows - #757

Open
vish-cs wants to merge 2 commits into
datacommonsorg:masterfrom
vish-cs:skip-version
Open

Add ingest endpoint between automation and ingestion workflows#757
vish-cs wants to merge 2 commits into
datacommonsorg:masterfrom
vish-cs:skip-version

Conversation

@vish-cs

@vish-cs vish-cs commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This PR adds an /imports/ingest endpoint in the ingestion service which invokes the spanner ingestion workflow. This endpoint is invoked by the import automation workflow instead of directly invoking the ingestion workflow. This provides an API level separation b/w ET and L subsystems.

It also adds greaceful handling of SKIP state by using the latest_version.txt for any skipped runs. It then adds logic to the ingestion pipeline to skip ingestion by checking the provided version if it has been successfully ingested. It also adds an option to do force ingestion if needed.

@codacy-production

codacy-production Bot commented Sep 8, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 15 minor

Alerts:
⚠ 15 issues (≤ 0 issues of at least minor severity)

Results:
15 new issues

Category Results
Documentation 6 minor
CodeStyle 9 minor

View in Codacy

🟢 Metrics 33 complexity

Metric Results
Complexity 33

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a "force ingestion" feature and implements logic to skip imports that have already been successfully ingested. It adds a forceIngestion flag to the import models and updates the Spanner client to query ImportStatus and skip already successful imports unless forced. Feedback on the pull request suggests adding a unit test to explicitly verify that the new skip logic in get_import_info works as expected.

Comment thread pipeline/workflow/ingestion-helper/clients/spanner_test.py
@vish-cs
vish-cs force-pushed the skip-version branch 3 times, most recently from 7b9dbb6 to 43a733b Compare September 8, 2026 12:13
@vish-cs vish-cs changed the title Handle versioning for SKIP state Add ingest endpoint between automation and ingestion workflows Sep 9, 2026
@vish-cs

vish-cs commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the import automation and Spanner ingestion workflows by routing ingestion triggers through a new /imports/ingest endpoint in the ingestion helper service, introducing parallel integration testing, and updating Terraform configurations and Cloud Build steps. Feedback on these changes highlights a critical bug in the ingestion helper's skip logic where imports with missing versions might be incorrectly skipped, as well as an opportunity to optimize redundant string splitting in the import automation workflow.

Comment thread pipeline/workflow/ingestion-helper/clients/spanner.py
Comment thread pipeline/workflow/import-automation-workflow.yaml
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.

1 participant