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: add fragment tests by software-dov · Pull Request #1056 · googleapis/gapic-generator-python

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

Conversation

@software-dov

@software-dov software-dov commented Oct 29, 2021

Copy link
Copy Markdown
Contributor

Fragment tests are defined by a small proto file describing an API
surface with characteristics such that it is desirable to test the
generated surface for correctness or to prevent regressions.

As part of a fragment test, the generator is run on a fragment to
create a GAPIC library for the fragment. The generated unit tests
for the fragment are then executed to test the surface.

Includes fragment tests and fixes for #413 and #414 as well as fragment tests for various other previously fixed issues.

Note: the parallelization of the fragment tests is currently a standalone commit and can be removed. It dramatically speeds up execution, however, since most of the time spent per fragment is waiting on I/O or subprocesses.

Sorry, something went wrong.

Uh oh!

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

All reactions
@software-dov
software-dov requested review from a team, arithmetic1728, busunkim96, parthea and tseaver October 29, 2021 23:20
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 29, 2021
@software-dov
feat: add fragment tests
4475efd
Fragment tests are defined by a small proto file describing an API
surface with characteristics such that it is desirable to test the
generated surface for correctness or to prevent regressions.

As part of a fragment test, the generator is run on a fragment to
create a GAPIC library for the fragment. The generated unit tests
for the fragment are then executed to test the surface.
@software-dov
software-dov force-pushed the fragment-tests branch from 602aa74 to 307a95e Compare October 29, 2021 23:21
@software-dov
feat: fragment test is concurrent among fragments
0033054
Within a session, e.g. Python 3.9, all fragment GAPICs are generated
and tested concurrently.
@software-dov
software-dov force-pushed the fragment-tests branch from 307a95e to 0033054 Compare October 29, 2021 23:24
This was linked to issues Oct 29, 2021
Method signature elements that are repeated fields are not handled properly #413
Closed
google.protobuf.Value field in request message breaks corresponding generated flattened method test #414
Closed
busunkim96
busunkim96 approved these changes Nov 1, 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.

The golden files seem to need updating.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread tests/fragments/google/api/client.proto
option java_package = "com.google.api";
option objc_class_prefix = "GAPI";

extend google.protobuf.MethodOptions {

@busunkim96 busunkim96 Nov 1, 2021

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.

Where are these proto files from?

Sorry, something went wrong.

Uh oh!

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

All reactions

@software-dov software-dov Nov 1, 2021

Copy link
Copy Markdown
Contributor Author

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.

I copied them from googleapis and protobuf. My original idea was something complicated involving a hand-rolled semaphore/caching system to pull those repos as dependencies before running the fragment tests. I realized that was way too complicated, however, and just copied the three files I needed for these fragments.

Sorry, something went wrong.

Uh oh!

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

All reactions
software-dov added 2 commits November 1, 2021 10:48
@software-dov
Shaving the yak
ab4bbc3
@software-dov
Update the golden files
0389afe
@software-dov
software-dov merged commit 9d9b33d into googleapis:master Nov 1, 2021
gcf-merge-on-green Bot pushed a commit that referenced this pull request Nov 1, 2021
@release-please
chore: release 0.55.0 (#1059)
3923ca6
🤖 I have created a release \*beep\* \*boop\*
---
## [0.55.0](https://www.github.com/googleapis/gapic-generator-python/compare/v0.54.0...v0.55.0) (2021-11-01)


### Features

* add fragment tests ([#1056](https://www.github.com/googleapis/gapic-generator-python/issues/1056)) ([9d9b33d](https://www.github.com/googleapis/gapic-generator-python/commit/9d9b33dadf587a6d0b09031edeea597d6d2eae62))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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

@tseaver tseaver Awaiting requested review from tseaver
@parthea parthea Awaiting requested review from parthea
@arithmetic1728 arithmetic1728 Awaiting requested review from arithmetic1728
1 more reviewer
@busunkim96 busunkim96 busunkim96 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.

google.protobuf.Value field in request message breaks corresponding generated flattened method test Method signature elements that are repeated fields are not handled properly

Uh oh!

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

2 participants

@software-dov @busunkim96
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.