Skip to content

Conversation

@vish-cs
Copy link
Contributor

@vish-cs vish-cs commented Dec 10, 2025

Add import stats to ImportStatusSummary for easily tracking metrics
Add DataVolume field to spanner ImportStatus table
Minor clean up

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @vish-cs, 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 significantly enhances the monitoring and diagnostic capabilities of the import executor. By introducing a dedicated ObservabilityData structure and integrating its population throughout the import workflow, it now captures detailed metrics on data processing, execution times, and row counts for each stage. This enhancement provides a clearer, more granular view of import performance and status, facilitating better debugging and operational insights without cluttering the main execution logic.

Highlights

  • New ObservabilityData Dataclass: Introduced a new ObservabilityData dataclass to centralize the collection of import metrics, including data sizes, row counts, and execution times for various processing stages.
  • Enhanced Metric Collection and Reporting: Detailed metrics such as source data size, MCF data size, validation data size, number of rows processed, and execution times for script, MCF generation, and validation stages are now collected and used for comprehensive logging and status reporting.
  • Centralized GCS Upload Skip Logic: The logic to conditionally skip GCS uploads has been centralized within the _upload_file_helper function, simplifying conditions across different parts of the import process.
  • Streamlined Main Execution Logic: The main.py file has been simplified by removing redundant time tracking and final status logging, as these responsibilities are now handled by the import_executor.py module using the new observability features.
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.

Copy link
Contributor

@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 introduces observability data collection to the import executor by adding an ObservabilityData dataclass to track metrics like data sizes and execution times. While enhancing observability is a valuable goal, the current implementation has some significant issues. The use of a global variable for state is problematic and, more critically, it is not reset between executions, which will lead to incorrect metrics. Additionally, there is a lack of error handling when parsing a report file, which could cause the import process to crash. I have provided specific comments and suggestions to address these concerns.

@vish-cs vish-cs force-pushed the obs branch 2 times, most recently from 516cd8d to f832809 Compare December 10, 2025 08:39
@vish-cs vish-cs changed the title Add observability info to import executor Add import stats to import summary Dec 10, 2025
@vish-cs vish-cs force-pushed the obs branch 2 times, most recently from 51ab976 to 72c52de Compare December 10, 2025 09:00
@vish-cs vish-cs requested a review from ajaits December 10, 2025 09:22
@vish-cs vish-cs force-pushed the obs branch 2 times, most recently from a971392 to 435f9f2 Compare December 10, 2025 14:34
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