-
Notifications
You must be signed in to change notification settings - Fork 49
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: Add google.api.api_version annotation to echo.proto #1484
Conversation
@@ -43,6 +43,8 @@ service Echo { | |||
// This service is meant to only run locally on the port 7469 (keypad digits | |||
// for "show"). | |||
option (google.api.default_host) = "localhost:7469"; | |||
// See https://github.com/aip-dev/google.aip.dev/pull/1331 |
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.
Link to AIP once aip-dev/google.aip.dev#1331 is merged
… be opaque to clients as per AIP
d6c5354
to
81c1a8c
Compare
Wait for #1485 which should resolve the error below which appears in https://github.com/googleapis/gapic-showcase/actions/runs/8402715704/job/23012403762?pr=1484
PR #1485 updates the git submodule from SHA 5c1f64e746af6e53713884df3eb7719f3956a66f to SHA d81d0b9e6993d6ab425dff4d7c3d05fb2e59fa57. See the diff here which includes the |
Adding the annotation is fine & necessary, but how do you expect generator integration tests to test that the generated code sends the proper api version? There are two likely routes:
I'd prefer the first one as it is not a breaking change. |
Here is where it currently echos things back through the response: gapic-showcase/server/services/echo_service.go Lines 281 to 307 in 0622c2f
|
I think this is the proper place to implement additional HTTP header/query string translation assuming API version will be a System Parameter: gapic-showcase/util/genrest/resttools/systemparam.go Lines 24 to 47 in 0622c2f
|
There might also be some code that needs updating in the |
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.
See comments.
I only performed manual tests using this updated proto.
|
@noahdietz, Please could you take another look? |
@@ -43,6 +43,8 @@ service Echo { | |||
// This service is meant to only run locally on the port 7469 (keypad digits | |||
// for "show"). | |||
option (google.api.default_host) = "localhost:7469"; | |||
// See https://github.com/aip-dev/google.aip.dev/pull/1331 | |||
option (google.api.api_version) = "moose"; |
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.
Ok and just to make sure.....we don't want a "real" version here?
I understand from generator/client perspective this is an opaque string, but there is something to be said about having good test data...
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.
Fixed in a377321
Thanks SGTM |
update gapic-showcase so that we can pickup changes in googleapis/gapic-showcase#1484 Steps: 1) Updated the gapic-showcase version in `gapic-showcase/pom.xml` to 0.33.0 2) Ran `mvn compile -P update`
update gapic-showcase so that we can pickup changes in googleapis/gapic-showcase#1484 Steps: 1) Updated the gapic-showcase version in `gapic-showcase/pom.xml` to 0.33.0 2) Ran `mvn compile -P update`
This PR allows folks to run manual tests against AIP-4236 (See aip-dev/google.aip.dev#1331)
gapic-showcase run -v
will log the request headers in verbose mode as per https://github.com/googleapis/gapic-showcase/blob/main/CHANGELOG.md#v090--2020-04-22I created #1493 for echoing the
x-goog-api-version
header so that it can be used in automated integration tests.