Skip to content

Conversation

@shollyman
Copy link
Contributor

DO NOT SUBMIT this is just trying to evaluate timings

DO NOT SUBMIT this is just trying to evaluate timings
@shollyman shollyman added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 17, 2025
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label Dec 17, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @shollyman, 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 is a diagnostic change aimed at understanding and debugging test timeouts within the Bigtable integration environment setup. It introduces precise timing measurements around the initialization of both production and emulated Bigtable environments, logging these durations to identify potential bottlenecks. This change is explicitly marked as a temporary measure for evaluation and is not intended for submission.

Highlights

  • Debugging Test Timeouts: This pull request introduces logging to measure the duration of Bigtable integration environment creation, specifically for NewProdEnv and NewEmulatedEnv calls, to help diagnose test timeouts.
  • Logging Dependency: The github.com/apache/beam/sdks/v2/go/pkg/beam/log package has been imported to facilitate the new timing log statements.
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 adds timing logs to debug test timeouts. While this is intended for debugging, there's an opportunity to refactor the new logic to avoid code duplication, making it cleaner and more maintainable, even for temporary code.

Comment on lines 153 to 163
if integrationConfig.UseProd {
if c.Table == "" {
c.Table = fmt.Sprintf("it-table-%d", time.Now().Unix())
}
return NewProdEnv(*c)
penv, err := NewProdEnv(*c)
log.Infof("NewProdEnv: %s", time.Since(start))
return penv, err
}
return NewEmulatedEnv(*c)
emenv, err := NewEmulatedEnv(*c)
log.Infof("NewEmulatedEnv: %s", time.Since(start))
return emenv, err
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To avoid repeating the logging and return logic, you could refactor this block. By using an if/else structure to determine which environment to create and then logging and returning once at the end, the code becomes more concise and easier to maintain.

	var env IntegrationEnv
	var err error
	var name string
	if integrationConfig.UseProd {
		if c.Table == "" {
			c.Table = fmt.Sprintf("it-table-%d", time.Now().Unix())
		}
		env, err = NewProdEnv(*c)
		name = "NewProdEnv"
	} else {
		env, err = NewEmulatedEnv(*c)
		name = "NewEmulatedEnv"
	}
	log.Infof("%s: %s", name, time.Since(start))
	return env, err

@shollyman shollyman closed this Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API. do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant