Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
90c4f38
fix: support non-name fields with res-refs in resname def parsing
miraleung Oct 27, 2020
a74be70
fix: add workaround for missing default_host and oauth_scopes annotation
miraleung Oct 27, 2020
aef9843
Merge branch 'master' of github.com:googleapis/gapic-generator-java i…
miraleung Oct 29, 2020
fdb1ffb
fix: clarify LRO parsing error messages
miraleung Oct 27, 2020
642c606
feat: support deeply-nested types in AST and proto message parsing
miraleung Oct 28, 2020
3e26d87
fix: prevent resname tokens from matching subcomponents
miraleung Oct 28, 2020
837da38
fix: use TypeParser for proto message parsing
miraleung Oct 28, 2020
a5fc332
fix: use generic types in field instantiation in ServiceClientTest
miraleung Oct 28, 2020
b71b786
fix: prevent descension into map types in nested message parsing
miraleung Oct 29, 2020
602e1df
fix: merge master
miraleung Oct 29, 2020
07dddb8
fix: use both map generics in ServiceClientTest codegen
miraleung Oct 29, 2020
5e95e8f
fix: dir structure of generated files
miraleung Oct 29, 2020
c37c2d0
test: add asset API gradle pkg rules
miraleung Oct 29, 2020
8a7196f
fix: remove unused dep
miraleung Oct 29, 2020
f7f8099
test: add logging integration target and goldens, consolidate rules
miraleung Oct 29, 2020
9e0ad39
fix: merge master
miraleung Oct 29, 2020
9df3a5b
fix: fix asset_java_gapic build
miraleung Oct 30, 2020
96f8676
fix: fix test src packaging, update integration goldens
miraleung Oct 30, 2020
a91a085
fix: pass all tokens to instansiate in resname 1-pattern case
miraleung Oct 30, 2020
19e0a98
fix: update goldens
miraleung Oct 30, 2020
2dfd4b1
fix: update goldens
miraleung Oct 30, 2020
5dae221
build: add all integration tests to pre-commit hook
miraleung Oct 30, 2020
6917a2b
build: run pre-commit when goldens have changed
miraleung Oct 30, 2020
1aaf0a5
build: add integration golden tests to CircleCI
miraleung Oct 30, 2020
caf47e7
Merge branch 'master' into alpha/g18
miraleung Oct 31, 2020
ba71685
Update pre-commit
miraleung Oct 31, 2020
a4c5b95
fix: merge master
miraleung Oct 31, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ jobs:
cd /tmp/gapic-generator-java
bazel --batch test //src/test/... --noshow_progress
find . -type f -regex ".*/bazel-testlogs/.*xml" -exec cp {} ${TEST_REPORTS_DIR} \;
- run:
name: Run integration tests for gapic-generator-java
command: |
cd /tmp/gapic-generator-java
# Check only the goldens, rely on the pre-commits for client library compilation tests.
# Otherwise, this would take too long.
bazel --batch test //test/integration:asset //test/integration:logging //test/integration:redis --noshow_progress
find . -type f -regex ".*/bazel-testlogs/.*xml" -exec cp {} ${TEST_REPORTS_DIR} \;
- store_test_results:
path: ~/.cache/bazel
google-java-format:
Expand Down
1 change: 1 addition & 0 deletions test/integration/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ java_gapic_library(
"@com_google_googleapis//google/iam/v1:iam_java_grpc",
],
deps = [
"@com_google_googleapis//google/cloud/asset/v1:asset_java_proto",
"@com_google_googleapis//google/iam/v1:iam_java_proto",
"@com_google_googleapis//google/identity/accesscontextmanager/v1:accesscontextmanager_proto",
],
Expand Down
15 changes: 8 additions & 7 deletions test/integration/goldens/asset/AssetServiceClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,31 +84,32 @@ public class AssetServiceClient implements BackgroundResource {
private final AssetServiceStub stub;
private final OperationsClient operationsClient;

/** Constructs an instance of EchoClient with default settings. */
/** Constructs an instance of AssetServiceClient with default settings. */
public static final AssetServiceClient create() throws IOException {
return create(AssetServiceSettings.newBuilder().build());
}

/**
* Constructs an instance of EchoClient, using the given settings. The channels are created based
* on the settings passed in, or defaults for any settings that are not set.
* Constructs an instance of AssetServiceClient, using the given settings. The channels are
* created based on the settings passed in, or defaults for any settings that are not set.
*/
public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException {
return new AssetServiceClient(settings);
}

/**
* Constructs an instance of EchoClient, using the given stub for making calls. This is for
* advanced usage - prefer using create(AssetServiceSettings).
* Constructs an instance of AssetServiceClient, using the given stub for making calls. This is
* for advanced usage - prefer using create(AssetServiceSettings).
*/
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final AssetServiceClient create(AssetServiceStub stub) {
return new AssetServiceClient(stub);
}

/**
* Constructs an instance of EchoClient, using the given settings. This is protected so that it is
* easy to make a subclass, but otherwise, the static factory methods should be preferred.
* Constructs an instance of AssetServiceClient, using the given settings. This is protected so
* that it is easy to make a subclass, but otherwise, the static factory methods should be
* preferred.
*/
protected AssetServiceClient(AssetServiceSettings settings) throws IOException {
this.settings = settings;
Expand Down
15 changes: 8 additions & 7 deletions test/integration/goldens/logging/ConfigServiceV2Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,32 +80,33 @@ public class ConfigServiceV2Client implements BackgroundResource {
private final ConfigServiceV2Settings settings;
private final ConfigServiceV2Stub stub;

/** Constructs an instance of EchoClient with default settings. */
/** Constructs an instance of ConfigServiceV2Client with default settings. */
public static final ConfigServiceV2Client create() throws IOException {
return create(ConfigServiceV2Settings.newBuilder().build());
}

/**
* Constructs an instance of EchoClient, using the given settings. The channels are created based
* on the settings passed in, or defaults for any settings that are not set.
* Constructs an instance of ConfigServiceV2Client, using the given settings. The channels are
* created based on the settings passed in, or defaults for any settings that are not set.
*/
public static final ConfigServiceV2Client create(ConfigServiceV2Settings settings)
throws IOException {
return new ConfigServiceV2Client(settings);
}

/**
* Constructs an instance of EchoClient, using the given stub for making calls. This is for
* advanced usage - prefer using create(ConfigServiceV2Settings).
* Constructs an instance of ConfigServiceV2Client, using the given stub for making calls. This is
* for advanced usage - prefer using create(ConfigServiceV2Settings).
*/
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final ConfigServiceV2Client create(ConfigServiceV2Stub stub) {
return new ConfigServiceV2Client(stub);
}

/**
* Constructs an instance of EchoClient, using the given settings. This is protected so that it is
* easy to make a subclass, but otherwise, the static factory methods should be preferred.
* Constructs an instance of ConfigServiceV2Client, using the given settings. This is protected so
* that it is easy to make a subclass, but otherwise, the static factory methods should be
* preferred.
*/
protected ConfigServiceV2Client(ConfigServiceV2Settings settings) throws IOException {
this.settings = settings;
Expand Down
15 changes: 8 additions & 7 deletions test/integration/goldens/logging/LoggingServiceV2Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,32 +82,33 @@ public class LoggingServiceV2Client implements BackgroundResource {
private final LoggingServiceV2Settings settings;
private final LoggingServiceV2Stub stub;

/** Constructs an instance of EchoClient with default settings. */
/** Constructs an instance of LoggingServiceV2Client with default settings. */
public static final LoggingServiceV2Client create() throws IOException {
return create(LoggingServiceV2Settings.newBuilder().build());
}

/**
* Constructs an instance of EchoClient, using the given settings. The channels are created based
* on the settings passed in, or defaults for any settings that are not set.
* Constructs an instance of LoggingServiceV2Client, using the given settings. The channels are
* created based on the settings passed in, or defaults for any settings that are not set.
*/
public static final LoggingServiceV2Client create(LoggingServiceV2Settings settings)
throws IOException {
return new LoggingServiceV2Client(settings);
}

/**
* Constructs an instance of EchoClient, using the given stub for making calls. This is for
* advanced usage - prefer using create(LoggingServiceV2Settings).
* Constructs an instance of LoggingServiceV2Client, using the given stub for making calls. This
* is for advanced usage - prefer using create(LoggingServiceV2Settings).
*/
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final LoggingServiceV2Client create(LoggingServiceV2Stub stub) {
return new LoggingServiceV2Client(stub);
}

/**
* Constructs an instance of EchoClient, using the given settings. This is protected so that it is
* easy to make a subclass, but otherwise, the static factory methods should be preferred.
* Constructs an instance of LoggingServiceV2Client, using the given settings. This is protected
* so that it is easy to make a subclass, but otherwise, the static factory methods should be
* preferred.
*/
protected LoggingServiceV2Client(LoggingServiceV2Settings settings) throws IOException {
this.settings = settings;
Expand Down
15 changes: 8 additions & 7 deletions test/integration/goldens/logging/MetricsServiceV2Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,32 +79,33 @@ public class MetricsServiceV2Client implements BackgroundResource {
private final MetricsServiceV2Settings settings;
private final MetricsServiceV2Stub stub;

/** Constructs an instance of EchoClient with default settings. */
/** Constructs an instance of MetricsServiceV2Client with default settings. */
public static final MetricsServiceV2Client create() throws IOException {
return create(MetricsServiceV2Settings.newBuilder().build());
}

/**
* Constructs an instance of EchoClient, using the given settings. The channels are created based
* on the settings passed in, or defaults for any settings that are not set.
* Constructs an instance of MetricsServiceV2Client, using the given settings. The channels are
* created based on the settings passed in, or defaults for any settings that are not set.
*/
public static final MetricsServiceV2Client create(MetricsServiceV2Settings settings)
throws IOException {
return new MetricsServiceV2Client(settings);
}

/**
* Constructs an instance of EchoClient, using the given stub for making calls. This is for
* advanced usage - prefer using create(MetricsServiceV2Settings).
* Constructs an instance of MetricsServiceV2Client, using the given stub for making calls. This
* is for advanced usage - prefer using create(MetricsServiceV2Settings).
*/
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final MetricsServiceV2Client create(MetricsServiceV2Stub stub) {
return new MetricsServiceV2Client(stub);
}

/**
* Constructs an instance of EchoClient, using the given settings. This is protected so that it is
* easy to make a subclass, but otherwise, the static factory methods should be preferred.
* Constructs an instance of MetricsServiceV2Client, using the given settings. This is protected
* so that it is easy to make a subclass, but otherwise, the static factory methods should be
* preferred.
*/
protected MetricsServiceV2Client(MetricsServiceV2Settings settings) throws IOException {
this.settings = settings;
Expand Down
12 changes: 6 additions & 6 deletions test/integration/goldens/redis/CloudRedisClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,21 @@ public class CloudRedisClient implements BackgroundResource {
private final CloudRedisStub stub;
private final OperationsClient operationsClient;

/** Constructs an instance of EchoClient with default settings. */
/** Constructs an instance of CloudRedisClient with default settings. */
public static final CloudRedisClient create() throws IOException {
return create(CloudRedisSettings.newBuilder().build());
}

/**
* Constructs an instance of EchoClient, using the given settings. The channels are created based
* on the settings passed in, or defaults for any settings that are not set.
* Constructs an instance of CloudRedisClient, using the given settings. The channels are created
* based on the settings passed in, or defaults for any settings that are not set.
*/
public static final CloudRedisClient create(CloudRedisSettings settings) throws IOException {
return new CloudRedisClient(settings);
}

/**
* Constructs an instance of EchoClient, using the given stub for making calls. This is for
* Constructs an instance of CloudRedisClient, using the given stub for making calls. This is for
* advanced usage - prefer using create(CloudRedisSettings).
*/
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
Expand All @@ -116,8 +116,8 @@ public static final CloudRedisClient create(CloudRedisStub stub) {
}

/**
* Constructs an instance of EchoClient, using the given settings. This is protected so that it is
* easy to make a subclass, but otherwise, the static factory methods should be preferred.
* Constructs an instance of CloudRedisClient, using the given settings. This is protected so that
* it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
*/
protected CloudRedisClient(CloudRedisSettings settings) throws IOException {
this.settings = settings;
Expand Down