astefanutti commented on a change in pull request #2467:
URL: https://github.com/apache/camel-k/pull/2467#discussion_r661170536



##########
File path: pkg/cmd/run.go
##########
@@ -801,6 +800,8 @@ func resolvePodTemplate(ctx context.Context, templateSrc 
string, spec *v1.Integr
 func configureTraits(options []string, catalog *trait.Catalog) 
(map[string]v1.TraitSpec, error) {
        traits := make(map[string]map[string]interface{})
 
+       // remove any duplicate trait parameters in case it is set as modeline 
or command line parameters
+       util.StringsSliceRemoveDuplicates(&options)

Review comment:
       What is the precedence between modeline and CLI options? I think the CLI 
options should override duplicated ones from modeline?

##########
File path: e2e/common/files/JavaTraits.java
##########
@@ -0,0 +1,30 @@
+// camel-k: language=java trait=tracing.enabled=true 
trait=pull-secret.enabled=true
+
+/*
+ * 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.
+ */
+
+import org.apache.camel.builder.RouteBuilder;
+
+public class JavaTraits extends RouteBuilder {

Review comment:
       Would `e2e/cli` be a more appropriate location for this 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to