Skip to content

Update logic to fetch rollback version - #731

Merged
vish-cs merged 1 commit into
datacommonsorg:masterfrom
vish-cs:version
Aug 21, 2026
Merged

Update logic to fetch rollback version#731
vish-cs merged 1 commit into
datacommonsorg:masterfrom
vish-cs:version

Conversation

@vish-cs

@vish-cs vish-cs commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

We currently get the list of versions from the ImportVersionHistoryTable and use the version not matching the current version. Instead, this PR changes the logic to use the last version with status SUCCESS from ImportVersionHistory table for rollback.

@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 refactors the rollback mechanism to revert imports to the last successful version by querying the version history with a "SUCCESS" status. However, this change removes the context of the active version before the rollback, returning None for the failed version. The reviewer suggests retrieving the current version using spanner_client.get_import_latest_version to preserve this useful context in logs and API responses.

Comment thread pipeline/workflow/ingestion-helper/utils/rollback_helper.py Outdated
@vish-cs
vish-cs force-pushed the version branch 2 times, most recently from 84c0c77 to 2c79e7d Compare August 20, 2026 11:17
@vish-cs
vish-cs merged commit f74f67c into datacommonsorg:master Aug 21, 2026
11 checks passed
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