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: autopopulate fields in the request #2353

Merged
merged 42 commits into from Jan 31, 2024
Merged

feat: autopopulate fields in the request #2353

merged 42 commits into from Jan 31, 2024

Conversation

alicejli
Copy link
Contributor

@alicejli alicejli commented Jan 10, 2024

Follow up to: #2312

This adds autopopulation of fields within the Request message for protos that are configured. This currently only supports UUID4.

@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Jan 10, 2024
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Jan 16, 2024
@alicejli alicejli marked this pull request as ready for review January 23, 2024 19:59
@alicejli alicejli requested a review from a team as a code owner January 23, 2024 19:59
@alicejli alicejli added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 23, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 23, 2024
@alicejli alicejli requested a review from lqiu96 January 30, 2024 15:03
Copy link
Collaborator

@blakeli0 blakeli0 left a comment

Choose a reason for hiding this comment

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

LGTM. In follow up PRs, please extract the golden unit test cases to a separate proto/yaml.

alicejli and others added 2 commits January 31, 2024 16:46
…pic/model/FieldTest.java

Co-authored-by: Blake Li <blakeli@google.com>
…ableTest.java

Co-authored-by: Blake Li <blakeli@google.com>
Copy link

sonarcloud bot commented Jan 31, 2024

Please retry analysis of this Pull-Request directly on SonarCloud

Copy link

sonarcloud bot commented Jan 31, 2024

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

The SonarCloud Quality Gate passed, but some issues were introduced.

8 New issues
0 Security Hotspots
95.1% Coverage on New Code
1.9% Duplication on New Code

See analysis details on SonarCloud

@alicejli alicejli merged commit b28235a into main Jan 31, 2024
37 of 39 checks passed
@alicejli alicejli deleted the addRequestMutator branch January 31, 2024 22:19
alicejli added a commit that referenced this pull request Feb 8, 2024
As a clean-up follow up to
#2353, this PR
refactors the unit golden tests for the autopopulation feature to a
separate, new proto called `auto_populate_field_testing.proto`.
ddixit14 pushed a commit that referenced this pull request Feb 15, 2024
* feat: autopopulate fields in the request

* revert showcase golden changes

* add AbstractTransportServiceStubClassComposerTest

* add REST implementation

* add GrpcDirectCallableTest

* remove unnecessary null check

* add field info proto registry and more unit test cases

* add HttpJsonDirectCallableTest

* refactor AbstractTransportServiceSTubClassComposer

* add more unit tests for Field

* feat: refactor request mutator expression

* fix goldens

* add showcase test for autopopulation

* fix lint

* change assertion in showcase test

* refactor for sonarcloud

* sonarcloud fixes

* sonarcloud

* sonarcloud fix

* fix sonarcloud

* slight refactoring

* revert changes to directCallable and replace with retryable Callable

* overload retrying Callables method

* change license header format

* fix license header

* fix showcase lint

* add comment

* add showcase comment

* add CallableTest and httpjson Retrying test

* fix lint

* add RetryingCallable test and some refactoring

* refactor GrpcCallableFactory

* remove extraneous from HttpJsonDirectCallableTest

* remove FakeHttpJsonChannel

* revert changes to tests for extra param

* refactoring

* Update gapic-generator-java/src/test/java/com/google/api/generator/gapic/model/FieldTest.java

Co-authored-by: Blake Li <blakeli@google.com>

* Update gax-java/gax/src/test/java/com/google/api/gax/rpc/RetryingCallableTest.java

Co-authored-by: Blake Li <blakeli@google.com>

---------

Co-authored-by: Blake Li <blakeli@google.com>
ddixit14 pushed a commit that referenced this pull request Feb 15, 2024
As a clean-up follow up to
#2353, this PR
refactors the unit golden tests for the autopopulation feature to a
separate, new proto called `auto_populate_field_testing.proto`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants