Skip to content

Conversation

@bigsheeper
Copy link
Contributor

issue: #47099

@gemini-code-assist
Copy link

Summary of Changes

Hello @bigsheeper, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the robustness of the import process by introducing defensive checks in the importMeta component. Specifically, it prevents any state changes to import jobs and tasks once they have reached a terminal state, either Completed or Failed. This ensures that the system's state remains consistent and avoids unintended modifications or 'rollbacks' after an operation has concluded, thereby improving the overall reliability of data imports.

Highlights

  • Import Job State Protection: Implemented a check within the UpdateJob function to prevent any further state modifications once an import job has reached a Completed or Failed status, ensuring state immutability.
  • Import Task State Protection: Added a similar safeguard to the UpdateTask function, preventing updates to an import task that is already in a Completed or Failed state.
  • Dependency Updates: Included new imports for datapb and internalpb protobuf packages to support the state checking logic.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sre-ci-robot sre-ci-robot added the size/S Denotes a PR that changes 10-29 lines. label Jan 15, 2026
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Jan 15, 2026
@sre-ci-robot
Copy link
Contributor

[ci-v2-notice]
Notice: New ci-v2 system is enabled for this PR.

To rerun ci-v2 checks, comment with:

  • /ci-rerun-code-check // for ci-v2/code-check
  • /ci-rerun-build // for ci-v2/build
  • /ci-rerun-ut-integration // for ci-v2/ut-integration, will rerun ci-v2/build
  • /ci-rerun-ut-go // for ci-v2/ut-go, will rerun ci-v2/build
  • /ci-rerun-ut-cpp // for ci-v2/ut-cpp
  • /ci-rerun-ut // for all ci-v2/ut-integration, ci-v2/ut-go, ci-v2/ut-cpp, will rerun ci-v2/build
  • /ci-rerun-e2e-arm // for ci-v2/e2e-arm
  • /ci-rerun-e2e-default // for ci-v2/e2e-default

If you have any questions or requests, please contact @zhikunyao.

Copy link

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

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 enhances the import mechanism by preventing state updates to jobs and tasks that have already reached a terminal state (Completed or Failed). This is a solid improvement for data consistency and prevents unexpected state rollbacks. The changes in UpdateJob and UpdateTask correctly implement this logic by checking the state before applying any updates. I've added a couple of suggestions to use switch statements for these checks, which can improve code readability and make it easier to maintain if more terminal states are added in the future.

@chyezh
Copy link
Contributor

chyezh commented Jan 15, 2026

/lgtm

Copy link
Collaborator

@czs007 czs007 left a comment

Choose a reason for hiding this comment

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

/lgtm

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bigsheeper, czs007

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

czs007 pushed a commit that referenced this pull request Jan 15, 2026
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.15%. Comparing base (9b39d10) to head (44f5de8).
⚠️ Report is 1 commits behind head on master.

⚠️ Current head 44f5de8 differs from pull request most recent head 0572e51

Please upload reports for the commit 0572e51 to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #47100       +/-   ##
===========================================
+ Coverage   76.41%   82.15%    +5.73%     
===========================================
  Files        2016      598     -1418     
  Lines      326793    96523   -230270     
===========================================
- Hits       249733    79295   -170438     
+ Misses      69021    17176    -51845     
+ Partials     8039       52     -7987     
Components Coverage Δ
Client ∅ <ø> (∅)
Core 82.95% <ø> (ø)
Go ∅ <ø> (∅)
see 1418 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sre-ci-robot sre-ci-robot removed the lgtm label Jan 16, 2026
@sre-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

Signed-off-by: bigsheeper <[email protected]>
Signed-off-by: bigsheeper <[email protected]>
@bigsheeper bigsheeper force-pushed the 2601-check-import-job branch from 44f5de8 to 0572e51 Compare January 16, 2026 06:45
@sre-ci-robot sre-ci-robot added size/M Denotes a PR that changes 30-99 lines. and removed size/S Denotes a PR that changes 10-29 lines. labels Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement size/M Denotes a PR that changes 30-99 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants