forked from GoogleCloudPlatform/java-docs-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit 8929df7
authored
fix(deps): update dependency com.google.cloud:google-cloud-apikeys to v0.6.0 (GoogleCloudPlatform#7614)
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-apikeys](https://github.com/googleapis/google-cloud-java) | `0.1.0` -> `0.6.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### ⚠ Dependency Lookup Warnings ⚠
Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.
---
### Release Notes
<details>
<summary>googleapis/google-cloud-java</summary>
### [`v0.6.0`](https://github.com/googleapis/google-cloud-java/releases/tag/v0.6.0): 0.6.0
[Compare Source](https://github.com/googleapis/google-cloud-java/compare/v0.5.0...v0.6.0)
##### Credentials changes
`AuthCredentials` classes have been deleted. Use classes from [google-auth-library-java](https://github.com/google/google-auth-library-java) for authentication.
`google-cloud` will still try to infer credentials from the environment when no credentials are provided:
```java
Storage storage = StorageOptions.getDefaultInstance().getService();
```
You can also explicitly provide credentials. For instance, to use a JSON credentials file try the following code:
Storage storage = StorageOptions.newBuilder()
.setCredentials(ServiceAccountCredentials.fromStream(new FileInputStream("/path/to/my/key.json"))
.build()
.getService();
For more details see the [Authentication section](https://github.com/GoogleCloudPlatform/google-cloud-java#authentication) of the main README.
##### Features
##### PubSub
- All `pullAsync` methods now use `returnImmediately=false` and are not subject to client-side timeouts ([#&GoogleCloudPlatform#8203;1387](https://github.com/googleapis/google-cloud-java/issues/1387))
##### Translate
- Add support for the [`TranslateOption.model(String)`](http://googlecloudplatform.github.io/google-cloud-java/0.6.0/apidocs/com/google/cloud/translate/Translate.TranslateOption.html#model%28java.lang.String%29) option which allows to set the language translation model used to translate text. This option is only available to whitelisted users ([#&GoogleCloudPlatform#8203;1393](https://github.com/googleapis/google-cloud-java/issues/1393))
##### Fixes
##### Storage
- Change `BaseWriteChannel`'s `position` to `long` to fix integer overflow on big files ([#&GoogleCloudPlatform#8203;1390](https://github.com/googleapis/google-cloud-java/issues/1390))
### [`v0.5.0`](https://github.com/googleapis/google-cloud-java/releases/tag/v0.5.0): 0.5.0
[Compare Source](https://github.com/googleapis/google-cloud-java/compare/v0.4.0...v0.5.0)
##### Naming changes
- Getters and setters with the `get` and `set` prefix have been added to all classes/builders. Older getters/setters (without `get/set` prefix) have been deprecated
- Builder factory methods `builder()` have been deprecated, you should use `newBuilder()` instead
- `defaultInstance()` factory methods have been deprecated, you should use `getDefaultInstance()` instead
See the following example of using `google-cloud-storage` after the naming changes:
```java
Storage storage = StorageOptions.getDefaultInstance().getService();
BlobId blobId = BlobId.of("bucket", "blob_name");
Blob blob = storage.get(blobId);
if (blob != null) {
byte[] prevContent = blob.getContent();
System.out.println(new String(prevContent, UTF_8));
WritableByteChannel channel = blob.writer();
channel.write(ByteBuffer.wrap("Updated content".getBytes(UTF_8)));
channel.close();
}
```
##### Features
##### Datastore
- Add support to `LocalDatastoreHelper` for more recent version of the Datastore emulator installed via `gcloud` ([#&GoogleCloudPlatform#8203;1303](https://github.com/googleapis/google-cloud-java/issues/1303))
- Add `reset()` method to `LocalDatastoreHelper` to clear the status of the Datastore emulator ([#&GoogleCloudPlatform#8203;1293](https://github.com/googleapis/google-cloud-java/issues/1293))
##### PubSub
- Add support for PubSub emulator host variable. If the `PUBSUB_EMULATOR_HOST` environment variable is set, the PubSub client uses it to locate the PubSub emulator. ([#&GoogleCloudPlatform#8203;1317](https://github.com/googleapis/google-cloud-java/issues/1317))
##### Fixes
##### Datastore
- Allow `LocalDatastoreHelper` to properly cache downloaded copies of the Datastore emulator ([#&GoogleCloudPlatform#8203;1302](https://github.com/googleapis/google-cloud-java/issues/1302))
##### Storage
- Fix regression in `Storage.signUrl` to support blob names containing `/` characters ([#&GoogleCloudPlatform#8203;1346](https://github.com/googleapis/google-cloud-java/issues/1346))
- Allow `Storage.reader` to read gzip blobs in compressed chunks. This prevents `ReadChannel` from trying (and failing) to uncompress gzipped chunks ([#&GoogleCloudPlatform#8203;1301](https://github.com/googleapis/google-cloud-java/issues/1301))
##### Storage NIO
- All dependencies are now shaded in the `google-cloud-nio` shaded jar ([#&GoogleCloudPlatform#8203;1327](https://github.com/googleapis/google-cloud-java/issues/1327))
### [`v0.4.0`](https://github.com/googleapis/google-cloud-java/releases/tag/v0.4.0): 0.4.0
[Compare Source](https://github.com/googleapis/google-cloud-java/compare/v0.3.0...v0.4.0)
##### Features
##### BigQuery
- Add `of(String)` factory method to DatasetInfo ([#&GoogleCloudPlatform#8203;1275](https://github.com/googleapis/google-cloud-java/issues/1275))
```java
bigquery.create(DatasetInfo.of("dataset-name"));
```
##### Core
- `google-cloud` now depends on `protobuf 3.0.0` and `grpc 1.0.1` ([#&GoogleCloudPlatform#8203;1273](https://github.com/googleapis/google-cloud-java/issues/1273))
##### PubSub
- Add support for IAM methods for sinks and subscriptions ([#&GoogleCloudPlatform#8203;1231](https://github.com/googleapis/google-cloud-java/issues/1231))
```java
// Example of replacing a subscription policy
Policy policy = pubsub.getSubscriptionPolicy(subscriptionName);
Policy updatedPolicy = policy.toBuilder()
.addIdentity(Role.viewer(), Identity.allAuthenticatedUsers())
.build();
updatedPolicy = pubsub.replaceSubscriptionPolicy(subscriptionName, updatedPolicy);
// Example of asynchronously replacing a topic policy
Policy policy = pubsub.getTopicPolicy(topicName);
Policy updatedPolicy = policy.toBuilder()
.addIdentity(Role.viewer(), Identity.allAuthenticatedUsers())
.build();
Future<Policy> future = pubsub.replaceTopicPolicyAsync(topicName, updatedPolicy);
// ...
updatedPolicy = future.get();
```
##### Storage
- Add support for create/get/update/delete/list ACLs for blobs and buckets ([#&GoogleCloudPlatform#8203;1228](https://github.com/googleapis/google-cloud-java/issues/1228))
```java
// Example of updating the ACL for a blob
BlobId blobId = BlobId.of(bucketName, blobName, blobGeneration);
Acl acl = storage.updateAcl(blobId, Acl.of(User.ofAllAuthenticatedUsers(), Role.OWNER));
// Example of listing the ACL entries for a bucket
List<Acl> acls = storage.listAcls(bucketName);
for (Acl acl : acls) {
// do something with ACL entry
}
```
- Add support for [customer-supplied encryption keys](https://cloud.google.com/storage/docs/encryption#customer-supplied) ([#&GoogleCloudPlatform#8203;1236](https://github.com/googleapis/google-cloud-java/issues/1236))
```java
Key key = ...;
String base64Key = ...;
byte[] content = {0xD, 0xE, 0xA, 0xD};
BlobInfo blobInfo = BlobInfo.builder(bucketName, blobName).build();
// Example of creating a blob with a customer-supplied encryption key (as Key object)
storage.create(blobInfo, content, Storage.BlobTargetOption.encryptionKey(key));
// Example of reading a blob with a customer-supplied decryption key (as base64 String)
byte[] readBytes =
storage.readAllBytes(bucketName, blobName, Storage.BlobSourceOption.decryptionKey(base64Key));
```
##### Fixes
##### BigQuery
- Support operations on tables/datasets/jobs in projects other than the one set in `BigQueryOptions` ([#&GoogleCloudPlatform#8203;1217](https://github.com/googleapis/google-cloud-java/issues/1217))
- Allow constructing a `RowToInsert` using `Map<Str, ? extends Object>` rather than `Map<Str, Object>` ([#&GoogleCloudPlatform#8203;1259](https://github.com/googleapis/google-cloud-java/issues/1259))
##### Datastore
- Retry `ABORTED` Datastore commits only when the commit was `NON_TRANSACTIONAL` ([#&GoogleCloudPlatform#8203;1235](https://github.com/googleapis/google-cloud-java/issues/1235))
##### Logging
- Remove unnecessary `MetricInfo` parameter from `Metric.updateAsync()` ([#&GoogleCloudPlatform#8203;1221](https://github.com/googleapis/google-cloud-java/issues/1221))
- Remove unnecessary `SinkInfo` parameter from `Sink.updateAsync()` ([#&GoogleCloudPlatform#8203;1222](https://github.com/googleapis/google-cloud-java/issues/1222))
- `Logging.deleteSink` now returns `false` on `NOT_FOUND` ([#&GoogleCloudPlatform#8203;1222](https://github.com/googleapis/google-cloud-java/issues/1222))
##### Storage
- Retry calls that open a resumable upload session in `WriteChannel`, when they fail with a retryable error ([#&GoogleCloudPlatform#8203;1233](https://github.com/googleapis/google-cloud-java/issues/1233))
- Fix generation of signed URLs for blobs containing spaces and other special chars ([#&GoogleCloudPlatform#8203;1277](https://github.com/googleapis/google-cloud-java/issues/1277) - thanks to [@&GoogleCloudPlatform#8203;ostronom](https://github.com/ostronom))
### [`v0.3.0`](https://github.com/googleapis/google-cloud-java/releases/tag/v0.3.0): 0.3.0
[Compare Source](https://github.com/googleapis/google-cloud-java/compare/v0.2.0...v0.3.0)
##### `gcloud-java` renamed to `google-cloud`
`gcloud-java` has been deprecated and renamed to `google-cloud`.
If you are using Maven, add this to your pom.xml file
```xml
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud</artifactId>
<version>0.3.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud:0.3.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.3.0"
```
##### `gcloud-java-<service>` renamed to `google-cloud-<service>`
Service-specific artifacts have also been renamed from `gcloud-java-<service>` to `google-cloud-<service>`. See the following for examples of adding `google-cloud-datastore` as a dependency:
```xml
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-datastore</artifactId>
<version>0.3.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-datastore:0.3.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "0.3.0"
```
##### Other changes
- `GCLOUD_PROJECT` environment variable is now deprecated, use `GOOGLE_CLOUD_PROJECT` to set your default project id.
- The project URL is now: https://googlecloudplatform.github.io/google-cloud-java/
- The GitHub repo is now: https://github.com/GoogleCloudPlatform/google-cloud-java/
### [`v0.2.0`](https://github.com/googleapis/google-cloud-java/releases/tag/v0.2.0): 0.2.0
[Compare Source](https://github.com/googleapis/google-cloud-java/compare/v0.1.2...v0.2.0)
##### Features
##### General
- `gcloud-java` has been repackaged. `com.google.gcloud` has now changed to `com.google.cloud`, and we're releasing our artifacts on maven under the Group ID `com.google.cloud` rather than `com.google.gcloud`. The new way to add our library as a dependency in your project is as follows:
If you're using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>gcloud-java</artifactId>
<version>0.2.0</version>
</dependency>
If you are using Gradle, add this to your dependencies
compile 'com.google.cloud:gcloud-java:0.2.0'
If you are using SBT, add this to your dependencies
libraryDependencies += "com.google.cloud" % "gcloud-java" % "0.2.0"
##### Storage
- The interface `ServiceAccountSigner` was added. Both `AppEngineAuthCredentials` and `ServiceAccountAuthCredentials` extend this interface and can be used to sign Google Cloud Storage blob URLs ([#&GoogleCloudPlatform#8203;701](https://github.com/googleapis/google-cloud-java/issues/701), [#&GoogleCloudPlatform#8203;854](https://github.com/googleapis/google-cloud-java/issues/854)).
##### Fixes
##### General
- The default RPC retry parameters were changed to align with the backoff policy requirement listed in the Service Level Agreements (SLAs) for Cloud BigQuery, and Cloud Datastore, and Cloud Storage ([#&GoogleCloudPlatform#8203;857](https://github.com/googleapis/google-cloud-java/issues/857), [#&GoogleCloudPlatform#8203;860](https://github.com/googleapis/google-cloud-java/issues/860)).
- The expiration date is now properly populated for App Engine credentials ([#&GoogleCloudPlatform#8203;873](https://github.com/googleapis/google-cloud-java/issues/873), [#&GoogleCloudPlatform#8203;894](https://github.com/googleapis/google-cloud-java/issues/894)).
- `gcloud-java` now uses the project ID given in the credentials file specified by the environment variable `GOOGLE_APPLICATION_CREDENTIALS` (if set) ([#&GoogleCloudPlatform#8203;845](https://github.com/googleapis/google-cloud-java/issues/845)).
##### BigQuery
- `Job`'s `isDone` method is fixed to return true if the job is complete or the job doesn't exist ([#&GoogleCloudPlatform#8203;853](https://github.com/googleapis/google-cloud-java/issues/853)).
##### Datastore
- `LocalGcdHelper` has been renamed to `RemoteDatastoreHelper`, and the command line startup/shutdown of the helper has been removed. The helper is now more consistent with other modules' test helpers and can be used via the `create`, `start`, and `stop` methods ([#&GoogleCloudPlatform#8203;821](https://github.com/googleapis/google-cloud-java/issues/821)).
- `ListValue` no longer rejects empty lists, since Cloud Datastore v1beta3 supports empty array values ([#&GoogleCloudPlatform#8203;862](https://github.com/googleapis/google-cloud-java/issues/862)).
##### DNS
- There were some minor changes to `ChangeRequest`, namely adding `reload`/`isDone` methods and changing the method signature of `applyTo` ([#&GoogleCloudPlatform#8203;849](https://github.com/googleapis/google-cloud-java/issues/849)).
##### Storage
- `RemoteGcsHelper` was renamed to `RemoteStorageHelper` to be more consistent with other modules' test helpers ([#&GoogleCloudPlatform#8203;821](https://github.com/googleapis/google-cloud-java/issues/821)).
### [`v0.1.2`](https://github.com/googleapis/google-cloud-java/releases/tag/v0.1.2): 0.1.2
[Compare Source](https://github.com/googleapis/google-cloud-java/compare/v0.1.0...v0.1.2)
##### Features
##### Core
- By default, requests are now retried ([#&GoogleCloudPlatform#8203;547](https://github.com/googleapis/google-cloud-java/issues/547)).
For example:
```java
// Use the default retry strategy
Storage storageWithRetries = StorageOptions.defaultInstance().service();
// Don't use retries
Storage storageWithoutRetries = StorageOptions.builder()
.retryParams(RetryParams.noRetries())
.build()
.service()
```
##### BigQuery
- Functional classes for datasets, jobs, and tables are added ([#&GoogleCloudPlatform#8203;516](https://github.com/googleapis/google-cloud-java/issues/516))
- [Query Plan](https://cloud.google.com/bigquery/query-plan-explanation) is now supported ([#&GoogleCloudPlatform#8203;523](https://github.com/googleapis/google-cloud-java/issues/523)).
- [Template suffix](https://cloud.google.com/bigquery/streaming-data-into-bigquery#template_table_details) is now supported ([#&GoogleCloudPlatform#8203;514](https://github.com/googleapis/google-cloud-java/issues/514)).
##### Fixes
##### Datastore
- `QueryResults.cursorAfter()` is now set when all results from a query have been exhausted ([#&GoogleCloudPlatform#8203;549](https://github.com/googleapis/google-cloud-java/issues/549)).
When running large queries, users may see Datastore-internal errors with code 500 due to a [Datastore issue](https://github.com/GoogleCloudPlatform/google-cloud-datastore/issues/85). This issue will be fixed in the next version of Datastore. Until then, users can set a limit on their query and use the cursor to get more results in subsequent queries. Here is an example:
```java
int limit = 100;
StructuredQuery<Entity> query = Query.entityQueryBuilder()
.kind("user")
.limit(limit)
.build();
while (true) {
QueryResults<Entity> results = datastore.run(query);
int resultCount = 0;
while (results.hasNext()) {
Entity result = results.next(); // consume all results
// do something with the result
resultCount++;
}
if (resultCount < limit) {
break;
}
query = query.toBuilder().startCursor(results.cursorAfter()).build();
}
```
- `load` is renamed to `get` in functional classes ([#&GoogleCloudPlatform#8203;535](https://github.com/googleapis/google-cloud-java/issues/535))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/GoogleCloudPlatform/java-docs-samples).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC45Ny42IiwidXBkYXRlZEluVmVyIjoiMzQuOTcuNiJ9-->1 parent db6d439 commit 8929df7Copy full SHA for 8929df7
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changed+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
73 |
| - | |
| 73 | + | |
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
|
0 commit comments