feat: generate showcase without post-processing#1935
Conversation
This reverts commit 3d612f8.
| function cleanup { | ||
| script_dir=$1 | ||
| cd "${script_dir}" | ||
| rm -rdf gapic-generator-java* google schema protobuf-* protoc-gen-grpc-java* showcase-output out |
There was a problem hiding this comment.
Can we keep all of these folders in a temporary directory because when the script fails midway and cleanup is skipped, it's petty messy? It would be easier if there was a subdirectory under showcase like build that contained all of this.
There was a problem hiding this comment.
+1. Similar to the temp bazel folders like bazel-out when we were using bazel.
There was a problem hiding this comment.
@meltsufin would it make sense to have a separate PR for this? This will also affect the main generation scripts (cc: @blakeli0 )
…e-without-postprocessing
| PROTO_UNPACK_DIR=$PWD | ||
| # compare with proto library | ||
| PROTO_PROJECT_DIR='proto-gapic-showcase-v1beta1' | ||
| diff -ru "${SHOWCASE_DIR}/${PROTO_PROJECT_DIR}/src" "${SCRIPT_DIR}/showcase-output/proto-showcase-output/src" |
There was a problem hiding this comment.
Now that we are generating all three modules at the same time, is it possible to have a diff for all three modules?
There was a problem hiding this comment.
Unless there is a better way than preparing two special folders with a similar structure and run diff on their roots I think the simplest is to just run diff one time for each of the folders (proto, gapic and grpc) in a single call to verify.sh. We don't compare all the contents of gapic-showcase or grpc-gapic-showcase-v1beta1 because there are other special files not generated by the scripts (e.g. ITs).
| function cleanup { | ||
| script_dir=$1 | ||
| cd "${script_dir}" | ||
| rm -rdf gapic-generator-java* google schema protobuf-* protoc-gen-grpc-java* showcase-output out |
There was a problem hiding this comment.
+1. Similar to the temp bazel folders like bazel-out when we were using bazel.
Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com>
meltsufin
left a comment
There was a problem hiding this comment.
You follow up on the outstanding comments in a separate PR.
…ostprocessing' into feat/generate-showcase-without-postprocessing
blakeli0
left a comment
There was a problem hiding this comment.
LGTM. It would be better if we can add unit tests for new utility functions as @JoeWang1127 mentioned if it's not too much, otherwise it's OK to add it in another PR.
Thanks @blakeli0 and @JoeWang1127 . I added a couple tests for info extraction functions. |
|
[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed!
|
|
[java_showcase_unit_tests] Kudos, SonarCloud Quality Gate passed!
|
|
[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed!
|








Modifies the logic of #1916 to support generation of
showcaseNOTES
proto_path(i.e. path from repository root to proto location).proto/bazel-out/.../schema/....enable-golden-testsprofile was updated so it compares the current source code of showcase against a recently generated library via the hermetic build scripts.verifyprofile calls the new scripts without merging them into the current showcase source and running adiffto confirm nothing has changedPENDING