[jira] [Resolved] (CAMEL-18284) Provide command to set default value to use by Camel JBang

2023-03-07 Thread Claus Ibsen (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-18284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-18284.
-
Resolution: Duplicate

> Provide command to set default value to use by Camel JBang
> --
>
> Key: CAMEL-18284
> URL: https://issues.apache.org/jira/browse/CAMEL-18284
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-jbang
>Affects Versions: 3.18.0
>Reporter: Aurélien Pupier
>Priority: Minor
> Fix For: 3.x
>
>
> it will avoid having to set all the time the version through 
> -Dcamel.jbang.version=XXX or to change an hidden file manually.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (CAMEL-19120) camel-jbang - export configurable template

2023-03-07 Thread Claus Ibsen (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-19120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-19120.
-
Resolution: Fixed

> camel-jbang - export configurable template
> --
>
> Key: CAMEL-19120
> URL: https://issues.apache.org/jira/browse/CAMEL-19120
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-jbang
>Reporter: Federico Mariani
>Assignee: Federico Mariani
>Priority: Major
> Fix For: 3.20.3, 3.21.0, 4.0-M3, 4.0
>
>
> Make templates file used by export configurable from classpath, so that 
> camel-spring-boot or camel-quarkus can provide custom implementation and/or 
> overrides



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (CAMEL-19124) Tracer doesn't continue spans for AbstractInternalSpanDecorator

2023-03-07 Thread Claus Ibsen (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-19124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-19124:

Fix Version/s: 3.20.3
   3.21.0
   4.0-M3
   4.0

> Tracer doesn't continue spans for AbstractInternalSpanDecorator
> ---
>
> Key: CAMEL-19124
> URL: https://issues.apache.org/jira/browse/CAMEL-19124
> Project: Camel
>  Issue Type: Bug
>  Components: camel-tracing
>Affects Versions: 3.20.2, 3.x, 4.0
>Reporter: Marcin Grzejszczak
>Priority: Major
> Fix For: 3.20.3, 3.21.0, 4.0-M3, 4.0
>
> Attachments: trace_view_with_fix.png, trace_view_without_fix.png
>
>
> As discussed in the [PR|https://github.com/apache/camel/pull/9389] it seems 
> that the `Tracer`component from `camel-tracing` is not continuing spans if a 
> `AbstractInternalSpanDecorator` is being created. So for the following route
> {code:java}
> from("direct://foo")
>   .log("hello")
>   .to("direct://bar")
>   .to("http://example.org;);
>   from("direct://bar")
>   .log("hello")
>   .to("direct://micrometer")
>   .to("http://example.org;);
>   from("direct://micrometer")
>   
> .setHeader(MicrometerConstants.HEADER_METRIC_NAME, constant("new.name"))
>   
> .setHeader(MicrometerConstants.HEADER_METRIC_TAGS, 
> constant(Tags.of("dynamic-key", "dynamic-value")))
>   
> .to("micrometer:counter:name.not.used?tags=key=value")
>   .to("direct://baz");
>   from("direct://baz")
>   .log("hello")
>   .to("bean:com.example.cameldemo.MyBean")
>   .to("exec:wc?args=--words 
> /usr/share/dict/words")
>   .process(exchange -> {
>   // Use the Camel Exec String type 
> converter to convert the ExecResult to String
>   // In this case, the stdout is 
> considered as output
>   String wordCountOutput = 
> exchange.getIn().getBody(String.class);
>   // do something with the word count
>   System.out.println(wordCountOutput);
>   })
>   .to("file:///tmp/camel-outputdir?flatten=true")
>   .to("http://example.org;);
> {code}
> you will get multiple traces since the `direct` components are not linked 
> together (they are treated as a start of a new trace).
>  !trace_view_without_fix.png! 
> I think we agreed that for this route example, multiple routes are linked 
> together but all in all they form a single trace. So if 
> `org.apache.camel.tracing.Tracer.TracingEventNotifier#shouldExclude` would be 
> changed from 
> {code:java}
> private boolean shouldExclude(SpanDecorator sd, Exchange exchange, Endpoint 
> endpoint) {
> return sd instanceof AbstractInternalSpanDecorator || 
> !sd.newSpan()
> || isExcluded(exchange, endpoint);
> }
> {code}
> to
> {code:java}
> private boolean shouldExclude(SpanDecorator sd, Exchange exchange, Endpoint 
> endpoint) {
> return !sd.newSpan()
> || isExcluded(exchange, endpoint);
> }
> {code}
> then the span parent-child relationship gets maintained the way it should
>  !trace_view_with_fix.png! 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (CAMEL-18508) camel-jbang - User config file

2023-03-07 Thread Claus Ibsen (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-18508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reassigned CAMEL-18508:
---

Assignee: Federico Mariani  (was: Claus Ibsen)

> camel-jbang - User config file
> --
>
> Key: CAMEL-18508
> URL: https://issues.apache.org/jira/browse/CAMEL-18508
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-jbang
>Reporter: Claus Ibsen
>Assignee: Federico Mariani
>Priority: Major
> Fix For: 3.20.3, 3.21.0, 4.0-M3, 4.0
>
>
> It would be good to allow a user config file, where you can store various 
> default values and versions for camel-jbang, such as
> - 3rd party maven repos
> - specific camel version to use
> - specific spring boot / quarkus version to use
> - etc.
> The config should contain key=value pairs as .properties which maps to CLI 
> arguments when using the camel CLI.
> We can have commands ala:
> camel config list
> camel config get x
> camel config set x=y
> camel config unset x



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CAMEL-19124) Tracer doesn't continue spans for AbstractInternalSpanDecorator

2023-03-07 Thread Marcin Grzejszczak (Jira)
Marcin Grzejszczak created CAMEL-19124:
--

 Summary: Tracer doesn't continue spans for 
AbstractInternalSpanDecorator
 Key: CAMEL-19124
 URL: https://issues.apache.org/jira/browse/CAMEL-19124
 Project: Camel
  Issue Type: Bug
  Components: camel-tracing
Affects Versions: 3.20.2, 3.x, 4.0
Reporter: Marcin Grzejszczak
 Attachments: trace_view_with_fix.png, trace_view_without_fix.png

As discussed in the [PR|https://github.com/apache/camel/pull/9389] it seems 
that the `Tracer`component from `camel-tracing` is not continuing spans if a 
`AbstractInternalSpanDecorator` is being created. So for the following route

{code:java}
from("direct://foo")
.log("hello")
.to("direct://bar")
.to("http://example.org;);
from("direct://bar")
.log("hello")
.to("direct://micrometer")
.to("http://example.org;);
from("direct://micrometer")

.setHeader(MicrometerConstants.HEADER_METRIC_NAME, constant("new.name"))

.setHeader(MicrometerConstants.HEADER_METRIC_TAGS, 
constant(Tags.of("dynamic-key", "dynamic-value")))

.to("micrometer:counter:name.not.used?tags=key=value")
.to("direct://baz");
from("direct://baz")
.log("hello")
.to("bean:com.example.cameldemo.MyBean")
.to("exec:wc?args=--words 
/usr/share/dict/words")
.process(exchange -> {
// Use the Camel Exec String type 
converter to convert the ExecResult to String
// In this case, the stdout is 
considered as output
String wordCountOutput = 
exchange.getIn().getBody(String.class);
// do something with the word count
System.out.println(wordCountOutput);
})
.to("file:///tmp/camel-outputdir?flatten=true")
.to("http://example.org;);
{code}

you will get multiple traces since the `direct` components are not linked 
together (they are treated as a start of a new trace).

 !trace_view_without_fix.png! 

I think we agreed that for this route example, multiple routes are linked 
together but all in all they form a single trace. So if 
`org.apache.camel.tracing.Tracer.TracingEventNotifier#shouldExclude` would be 
changed from 

{code:java}
private boolean shouldExclude(SpanDecorator sd, Exchange exchange, Endpoint 
endpoint) {
return sd instanceof AbstractInternalSpanDecorator || !sd.newSpan()
|| isExcluded(exchange, endpoint);
}
{code}

to

{code:java}
private boolean shouldExclude(SpanDecorator sd, Exchange exchange, Endpoint 
endpoint) {
return !sd.newSpan()
|| isExcluded(exchange, endpoint);
}
{code}

then the span parent-child relationship gets maintained the way it should

 !trace_view_with_fix.png! 















--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-18508) camel-jbang - User config file

2023-03-07 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-18508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17697458#comment-17697458
 ] 

Claus Ibsen commented on CAMEL-18508:
-

branch with prototype
https://github.com/apache/camel/tree/jbang-user-config

You can then have a user config in ~/.camel-jbang-user.properties
where you can have default values for all command line options such as

camel-version = 3.20.1

then

camel run foo.yaml

will then use that camel version

> camel-jbang - User config file
> --
>
> Key: CAMEL-18508
> URL: https://issues.apache.org/jira/browse/CAMEL-18508
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-jbang
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 3.20.3, 3.21.0, 4.0-M3, 4.0
>
>
> It would be good to allow a user config file, where you can store various 
> default values and versions for camel-jbang, such as
> - 3rd party maven repos
> - specific camel version to use
> - specific spring boot / quarkus version to use
> - etc.
> The config should contain key=value pairs as .properties which maps to CLI 
> arguments when using the camel CLI.
> We can have commands ala:
> camel config list
> camel config get x
> camel config set x=y
> camel config unset x



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (CAMEL-19113) Platform-http-vertx: consume with comma separated does not work

2023-03-07 Thread Claus Ibsen (Jira)


 [ 
https://issues.apache.org/jira/browse/CAMEL-19113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-19113.
-
Resolution: Fixed

> Platform-http-vertx: consume with comma separated does not work
> ---
>
> Key: CAMEL-19113
> URL: https://issues.apache.org/jira/browse/CAMEL-19113
> Project: Camel
>  Issue Type: Bug
>  Components: camel-platform-http-vertx
>Affects Versions: 3.18.5, 3.20.2
>Reporter: Jiri Ondrusek
>Assignee: Jiri Ondrusek
>Priority: Major
> Fix For: 3.18.6, 3.20.3, 3.21.0, 4.0-M3, 4.0
>
>
> When rest DSL defines following endpoint
> {code:java}
> rest().get("/test")
> .consumes("application/json,application/xml")
> .produces("application/json,application/xml") {code}
> requests with `content-type` header `application/json` or `application/xml` 
> should be accepted. (works on camel-platform-htpp)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (CAMEL-19123) camel-jbang - upgrade maven-resolver-api to 1.9.6

2023-03-07 Thread Grzegorz Grzybek (Jira)
Grzegorz Grzybek created CAMEL-19123:


 Summary: camel-jbang - upgrade maven-resolver-api to 1.9.6
 Key: CAMEL-19123
 URL: https://issues.apache.org/jira/browse/CAMEL-19123
 Project: Camel
  Issue Type: Dependency upgrade
  Components: camel-jbang
Reporter: Grzegorz Grzybek
Assignee: Grzegorz Grzybek
 Fix For: 3.21.0, 4.0-M2, 4.0


No API changes between 1.9.4 and 1.9.5.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (CAMEL-11767) camel-catalog-maven - Maybe use shrinkwrap instead of gradle

2023-03-07 Thread Grzegorz Grzybek (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-11767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17643876#comment-17643876
 ] 

Grzegorz Grzybek edited comment on CAMEL-11767 at 3/7/23 10:13 AM:
---

In theory, {{org.apache.camel.catalog.maven.DefaultMavenArtifactProvider}} can 
be removed, because it's not used outside of one Syndesis integration test.

On the other hand, {{org.apache.camel.catalog.maven.MavenVersionManager}} and 
similar {{com.github.cameltooling.idea.service.CamelMavenVersionManager}} (and 
indirectly {{com.github.cameltooling.lsp.internal.CamelTextDocumentService()}} 
can be rewritten to not use Grape.

camel-catalog library can provide different resolver, which is used already in 
dsl/camel-camelet-main 
({{org.apache.camel.main.download.MavenDependencyDownloader}}).

Because dsl/camel-camelet-main depends on catalog/camel-catalog, which in turn 
uses (indirectly) camel-api, camel-util, we have lot of places to move 
{{org.apache.camel.main.download.MavenDependencyDownloader}} (and what's 
important, also {{org.apache.camel.main.injection.DIRegistry}}) to.


was (Author: gzres):
In theory, {{org.apache.camel.catalog.maven.DefaultMavenArtifactProvider}} can 
be removed, because it's not used outside of one Syndesis integration test.

On the other hand, {{org.apache.camel.catalog.maven.MavenVersionManager}} and 
similar {{com.github.cameltooling.idea.service.CamelMavenVersionManager}} (and 
indirectly {{com.github.cameltooling.lsp.internal.CamelTextDocumentService()}} 
can be rewritten to not use Grape.

camel-catalog library can provide different resolved, which is used already in 
dsl/camel-camelet-main 
({{org.apache.camel.main.download.MavenDependencyDownloader}}).

Because dsl/camel-camelet-main depends on catalog/camel-catalog, which in turn 
uses (indirectly) camel-api, camel-util, we have lot of places to move 
{{org.apache.camel.main.download.MavenDependencyDownloader}} (and what's 
important, also {{org.apache.camel.main.injection.DIRegistry}}) to.

> camel-catalog-maven - Maybe use shrinkwrap instead of gradle
> 
>
> Key: CAMEL-11767
> URL: https://issues.apache.org/jira/browse/CAMEL-11767
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-catalog, tooling
>Reporter: Claus Ibsen
>Assignee: Grzegorz Grzybek
>Priority: Minor
> Fix For: 3.x
>
>
> We can look at using shrinkwrap resolver which has a nice API for downloading 
> Maven JARs. We just need that to be able to download the camel-catalog JAR of 
> a given version
> https://github.com/shrinkwrap/resolver



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-19113) Platform-http-vertx: consume with comma separated does not work

2023-03-07 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-19113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17697330#comment-17697330
 ] 

Claus Ibsen commented on CAMEL-19113:
-

We need to backport this

> Platform-http-vertx: consume with comma separated does not work
> ---
>
> Key: CAMEL-19113
> URL: https://issues.apache.org/jira/browse/CAMEL-19113
> Project: Camel
>  Issue Type: Bug
>  Components: camel-platform-http-vertx
>Affects Versions: 3.18.5, 3.20.2
>Reporter: Jiri Ondrusek
>Assignee: Jiri Ondrusek
>Priority: Major
> Fix For: 3.18.6, 3.20.3, 3.21.0, 4.0-M3, 4.0
>
>
> When rest DSL defines following endpoint
> {code:java}
> rest().get("/test")
> .consumes("application/json,application/xml")
> .produces("application/json,application/xml") {code}
> requests with `content-type` header `application/json` or `application/xml` 
> should be accepted. (works on camel-platform-htpp)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)