You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "greyp9 (via GitHub)" <gi...@apache.org> on 2023/04/13 14:18:35 UTC
[GitHub] [nifi] greyp9 opened a new pull request, #7172: NIFI-11439 - GCS processors; expose config of custom client endpoint
greyp9 opened a new pull request, #7172:
URL: https://github.com/apache/nifi/pull/7172
# Summary
[NIFI-11439](https://issues.apache.org/jira/browse/NIFI-11439)
# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
### Pull Request Tracking
- [x] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
- [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
### Pull Request Formatting
- [x] Pull Request based on current revision of the `main` branch
- [x] Pull Request refers to a feature branch with one commit containing changes
# Verification
Please indicate the verification steps performed prior to pull request creation.
### Build
- [x] Build completed using `mvn clean install -P contrib-check`
- [x] JDK 11
- [x] JDK 17
### Licensing
- [x] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
- [x] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
### Documentation
- [x] Documentation formatting appears as expected in rendered files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi] exceptionfactory commented on a diff in pull request #7172: NIFI-11439 - GCS processors; expose config of custom client endpoint
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #7172:
URL: https://github.com/apache/nifi/pull/7172#discussion_r1165758118
##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/storage/DeleteGCSObject.java:
##########
@@ -81,6 +81,7 @@ public class DeleteGCSObject extends AbstractGCSProcessor {
public List<PropertyDescriptor> getSupportedPropertyDescriptors() {
final List<PropertyDescriptor> descriptors = new ArrayList<>();
descriptors.addAll(super.getSupportedPropertyDescriptors());
+ descriptors.add(STORAGE_API_HOST);
Review Comment:
Instead of adding the Property Descriptor in individual components, it looks like it could be added after the Proxy Configuration Service in the AbstractGCSProcessor.
##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/storage/AbstractGCSProcessor.java:
##########
@@ -141,6 +142,10 @@ protected StorageOptions getServiceOptions(ProcessContext context, GoogleCredent
storageOptionsBuilder.setProjectId(projectId);
}
+ if (storageApiHost != null && !storageApiHost.isEmpty()) {
+ storageOptionsBuilder.setHost(storageApiHost);
Review Comment:
According to the [Private Service Connect for Google APIs](https://codelabs.developers.google.com/cloudnet-psc#12) documentation, the HTTP `Host` header should also be overridden to send `www.googleapis.com`.
##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/AbstractGCPProcessor.java:
##########
@@ -106,6 +106,16 @@
.sensitive(true)
.build();
+ // https://cloud.google.com/storage/docs/request-endpoints#storage-set-client-endpoint-java
+ public static final PropertyDescriptor STORAGE_API_HOST = new PropertyDescriptor
+ .Builder().name("storage-api-host")
+ .displayName("Storage API Host")
+ .description("Cloud Storage client libraries manage request endpoints automatically. Optionally, you can set the request endpoint manually.")
Review Comment:
Recommend adjusting the description to include some additional details on the default setting and expected custom behavior.
```suggestion
.description("Overrides the default storage URL. Configuring an alternative Storage API Host URL also overrides the HTTP Host header on requests as described in the Google documentation for Private Service Connections.")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nifi] exceptionfactory closed pull request #7172: NIFI-11439 - GCS processors; expose config of custom client endpoint
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory closed pull request #7172: NIFI-11439 - GCS processors; expose config of custom client endpoint
URL: https://github.com/apache/nifi/pull/7172
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org