From 919fed1825b10744603d72ebaa4f73142003c451 Mon Sep 17 00:00:00 2001 From: Victor Chudnovsky Date: Tue, 8 Oct 2019 16:10:34 -0700 Subject: [PATCH 1/4] Add sample_type field to permit in-code samples. --- .../api/codegen/samplegen/v1p2/sample_config_v1p2.proto | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/proto/com/google/api/codegen/samplegen/v1p2/sample_config_v1p2.proto b/src/main/proto/com/google/api/codegen/samplegen/v1p2/sample_config_v1p2.proto index 2e615d72ef..96b146f55f 100644 --- a/src/main/proto/com/google/api/codegen/samplegen/v1p2/sample_config_v1p2.proto +++ b/src/main/proto/com/google/api/codegen/samplegen/v1p2/sample_config_v1p2.proto @@ -86,6 +86,15 @@ message SampleSpecProto { // Definition of how to handle the RPC response, specified as an // ordered list of statements. repeated ResponseStatementProto response = 9; + + // A list of the types samples to generate from this + // configuration. The elements can be any of "standalone" and + // "incode/XXX", where XXX is an arbitrary run of alphanumeric + // characters (these are used to lexicographically sort multiple + // in-code samples for the same RPC before including them in the + // library source code). If not specified or empty, defaults to + // ["standalone"] + repeated string sample_type = 10 } message RequestFieldProto { From adf63593f9cd2867ff420db825833c513e392ad4 Mon Sep 17 00:00:00 2001 From: Victor Chudnovsky Date: Wed, 9 Oct 2019 10:32:14 -0700 Subject: [PATCH 2/4] Fix syntax --- .../api/codegen/samplegen/v1p2/sample_config_v1p2.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/proto/com/google/api/codegen/samplegen/v1p2/sample_config_v1p2.proto b/src/main/proto/com/google/api/codegen/samplegen/v1p2/sample_config_v1p2.proto index 96b146f55f..557a9375fc 100644 --- a/src/main/proto/com/google/api/codegen/samplegen/v1p2/sample_config_v1p2.proto +++ b/src/main/proto/com/google/api/codegen/samplegen/v1p2/sample_config_v1p2.proto @@ -91,10 +91,10 @@ message SampleSpecProto { // configuration. The elements can be any of "standalone" and // "incode/XXX", where XXX is an arbitrary run of alphanumeric // characters (these are used to lexicographically sort multiple - // in-code samples for the same RPC before including them in the + // in-code samples for the same RPC when including them in the // library source code). If not specified or empty, defaults to // ["standalone"] - repeated string sample_type = 10 + repeated string sample_type = 10; } message RequestFieldProto { From 35c3fc09c81079e93bc71d6485ba5f8ed601acbc Mon Sep 17 00:00:00 2001 From: Victor Chudnovsky Date: Thu, 31 Oct 2019 11:03:51 -0700 Subject: [PATCH 3/4] Attempt to get info about CircleCI failure --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5d85b9f76b..ee70046fea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -397,7 +397,7 @@ jobs: command: | mkdir -p /tmp/workspace/reports/gapic-generator cd gapic-generator - ./gradlew check + ./gradlew --info check bash <(curl -s https://codecov.io/bash) find -type f -regex ".*/build/test-results/.*xml" | xargs cp -t /tmp/workspace/reports/gapic-generator when: always From 5f7c51b76d37488c0a7582ffb18f739491502ae6 Mon Sep 17 00:00:00 2001 From: Victor Chudnovsky Date: Thu, 31 Oct 2019 17:34:09 -0700 Subject: [PATCH 4/4] Fix environment variable so CircleCI test runs --- .circleci/config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5d85b9f76b..8c46640c94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,11 +111,13 @@ anchor_test_ruby_client: &anchor_test_ruby_client command: | if [ -e ${RUBY_GEN_DIR}/google-cloud-${TEST_API} ] then + echo "Testing ${TEST_API} in the ${LANGUAGE} language" cd ${RUBY_GEN_DIR}/google-cloud-${TEST_API} bundle update bundle exec rake test else - echo "Ruby ${TEST_API} library was not generated." + echo "Ruby ${TEST_API} library was not generated for ${LANGUAGE} at ${RUBY_GEN_DIR}." + ls -la ${RUBY_GEN_DIR} exit 1 fi when: always @@ -133,6 +135,10 @@ anchor_run_ruby: &anchor_run_ruby - attach_workspace: # Use the workspace created in generate-clients at: workspace + - run: + name: Prepare environment # The environment set for this job does not seem to propagate + command: | + echo 'export RUBY_GEN_DIR="/tmp/workspace/gapic-generator/artman-genfiles/ruby/google-cloud-ruby/"' >> $BASH_ENV - run: <<: *anchor_run_decrypt - run: