[GitHub] nifi pull request #2968: NIFI-5456: AWS clients now work with private link e...

2018-12-12 Thread zenfenan
Github user zenfenan commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2968#discussion_r241044902
  
--- Diff: 
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java
 ---
@@ -286,7 +286,7 @@ protected void 
initializeRegionAndEndpoint(ProcessContext context) {
 final String urlstr = 
StringUtils.trimToEmpty(context.getProperty(ENDPOINT_OVERRIDE).evaluateAttributeExpressions().getValue());
 if (!urlstr.isEmpty()) {
 getLogger().info("Overriding endpoint with {}", new 
Object[]{urlstr});
-this.client.setEndpoint(urlstr);
+this.client.setEndpoint(urlstr, 
this.client.getServiceName(), this.region.getName());
--- End diff --

Thanks @amcdonaldccri for pointing this out. I'll work on fixing it.


---


[GitHub] nifi pull request #2968: NIFI-5456: AWS clients now work with private link e...

2018-11-30 Thread amcdonaldccri
Github user amcdonaldccri commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2968#discussion_r237865566
  
--- Diff: 
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java
 ---
@@ -286,7 +286,7 @@ protected void 
initializeRegionAndEndpoint(ProcessContext context) {
 final String urlstr = 
StringUtils.trimToEmpty(context.getProperty(ENDPOINT_OVERRIDE).evaluateAttributeExpressions().getValue());
 if (!urlstr.isEmpty()) {
 getLogger().info("Overriding endpoint with {}", new 
Object[]{urlstr});
-this.client.setEndpoint(urlstr);
+this.client.setEndpoint(urlstr, 
this.client.getServiceName(), this.region.getName());
--- End diff --

Using this.region.getName() doesn't make sense to me because the aws docs 
for 
public void setEndpoint(String endpoint, String serviceName, String 
regionId)
say
 * @param regionId
 *The ID of the region in which this service resides AND the
 *overriding region for signing purposes.
so the regionId is the same as the overriding region but using this.region 
is using the enum.


---


[GitHub] nifi pull request #2968: NIFI-5456: AWS clients now work with private link e...

2018-09-05 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/nifi/pull/2968


---


[GitHub] nifi pull request #2968: NIFI-5456: AWS clients now work with private link e...

2018-09-04 Thread zenfenan
Github user zenfenan commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2968#discussion_r215131280
  
--- Diff: 
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java
 ---
@@ -286,7 +286,7 @@ protected void 
initializeRegionAndEndpoint(ProcessContext context) {
 final String urlstr = 
StringUtils.trimToEmpty(context.getProperty(ENDPOINT_OVERRIDE).evaluateAttributeExpressions().getValue());
 if (!urlstr.isEmpty()) {
 getLogger().info("Overriding endpoint with {}", new 
Object[]{urlstr});
-this.client.setEndpoint(urlstr);
+this.client.setEndpoint(urlstr, 
this.client.getServiceName(), this.region.getName());
--- End diff --

@joewitt The patch has been tested by @Mermadi and it is working fine. Can 
we close this one?


---


[GitHub] nifi pull request #2968: NIFI-5456: AWS clients now work with private link e...

2018-08-29 Thread zenfenan
Github user zenfenan commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2968#discussion_r213901647
  
--- Diff: 
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java
 ---
@@ -286,7 +286,7 @@ protected void 
initializeRegionAndEndpoint(ProcessContext context) {
 final String urlstr = 
StringUtils.trimToEmpty(context.getProperty(ENDPOINT_OVERRIDE).evaluateAttributeExpressions().getValue());
 if (!urlstr.isEmpty()) {
 getLogger().info("Overriding endpoint with {}", new 
Object[]{urlstr});
-this.client.setEndpoint(urlstr);
+this.client.setEndpoint(urlstr, 
this.client.getServiceName(), this.region.getName());
--- End diff --

Yep. They will be present always. We have made `Region` a `required` 
parameter so it will be there. The service name is provided by the AWSClient 
implementation in the AWS SDK. Gone through their implementation and verified 
that, it takes care of undefined and null service names i.e, it computes the 
service name again and returns, if it turns out to be null.


---


[GitHub] nifi pull request #2968: NIFI-5456: AWS clients now work with private link e...

2018-08-28 Thread joewitt
Github user joewitt commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2968#discussion_r213431435
  
--- Diff: 
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java
 ---
@@ -286,7 +286,7 @@ protected void 
initializeRegionAndEndpoint(ProcessContext context) {
 final String urlstr = 
StringUtils.trimToEmpty(context.getProperty(ENDPOINT_OVERRIDE).evaluateAttributeExpressions().getValue());
 if (!urlstr.isEmpty()) {
 getLogger().info("Overriding endpoint with {}", new 
Object[]{urlstr});
-this.client.setEndpoint(urlstr);
+this.client.setEndpoint(urlstr, 
this.client.getServiceName(), this.region.getName());
--- End diff --

these values will always be present?  We dont have to guard from them being 
null/undefined/different than the API being called expects?


---


[GitHub] nifi pull request #2968: NIFI-5456: AWS clients now work with private link e...

2018-08-26 Thread zenfenan
GitHub user zenfenan opened a pull request:

https://github.com/apache/nifi/pull/2968

NIFI-5456: AWS clients now work with private link endpoints (VPC)

Thank you for submitting a contribution to Apache NiFi.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced 
 in the commit message?

- [x] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.

- [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?

- [x] Is your initial contribution a single, squashed commit?

### For code changes:
- [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
- [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
- [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
- [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?

### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zenfenan/nifi NIFI-5456

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi/pull/2968.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2968


commit 7b390a9d0b003301f22a89cecf07a622bbc78f5e
Author: zenfenan 
Date:   2018-08-26T13:36:45Z

NIFI-5456: AWS clients now work with private link endpoints (VPC)




---