Skip to content

Update ingestion workflow to use new ingestion history table#623

Open
vish-cs wants to merge 1 commit into
datacommonsorg:masterfrom
vish-cs:history
Open

Update ingestion workflow to use new ingestion history table#623
vish-cs wants to merge 1 commit into
datacommonsorg:masterfrom
vish-cs:history

Conversation

@vish-cs

@vish-cs vish-cs commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
  • Update ingestion workflow to use update workflow status after each step in the new ingestion history table
  • Add timeseries count column to the schema and ingestion helper

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

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 tracking for a new metric, TimeSeriesCount (or ts_count), across the ingestion helper application, Spanner schema, and client tests. It also updates the Spanner ingestion workflow to record ingestion history status updates (PENDING, RUNNING, SUCCESS, RETRY) at various stages. Feedback on these changes highlights a potential database migration issue where the new column may not be applied to existing databases, and a workflow bug where an undefined import_info variable in the error-handling block could cause a crash if the initial fetch fails.

Comment thread pipeline/workflow/ingestion-helper/clients/schema.sql
Comment thread pipeline/workflow/spanner-ingestion-workflow.yaml Outdated
Comment thread pipeline/workflow/spanner-ingestion-workflow.yaml Outdated
@vish-cs vish-cs requested a review from rohitkumarbhagat July 9, 2026 08:32
auth:
type: OIDC
body:
workflowId: '${sys.get_env("GOOGLE_CLOUD_WORKFLOW_EXECUTION_ID")}'

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.

[optional] Prefer saving as workflow variable and using everywhee '${sys.get_env("GOOGLE_CLOUD_WORKFLOW_EXECUTION_ID")}'

workflowId: '${sys.get_env("GOOGLE_CLOUD_WORKFLOW_EXECUTION_ID")}'
status: 'PENDING'
stage: 'dataflow'
importList: '${import_info.body}'

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.

should we use ${import_list} instead of '${import_info.body}' ? will import_info.body contain details of all import_list - even if its a new import?

workflowId: '${sys.get_env("GOOGLE_CLOUD_WORKFLOW_EXECUTION_ID")}'
jobId: ${default(dataflow_job_id, default(map.get(e, "job_id"), "N/A"))}
importList: '${default(import_info, {"body": []}).body}'
status: 'RETRY'

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.

there is no failed status?

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