GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(tests): Add integration test framework, goldens for 4 APIs [gapic-generator-python] by miraleung · Pull Request #905 · googleapis/gapic-generator-python

This repository was archived by the owner on Aug 25, 2026. It is now read-only.

Conversation

@miraleung

@miraleung miraleung commented May 21, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

The relevant files to review are those ending in .bzl. Any .py files in this PR are generated goldens only.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@miraleung
feat(tests): Add integration test framework, goldens for 4 APIs
7602aed
@miraleung
miraleung requested a review from a team May 21, 2021 22:31
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label May 21, 2021
@miraleung
miraleung requested review from busunkim96, parthea, software-dov and vam-google May 21, 2021 22:31
@codecov

codecov Bot commented May 21, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #905 (0c9c1a3) into master (7c185e8) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #905   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        27    +1     
  Lines         1608      1697   +89     
  Branches       328       347   +19     
=========================================
+ Hits          1608      1697   +89     
Impacted Files Coverage Δ
gapic/samplegen_utils/types.py 100.00% <ø> (ø)
gapic/samplegen_utils/utils.py 100.00% <ø> (ø)
gapic/utils/case.py 100.00% <ø> (ø)
gapic/utils/reserved_names.py 100.00% <ø> (ø)
gapic/generator/generator.py 100.00% <100.00%> (ø)
gapic/samplegen/samplegen.py 100.00% <100.00%> (ø)
gapic/schema/api.py 100.00% <100.00%> (ø)
gapic/schema/metadata.py 100.00% <100.00%> (ø)
gapic/schema/wrappers.py 100.00% <100.00%> (ø)
gapic/utils/__init__.py 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 592ec06...0c9c1a3. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miraleung
fix: exclude generated sources from style checks
df63cf7
@miraleung
miraleung requested a review from a team May 21, 2021 22:46
busunkim96
busunkim96 reviewed May 21, 2021
View reviewed changes

@busunkim96 busunkim96 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks @miraleung! My Bazel knowledge is lacking so I'll let other folks review.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/workflows/tests.yaml Resolved

Uh oh!

There was an error while loading. Please reload this page.

miraleung and others added 5 commits May 23, 2021 22:45
@miraleung
fix: add integration tests to CI
91f98a4
@miraleung
fix: split out integration tests
1ff6af1
@miraleung
fix: bazel install
f212c81
@miraleung
fix: Use 3.8 only for integration tests
1050c84
@miraleung
Merge branch 'master' into feat/goldens
59d5b1d
vam-google
vam-google reviewed May 26, 2021
View reviewed changes

@vam-google vam-google left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Overall looks good to me, but a few general questions/concerns:

  1. It looks like a massive update, do we really need that many golden files? Can we pick like one API instead (with most feature coverage in it)? This is simply to reduce the number of goldens to maintain.

  2. Most importantly this will change the development workflow - with every new feature or substantial modification, the golden tests most probably will have to be updated. Also, unfortunately, bazel is and alien technology for most of the Python developers (including gapic-generator-python developers), and making them to deal with unexpected nasty failures and necessity to run/update the tests in the bazel way can make them really unhappy. Basically I was under impression that if we do goldens for gapic-generator-python it must be done in the python-idiomatic way. Comparing to gapic-generato-java - the generator itself is build via bazel, so using bazel for goldens infra makes perfect sense. For python the things are a bit different. I'm afraid if we introduce the goldens in this current form, relatively soon the maintainers of the repo will remove them as very painful/non-idiomatic to maintain.

  3. Even if we go with the goldens-via-bazel infra, is there some documentation speaking about how the development workflow is going to be changed by this, what developers need to run before posting the PR to make sure that the stuff passes and what to do if the goldens need to be updated (sorry if it is already there - i did try to all potential readme/.rst files in this PR but did not find documentation like that in those files).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@miraleung
fix: add integration test steps to docs
0c9c1a3
@miraleung

miraleung commented May 26, 2021

Copy link
Copy Markdown
Contributor Author

Comments inline:

  1. In the Java generator, there were often distinct edge cases between different APIs - there isn't one that provides the most coverage. Maintaining golden files should be easy, since one only needs to run the Bazel target to update them all (and presumably devs should check the diffs manually to validate correctness). This set is meant to be a starter, will leave it to @busunkim96 and @software-dov to decide how many or which APIs we should actually be used.
  2. Since the microgenerator has Bazel rules, using Bazel in this repo seems to align with that. It also seems like we are missing a test path that validates they continue to work as expected, which is an added benefit of these integration tests.
  3. Updated DEVELOPMENT.md. The Git hooks in feat(dev): Add Git pre-commit hooks [gapic-generator-python] #908 will ensure all the pre-commit checks will run automatically on each commit.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vam-google
vam-google approved these changes May 27, 2021
View reviewed changes

@vam-google vam-google left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM, but please, wait for Bu Sun an Dov to approve (and also, still hope that we can reduce the number of golden files here).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
busunkim96
busunkim96 approved these changes May 27, 2021
View reviewed changes

@busunkim96 busunkim96 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM. Thanks Mira!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@miraleung
miraleung merged commit 48db1e6 into master May 27, 2021
@miraleung
miraleung deleted the feat/goldens branch May 27, 2021 19:43
@software-dov software-dov mentioned this pull request Jun 29, 2021
Compile a real proto from googleapis/googleapis during tests. #904
Closed
This was referenced Jan 18, 2022
chore(master): release reverted #1133
Merged
chore(master): release 0.40.0 #1138
Closed
chore(master): release 0.39.1 #1146
Closed
This was referenced Jan 26, 2022
chore(main): release 0.39.1 #1160
Closed
chore(main): release 0.39.1 #1162
Closed
chore(main): release 0.61.0 #1163
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@software-dov software-dov Awaiting requested review from software-dov
@parthea parthea Awaiting requested review from parthea
2 more reviewers
@busunkim96 busunkim96 busunkim96 approved these changes
@vam-google vam-google vam-google approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@miraleung @busunkim96 @vam-google
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.