Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bigtable): add support for request stats #6991

Merged
merged 18 commits into from
Nov 10, 2022

Conversation

humbertowastaken
Copy link
Contributor

feat(bigtable): add support for request stats

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigtable Issues related to the Bigtable API. labels Nov 3, 2022
Copy link
Contributor

@mutianf mutianf left a comment

Choose a reason for hiding this comment

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

Is there a way to add a test for this?

bigtable/bigtable.go Outdated Show resolved Hide resolved
bigtable/bigtable.go Outdated Show resolved Hide resolved
bigtable/bigtable.go Outdated Show resolved Hide resolved
bigtable/bigtable.go Outdated Show resolved Hide resolved
bigtable/bigtable.go Outdated Show resolved Hide resolved
@telpirion
Copy link
Contributor

This PR also requires a unit test and an integration test.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Nov 8, 2022
@humbertowastaken
Copy link
Contributor Author

Added integration tests.

Copy link
Contributor

@telpirion telpirion left a comment

Choose a reason for hiding this comment

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

I think this still needs a unit test in bigtable_test.go. The Go monorepo doesn't run integration tests for each PR until it has been merged. As a result, we need to ensure that unit tests exist to help us see breakages before a PR is merged.

In sum, bare minimum required changes:

  • unit test(s) for this callback feature in bigtable_test.go
  • comments for all publicly exposed fields to populate the reference docs

bigtable/bigtable.go Show resolved Hide resolved
bigtable/bigtable.go Show resolved Hide resolved
bigtable/bigtable.go Show resolved Hide resolved
bigtable/bigtable.go Show resolved Hide resolved
}

func makeFullReadStats(reqStats *btpb.RequestStats) FullReadStats {
statsView := reqStats.GetFullReadStatsView()
Copy link
Contributor

Choose a reason for hiding this comment

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

Although this is guarded by an if statement above, I recommend a nil check here.

Copy link
Contributor

Choose a reason for hiding this comment

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

What would you recommend to do in the nil case? Since this is an internal impl detail, we can update this in a follow up PR

bigtable/bigtable.go Outdated Show resolved Hide resolved
@telpirion telpirion added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 9, 2022
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Nov 9, 2022
@igorbernstein2 igorbernstein2 added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 10, 2022
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 10, 2022
@igorbernstein2
Copy link
Contributor

At this point the only thing that missing is a unit test. This will require some refactoring in the emulator code, which we can do in a follow up PR. The functionality is covered by the integration test. Given the timing, I'm going to go ahead and merge this.

Copy link
Contributor

@igorbernstein2 igorbernstein2 left a comment

Choose a reason for hiding this comment

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

lgtm.

@igorbernstein2 igorbernstein2 dismissed telpirion’s stale review November 10, 2022 04:16

The only outstanding action item is a unit test which will come in a follow PR

@igorbernstein2 igorbernstein2 removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 10, 2022
@igorbernstein2 igorbernstein2 merged commit 609421e into googleapis:main Nov 10, 2022
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. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants