diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml new file mode 100644 index 00000000..f247d5c7 --- /dev/null +++ b/.github/trusted-contribution.yml @@ -0,0 +1,2 @@ +trustedContributors: +- renovate-bot \ No newline at end of file diff --git a/.kokoro/build.sh b/.kokoro/build.sh index f1ae5840..c0984582 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -37,19 +37,23 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}) fi +RETURN_CODE=0 +set +e + case ${JOB_TYPE} in test) mvn test -B -Dclirr.skip=true -Denforcer.skip=true - bash ${KOKORO_GFILE_DIR}/codecov.sh - bash .kokoro/coerce_logs.sh + RETURN_CODE=$? ;; lint) mvn \ -Penable-samples \ com.coveo:fmt-maven-plugin:check + RETURN_CODE=$? ;; javadoc) mvn javadoc:javadoc javadoc:test-javadoc + RETURN_CODE=$? ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ @@ -59,21 +63,46 @@ integration) -Denforcer.skip=true \ -fae \ verify - bash .kokoro/coerce_logs.sh + RETURN_CODE=$? ;; samples) - mvn -B \ - -Penable-samples \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - bash .kokoro/coerce_logs.sh + if [[ -f samples/pom.xml ]] + then + pushd samples + mvn -B \ + -Penable-samples \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + popd + else + echo "no sample pom.xml found - skipping sample tests" + fi ;; clirr) mvn -B -Denforcer.skip=true clirr:check + RETURN_CODE=$? ;; *) ;; esac + +if [ "${REPORT_COVERAGE}" == "true" ] +then + bash ${KOKORO_GFILE_DIR}/codecov.sh +fi + +# fix output location of logs +bash .kokoro/coerce_logs.sh + +if [[ "${ENABLE_BUILD_COP}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop + ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-iot +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg index 3b017fc8..495cc7ba 100644 --- a/.kokoro/continuous/java8.cfg +++ b/.kokoro/continuous/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index 3b017fc8..8bf59c02 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -5,3 +5,17 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg index 3b017fc8..495cc7ba 100644 --- a/.kokoro/nightly/java8.cfg +++ b/.kokoro/nightly/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg index 9a910249..b4b051cd 100644 --- a/.kokoro/nightly/samples.cfg +++ b/.kokoro/nightly/samples.cfg @@ -2,23 +2,28 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { - key: "JOB_TYPE" - value: "samples" + key: "JOB_TYPE" + value: "samples" } env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" + key: "GCLOUD_PROJECT" + value: "gcloud-devel" } env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" } before_action { diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg index 3b017fc8..495cc7ba 100644 --- a/.kokoro/presubmit/java8.cfg +++ b/.kokoro/presubmit/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.repo-metadata.json b/.repo-metadata.json index 5f31c0ca..79cbc340 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "https://cloud.google.com/iot", "client_documentation": "https://googleapis.dev/java/google-cloud-iot/latest/", "issue_tracker": "https://issuetracker.google.com/issues?q=status:open%20componentid:310170", - "release_level": "beta", + "release_level": "ga", "language": "java", "repo": "googleapis/java-iot", "repo_short": "java-iot", diff --git a/CHANGELOG.md b/CHANGELOG.md index e8411b84..7316917c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [1.0.0](https://www.github.com/googleapis/java-iot/compare/v0.117.1...v1.0.0) (2020-03-03) + + +### Features + +* promote to GA ([#78](https://www.github.com/googleapis/java-iot/issues/78)) ([5573219](https://www.github.com/googleapis/java-iot/commit/55732197b5aba712be602fb962edab8fe1a2894d)) + + +### Dependencies + +* update core dependencies to v1.54.0 ([#79](https://www.github.com/googleapis/java-iot/issues/79)) ([5f41e9f](https://www.github.com/googleapis/java-iot/commit/5f41e9f499eabb9d271b0773ae5a10f3c2413a39)) +* update dependency com.google.cloud:google-cloud-core to v1.92.5 ([c326f85](https://www.github.com/googleapis/java-iot/commit/c326f8535da3aeed6d6b55d7dca5f734ec28ce84)) +* update dependency com.google.cloud:google-cloud-core to v1.93.0 ([#81](https://www.github.com/googleapis/java-iot/issues/81)) ([fc699d3](https://www.github.com/googleapis/java-iot/commit/fc699d3bf454937c8a551cf2be79ad879169a1f4)) +* update dependency com.google.cloud:google-cloud-core to v1.93.1 ([#83](https://www.github.com/googleapis/java-iot/issues/83)) ([397933a](https://www.github.com/googleapis/java-iot/commit/397933ab7fa9cb8bd61e1718fa2e07f5ae706170)) +* update dependency com.google.protobuf:protobuf-java to v3.11.4 ([e85d455](https://www.github.com/googleapis/java-iot/commit/e85d455b308c9ddb7dfdaafbdc99899ba4862d57)) +* update dependency io.grpc:grpc-bom to v1.27.1 ([ae3471e](https://www.github.com/googleapis/java-iot/commit/ae3471eb7ccbbe9a6b83a084ca9987c038c42314)) +* update dependency io.grpc:grpc-bom to v1.27.2 ([ff82b00](https://www.github.com/googleapis/java-iot/commit/ff82b0011b061e432f76e56de34ac29798719bf6)) + + +### Documentation + +* **regen:** update sample code to set total timeout, add API client header test ([bbbc09f](https://www.github.com/googleapis/java-iot/commit/bbbc09f9472a308a84f16dd6317fe39eae8797c8)) + ### [0.117.1](https://www.github.com/googleapis/java-iot/compare/v0.117.0...v0.117.1) (2020-02-04) diff --git a/README.md b/README.md index 9707ee99..c12bf295 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,6 @@ Java idiomatic client for [Google Cloud Internet of Things (IoT) Core][product-d - [Product Documentation][product-docs] - [Client Library Documentation][javadocs] -> Note: This client is a work-in-progress, and may occasionally -> make backwards-incompatible changes. - ## Quickstart If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file @@ -20,13 +17,12 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 3.5.0 + 4.2.0 pom import - com.google.cloud @@ -43,17 +39,17 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-iot - 0.117.1-beta + 1.0.0 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-iot:0.117.1-beta' +compile 'com.google.cloud:google-cloud-iot:1.0.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-iot" % "0.117.1-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-iot" % "1.0.0" ``` [//]: # ({x-version-update-end}) @@ -87,6 +83,8 @@ use this Google Cloud Internet of Things (IoT) Core Client Library. + + ## Troubleshooting To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. @@ -104,9 +102,6 @@ Java 7 or above is required for using this client. This library follows [Semantic Versioning](http://semver.org/). -It is currently in major version zero (``0.y.z``), which means that anything may change at any time -and the public API should not be considered stable. - ## Contributing @@ -145,7 +140,7 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] [kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-iot/java8-win.html [kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-iot/java11.svg [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-iot/java11.html -[stability-image]: https://img.shields.io/badge/stability-beta-yellow +[stability-image]: https://img.shields.io/badge/stability-ga-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-iot.svg [maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-iot&core=gav [authentication]: https://github.com/googleapis/google-cloud-java#authentication @@ -158,4 +153,5 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] [license]: https://github.com/googleapis/java-iot/blob/master/LICENSE [enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing [enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudiot.googleapis.com -[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM \ No newline at end of file +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png diff --git a/google-cloud-iot-bom/pom.xml b/google-cloud-iot-bom/pom.xml index 48fddb2a..d4483124 100644 --- a/google-cloud-iot-bom/pom.xml +++ b/google-cloud-iot-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-iot-bom - 0.117.1-beta + 1.0.0 pom com.google.cloud @@ -64,17 +64,17 @@ com.google.cloud google-cloud-iot - 0.117.1-beta + 1.0.0 com.google.api.grpc proto-google-cloud-iot-v1 - 0.82.1 + 1.0.0 com.google.api.grpc grpc-google-cloud-iot-v1 - 0.82.1 + 1.0.0 diff --git a/google-cloud-iot/clirr-ignored-differences.xml b/google-cloud-iot/clirr-ignored-differences.xml deleted file mode 100644 index ae1f96f6..00000000 --- a/google-cloud-iot/clirr-ignored-differences.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - 7005 - com/google/cloud/iot/v1/DeviceManagerClient - * *Iam*(com.google.cloud.iot.v1.RegistryName*) - * *Iam*(com.google.api.resourcenames.ResourceName*) - - \ No newline at end of file diff --git a/google-cloud-iot/pom.xml b/google-cloud-iot/pom.xml index 00cb506d..f3e40e03 100644 --- a/google-cloud-iot/pom.xml +++ b/google-cloud-iot/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-iot - 0.117.1-beta + 1.0.0 jar Google Cloud IoT Core https://github.com/googleapis/java-iot @@ -11,7 +11,7 @@ com.google.cloud google-cloud-iot-parent - 0.117.1-beta + 1.0.0 google-cloud-iot diff --git a/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerSettings.java b/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerSettings.java index 9893be48..4c43f7d5 100644 --- a/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerSettings.java +++ b/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerSettings.java @@ -61,8 +61,12 @@ * * DeviceManagerSettings.Builder deviceManagerSettingsBuilder = * DeviceManagerSettings.newBuilder(); - * deviceManagerSettingsBuilder.createDeviceRegistrySettings().getRetrySettings().toBuilder() - * .setTotalTimeout(Duration.ofSeconds(30)); + * deviceManagerSettingsBuilder + * .createDeviceRegistrySettings() + * .setRetrySettings( + * deviceManagerSettingsBuilder.createDeviceRegistrySettings().getRetrySettings().toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); * DeviceManagerSettings deviceManagerSettings = deviceManagerSettingsBuilder.build(); * * diff --git a/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStubSettings.java b/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStubSettings.java index 187a8da6..f73e391d 100644 --- a/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStubSettings.java +++ b/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStubSettings.java @@ -102,8 +102,12 @@ * * DeviceManagerStubSettings.Builder deviceManagerSettingsBuilder = * DeviceManagerStubSettings.newBuilder(); - * deviceManagerSettingsBuilder.createDeviceRegistrySettings().getRetrySettings().toBuilder() - * .setTotalTimeout(Duration.ofSeconds(30)); + * deviceManagerSettingsBuilder + * .createDeviceRegistrySettings() + * .setRetrySettings( + * deviceManagerSettingsBuilder.createDeviceRegistrySettings().getRetrySettings().toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); * DeviceManagerStubSettings deviceManagerSettings = deviceManagerSettingsBuilder.build(); * * diff --git a/grpc-google-cloud-iot-v1/pom.xml b/grpc-google-cloud-iot-v1/pom.xml index 8242a24f..40f39f84 100644 --- a/grpc-google-cloud-iot-v1/pom.xml +++ b/grpc-google-cloud-iot-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-iot-v1 - 0.82.1 + 1.0.0 grpc-google-cloud-iot-v1 GRPC library for grpc-google-cloud-iot-v1 com.google.cloud google-cloud-iot-parent - 0.117.1-beta + 1.0.0 diff --git a/pom.xml b/pom.xml index 2e3425de..474c9344 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-iot-parent pom - 0.117.1-beta + 1.0.0 Google Cloud IoT Core Parent https://github.com/googleapis/java-iot @@ -63,13 +63,13 @@ UTF-8 github google-cloud-iot-parent - 1.92.4 + 1.93.1 1.8.1 1.17.0 0.13.0 - 1.53.1 - 1.27.0 - 3.11.3 + 1.54.0 + 1.27.2 + 3.11.4 4.13 28.2-android 1.4.1 @@ -82,17 +82,17 @@ com.google.api.grpc proto-google-cloud-iot-v1 - 0.82.1 + 1.0.0 com.google.api.grpc grpc-google-cloud-iot-v1 - 0.82.1 + 1.0.0 com.google.cloud google-cloud-iot - 0.117.1-beta + 1.0.0 diff --git a/proto-google-cloud-iot-v1/pom.xml b/proto-google-cloud-iot-v1/pom.xml index 1748c7ec..84aa04b5 100644 --- a/proto-google-cloud-iot-v1/pom.xml +++ b/proto-google-cloud-iot-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-iot-v1 - 0.82.1 + 1.0.0 proto-google-cloud-iot-v1 PROTO library for proto-google-cloud-iot-v1 com.google.cloud google-cloud-iot-parent - 0.117.1-beta + 1.0.0 diff --git a/renovate.json b/renovate.json index 268a4669..fc641270 100644 --- a/renovate.json +++ b/renovate.json @@ -54,6 +54,13 @@ "semanticCommitType": "build", "semanticCommitScope": "deps" }, + { + "packagePatterns": [ + "^com.google.cloud:libraries-bom" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, { "packagePatterns": [ "^com.google.cloud:google-cloud-" diff --git a/synth.metadata b/synth.metadata index 792cd7a7..fb0ef091 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,27 +1,27 @@ { - "updateTime": "2020-02-03T22:58:15.461136Z", + "updateTime": "2020-02-28T20:10:16.992676Z", "sources": [ { "generator": { "name": "artman", - "version": "0.44.4", - "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" + "version": "0.46.0", + "dockerImage": "googleapis/artman@sha256:6248a21fba8f0d618c3b032669cec2618e684b66922bb70391fe08c41b05f6ee" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "29d40b78e3dc1579b0b209463fbcb76e5767f72a", - "internalRef": "292979741", - "log": "29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\n" + "sha": "e9e90a787703ec5d388902e2cb796aaed3a385b4", + "internalRef": "297671458", + "log": "e9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\nf077632ba7fee588922d9e8717ee272039be126d\nfirestore: add update_transform\n\nPiperOrigin-RevId: 297405063\n\n0aba1900ffef672ec5f0da677cf590ee5686e13b\ncluster: use square brace for cross-reference\n\nPiperOrigin-RevId: 297204568\n\n5dac2da18f6325cbaed54603c43f0667ecd50247\nRestore retry params in gapic config because securitycenter has non-standard default retry params.\nRestore a few retry codes for some idempotent methods.\n\nPiperOrigin-RevId: 297196720\n\n1eb61455530252bba8b2c8d4bc9832960e5a56f6\npubsub: v1 replace IAM HTTP rules\n\nPiperOrigin-RevId: 297188590\n\n80b2d25f8d43d9d47024ff06ead7f7166548a7ba\nDialogflow weekly v2/v2beta1 library update:\n - updates to mega agent api\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297187629\n\n0b1876b35e98f560f9c9ca9797955f020238a092\nUse an older version of protoc-docs-plugin that is compatible with the specified gapic-generator and protobuf versions.\n\nprotoc-docs-plugin >=0.4.0 (see commit https://github.com/googleapis/protoc-docs-plugin/commit/979f03ede6678c487337f3d7e88bae58df5207af) is incompatible with protobuf 3.9.1.\n\nPiperOrigin-RevId: 296986742\n\n" } }, { "template": { "name": "java_library", "origin": "synthtool.gcp", - "version": "2019.10.17" + "version": "2020.2.4" } } ], diff --git a/versions.txt b/versions.txt index 8cb0ad6c..543cee9c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-iot-v1:0.82.1:0.82.1 -grpc-google-cloud-iot-v1:0.82.1:0.82.1 -google-cloud-iot:0.117.1-beta:0.117.1-beta +proto-google-cloud-iot-v1:1.0.0:1.0.0 +grpc-google-cloud-iot-v1:1.0.0:1.0.0 +google-cloud-iot:1.0.0:1.0.0