You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2019/12/20 16:27:28 UTC

[GitHub] [camel-quarkus] oscerd opened a new pull request #565: AWS-EC2 Extension

oscerd opened a new pull request #565: AWS-EC2 Extension
URL: https://github.com/apache/camel-quarkus/pull/565
 
 
   Fixes #562 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] asf-ci commented on issue #565: AWS-EC2 Extension

Posted by GitBox <gi...@apache.org>.
asf-ci commented on issue #565: AWS-EC2 Extension
URL: https://github.com/apache/camel-quarkus/pull/565#issuecomment-568076388
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/camel-quarkus-pr/495/
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] oscerd merged pull request #565: AWS-EC2 Extension

Posted by GitBox <gi...@apache.org>.
oscerd merged pull request #565: AWS-EC2 Extension
URL: https://github.com/apache/camel-quarkus/pull/565
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #565: AWS-EC2 Extension

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #565: AWS-EC2 Extension
URL: https://github.com/apache/camel-quarkus/pull/565#discussion_r360469392
 
 

 ##########
 File path: extensions/aws-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ec2/deployment/AwsEc2Processor.java
 ##########
 @@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.aws.ec2.deployment;
+
+import java.util.Collection;
+import java.util.stream.Collectors;
+
+import org.apache.camel.component.aws.ec2.EC2Configuration;
+import org.jboss.jandex.ClassInfo;
+import org.jboss.jandex.DotName;
+import org.jboss.jandex.IndexView;
+
+import com.amazonaws.partitions.model.CredentialScope;
+import com.amazonaws.partitions.model.Endpoint;
+import com.amazonaws.partitions.model.Partition;
+import com.amazonaws.partitions.model.Partitions;
+import com.amazonaws.partitions.model.Region;
+import com.amazonaws.partitions.model.Service;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonSerializer;
+
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageProxyDefinitionBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+
+class AwsEc2Processor {
+    public static final String AWS_EC2_APPLICATION_ARCHIVE_MARKERS = "com/amazonaws";
+
+    private static final String FEATURE = "camel-aws-ec2";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+        return new ExtensionSslNativeSupportBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    NativeImageProxyDefinitionBuildItem httpProxies() {
+        return new NativeImageProxyDefinitionBuildItem("org.apache.http.conn.HttpClientConnectionManager",
+                "org.apache.http.pool.ConnPoolControl", "com.amazonaws.http.conn.Wrapped");
+    }
+
+    @BuildStep(applicationArchiveMarkers = { AWS_EC2_APPLICATION_ARCHIVE_MARKERS })
+    void process(CombinedIndexBuildItem combinedIndexBuildItem,
+            BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
+            BuildProducer<NativeImageResourceBuildItem> resource) {
+
+        IndexView view = combinedIndexBuildItem.getIndex();
+
+        resource.produce(new NativeImageResourceBuildItem("com/amazonaws/partitions/endpoints.json"));
+        for (String s : getImplementations(view, JsonDeserializer.class)) {
+            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
+        }
+        for (String s : getImplementations(view, JsonSerializer.class)) {
+            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
 
 Review comment:
   The jackson extension from Quarkus seems to handle JsonDeserializer and JsonSerializer. Maybe we should consider using that one?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] oscerd commented on issue #565: AWS-EC2 Extension

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #565: AWS-EC2 Extension
URL: https://github.com/apache/camel-quarkus/pull/565#issuecomment-567985153
 
 
   ok to test

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #565: AWS-EC2 Extension

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #565: AWS-EC2 Extension
URL: https://github.com/apache/camel-quarkus/pull/565#discussion_r360468103
 
 

 ##########
 File path: extensions/aws-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ec2/deployment/AwsEc2Processor.java
 ##########
 @@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.aws.ec2.deployment;
+
+import java.util.Collection;
+import java.util.stream.Collectors;
+
+import org.apache.camel.component.aws.ec2.EC2Configuration;
+import org.jboss.jandex.ClassInfo;
+import org.jboss.jandex.DotName;
+import org.jboss.jandex.IndexView;
+
+import com.amazonaws.partitions.model.CredentialScope;
+import com.amazonaws.partitions.model.Endpoint;
+import com.amazonaws.partitions.model.Partition;
+import com.amazonaws.partitions.model.Partitions;
+import com.amazonaws.partitions.model.Region;
+import com.amazonaws.partitions.model.Service;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonSerializer;
+
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageProxyDefinitionBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+
+class AwsEc2Processor {
+    public static final String AWS_EC2_APPLICATION_ARCHIVE_MARKERS = "com/amazonaws";
+
+    private static final String FEATURE = "camel-aws-ec2";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+        return new ExtensionSslNativeSupportBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    NativeImageProxyDefinitionBuildItem httpProxies() {
+        return new NativeImageProxyDefinitionBuildItem("org.apache.http.conn.HttpClientConnectionManager",
 
 Review comment:
   This is repeated in each AWS extension. Maybe we should consider a new support extension for this HTTP client stuff on which all AWS extensions could depend?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] oscerd commented on a change in pull request #565: AWS-EC2 Extension

Posted by GitBox <gi...@apache.org>.
oscerd commented on a change in pull request #565: AWS-EC2 Extension
URL: https://github.com/apache/camel-quarkus/pull/565#discussion_r360507616
 
 

 ##########
 File path: extensions/aws-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ec2/deployment/AwsEc2Processor.java
 ##########
 @@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.aws.ec2.deployment;
+
+import java.util.Collection;
+import java.util.stream.Collectors;
+
+import org.apache.camel.component.aws.ec2.EC2Configuration;
+import org.jboss.jandex.ClassInfo;
+import org.jboss.jandex.DotName;
+import org.jboss.jandex.IndexView;
+
+import com.amazonaws.partitions.model.CredentialScope;
+import com.amazonaws.partitions.model.Endpoint;
+import com.amazonaws.partitions.model.Partition;
+import com.amazonaws.partitions.model.Partitions;
+import com.amazonaws.partitions.model.Region;
+import com.amazonaws.partitions.model.Service;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonSerializer;
+
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageProxyDefinitionBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+
+class AwsEc2Processor {
+    public static final String AWS_EC2_APPLICATION_ARCHIVE_MARKERS = "com/amazonaws";
+
+    private static final String FEATURE = "camel-aws-ec2";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+        return new ExtensionSslNativeSupportBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    NativeImageProxyDefinitionBuildItem httpProxies() {
+        return new NativeImageProxyDefinitionBuildItem("org.apache.http.conn.HttpClientConnectionManager",
+                "org.apache.http.pool.ConnPoolControl", "com.amazonaws.http.conn.Wrapped");
+    }
+
+    @BuildStep(applicationArchiveMarkers = { AWS_EC2_APPLICATION_ARCHIVE_MARKERS })
+    void process(CombinedIndexBuildItem combinedIndexBuildItem,
+            BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
+            BuildProducer<NativeImageResourceBuildItem> resource) {
+
+        IndexView view = combinedIndexBuildItem.getIndex();
+
+        resource.produce(new NativeImageResourceBuildItem("com/amazonaws/partitions/endpoints.json"));
+        for (String s : getImplementations(view, JsonDeserializer.class)) {
+            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
+        }
+        for (String s : getImplementations(view, JsonSerializer.class)) {
+            reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s));
 
 Review comment:
   Yes, sure. We need to investigate the version used perhaps.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] oscerd commented on a change in pull request #565: AWS-EC2 Extension

Posted by GitBox <gi...@apache.org>.
oscerd commented on a change in pull request #565: AWS-EC2 Extension
URL: https://github.com/apache/camel-quarkus/pull/565#discussion_r360507429
 
 

 ##########
 File path: extensions/aws-ec2/deployment/src/main/java/org/apache/camel/quarkus/component/aws/ec2/deployment/AwsEc2Processor.java
 ##########
 @@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.aws.ec2.deployment;
+
+import java.util.Collection;
+import java.util.stream.Collectors;
+
+import org.apache.camel.component.aws.ec2.EC2Configuration;
+import org.jboss.jandex.ClassInfo;
+import org.jboss.jandex.DotName;
+import org.jboss.jandex.IndexView;
+
+import com.amazonaws.partitions.model.CredentialScope;
+import com.amazonaws.partitions.model.Endpoint;
+import com.amazonaws.partitions.model.Partition;
+import com.amazonaws.partitions.model.Partitions;
+import com.amazonaws.partitions.model.Region;
+import com.amazonaws.partitions.model.Service;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonSerializer;
+
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageProxyDefinitionBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+
+class AwsEc2Processor {
+    public static final String AWS_EC2_APPLICATION_ARCHIVE_MARKERS = "com/amazonaws";
+
+    private static final String FEATURE = "camel-aws-ec2";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+        return new ExtensionSslNativeSupportBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    NativeImageProxyDefinitionBuildItem httpProxies() {
+        return new NativeImageProxyDefinitionBuildItem("org.apache.http.conn.HttpClientConnectionManager",
 
 Review comment:
   Yes, it makes sense. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services