[jira] [Commented] (CAMEL-19707) camel-aws2-s3 multipart uploads crash with zero-byte files

2023-09-07 Thread Philippe Soares (Jira)


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

Philippe Soares commented on CAMEL-19707:
-

Sorry for the delay. I hadn't seen the notification.

Indeed I think the component should be clever enough to do both:
1/ Upload zero length files through a "regular" upload, just like any file 
which has a size below multipart-limit

2/ Switch to multipart uploads if file size > multipart-limit

> camel-aws2-s3 multipart uploads crash with zero-byte files
> --
>
> Key: CAMEL-19707
> URL: https://issues.apache.org/jira/browse/CAMEL-19707
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-aws2
>Affects Versions: 4.0-RC2
>Reporter: Philippe Soares
>Priority: Minor
> Fix For: 4.1.0
>
>
> When a route is configured to upload files to S3 using multipart, the upload 
> fails for files with zero length with the following stack trace:
> {code:java}
> 08:58:19.315 [Camel (camel-1) thread #3 - seda://mychannel] WARN  
> o.a.c.component.seda.SedaConsumer - Error processing exchange. 
> Exchange[2980AEE3A04EBAE-001D]. Caused by: 
> [software.amazon.awssdk.services.s3.model.S3Exception - The XML you provided 
> was not well-formed or did not validate against our published schema 
> (Service: S3, Status Code: 400, Request ID: JTV2BKF1Z2JXAXMM, Extended 
> Request ID: 
> unKlvF+b5nZtUxqdH8Lg2fcTYCswasH/WHc8rRmKnY5cGVVp8J9vbPKX8v2o09aebAjLvoNLcV0=)]
> software.amazon.awssdk.services.s3.model.S3Exception: The XML you provided 
> was not well-formed or did not validate against our published schema 
> (Service: S3, Status Code: 400, Request ID: JTV2BKF1Z2JXAXMM, Extended 
> Request ID: 
> unKlvF+b5nZtUxqdH8Lg2fcTYCswasH/WHc8rRmKnY5cGVVp8J9vbPKX8v2o09aebAjLvoNLcV0=)
> at 
> software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156)
> at 
> software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108)
> at 
> software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handle(AwsXmlPredicatedResponseHandler.java:85)
> at 
> software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handle(AwsXmlPredicatedResponseHandler.java:43)
> at 
> software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler$Crc32ValidationResponseHandler.handle(AwsSyncClientHandler.java:95)
> at 
> software.amazon.awssdk.core.internal.handler.BaseClientHandler.lambda$successTransformationResponseHandler$7(BaseClientHandler.java:270)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:40)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:30)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:72)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:42)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:78)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:40)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:52)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:37)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:81)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:36)
> at 
> software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
> at 
> software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:56)
> at 
> software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:36)
> at 
> 

[jira] [Resolved] (CAMEL-19833) camel-bindy: race condition in BindyAbstractFactory.link()

2023-09-07 Thread Nicolas Filotto (Jira)


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

Nicolas Filotto resolved CAMEL-19833.
-
Fix Version/s: 4.1.0
   Resolution: Fixed

> camel-bindy: race condition in BindyAbstractFactory.link()
> --
>
> Key: CAMEL-19833
> URL: https://issues.apache.org/jira/browse/CAMEL-19833
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 3.21.0
>Reporter: Luigi De Masi
>Assignee: Luigi De Masi
>Priority: Major
> Fix For: 4.1.0
>
>
> org.apache.camel.dataformat.bindy.BindyAbstractFactory.link() calls 
> org.apache.camel.util.ReflectionHelper.setField() :
> {noformat}
> public static void setField(Field f, Object instance, Object value) {
> try {
> boolean oldAccessible = f.isAccessible();
> boolean shouldSetAccessible = 
> !Modifier.isPublic(f.getModifiers()) && !oldAccessible;
> if (shouldSetAccessible) {
> f.setAccessible(true);
> }
> f.set(instance, value);
> if (shouldSetAccessible) {
> f.setAccessible(oldAccessible);
> }
> } catch (Exception ex) {
> throw new UnsupportedOperationException("Cannot inject value of 
> class: " + value.getClass() + " into: " + f);   // breakpoint
> }
> }
> {noformat}
> In a concurrent situation, access violation occurs due to race condition:
> Thread A: invokes check the accessibility and set "shouldSetAccessible" to 
> true.
> Thread A: invokes f.setAccessible(true);
> Thread B: invokes check the accessibility and set "shouldSetAccessible" to 
> false.
> Thread A: invokes  f.set(instance, value and f.setAccessible(oldAccessible);
> Thread B: invokes f.set(instance, value); and 
> java.lang.IllegalAccessException occurs.
>  - Following exception will occur.
> {noformat}
> java.lang.UnsupportedOperationException: Cannot inject value of class: class 
> com.mycompany.MyModel2 into: private com.mycompany.MyModel2 
> com.mycompany.MyModel.myModel2
>   at 
> org.apache.camel.util.ReflectionHelper.setField(ReflectionHelper.java:192)
>   at 
> org.apache.camel.dataformat.bindy.BindyAbstractFactory.link(BindyAbstractFactory.java:150)
>   at 
> org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.lambda$consumeFile$0(BindyCsvDataFormat.java:263)
>   at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
>   at 
> java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
>   at 
> java.base/java.util.stream.ReferencePipeline$Head.forEachOrdered(ReferencePipeline.java:772)
>  
>   at 
> org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.unmarshal(BindyCsvDataFormat.java:183)
>  
>   at 
> org.apache.camel.support.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:76)
>  
>   at 
> org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:477)
>  
>   at 
> org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:181)
>   at 
> org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:54)
>   at 
> org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:482)
>   at 
> org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.done(RedeliveryErrorHandler.java:416)
>   at 
> org.apache.camel.processor.ThreadsProcessor$ProcessCall.run(ThreadsProcessor.java:87)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
> {noformat}



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


[jira] [Commented] (CAMEL-19555) camel-spring: ensure tests have assertions

2023-09-07 Thread Otavio Rodolfo Piske (Jira)


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

Otavio Rodolfo Piske commented on CAMEL-19555:
--

Hi, thanks for the heads up. Yes, that's OK. I just wanted to check if the 
issue was stale or not. Thanks!

> camel-spring: ensure tests have assertions
> --
>
> Key: CAMEL-19555
> URL: https://issues.apache.org/jira/browse/CAMEL-19555
> Project: Camel
>  Issue Type: Task
>  Components: camel-spring, camel-spring-ws, camel-spring-xml, tests
>Affects Versions: 4.0.0
>Reporter: Otavio Rodolfo Piske
>Priority: Minor
>  Labels: easy, help-wanted
>
> Some tests do not have assertions and that prevents us from fully 
> understanding what is a test failure and what is an error. In many cases, 
> these are tests that were originally written with older versions of JUnit in 
> mind (i.e: equal or older than v4), so they lack modernization.
>  
> We should ensure every test has an assertion. The assertion does not, 
> necessarily, needs to be visible (i.e.: it can be called in a separate 
> method).
>  
> When asserting that a piece of code does not throw an error, we should use 
> JUnit's 5 
> [assertDoesNotThrow|https://junit.org/junit5/docs/5.8.2/api/org.junit.jupiter.api/org/junit/jupiter/api/Assertions.html#assertDoesNotThrow(org.junit.jupiter.api.function.Executable)]
>  (either the linked method or one of the others with different signatures).
>  
>  



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


[jira] [Commented] (CAMEL-19555) camel-spring: ensure tests have assertions

2023-09-07 Thread Karina (Jira)


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

Karina commented on CAMEL-19555:


Hello! I have been preoccupied with another project I have been assigned to, 
but I am still interested in completing this task. I was planning to try to 
finish it next week if it is possible?

> camel-spring: ensure tests have assertions
> --
>
> Key: CAMEL-19555
> URL: https://issues.apache.org/jira/browse/CAMEL-19555
> Project: Camel
>  Issue Type: Task
>  Components: camel-spring, camel-spring-ws, camel-spring-xml, tests
>Affects Versions: 4.0.0
>Reporter: Otavio Rodolfo Piske
>Priority: Minor
>  Labels: easy, help-wanted
>
> Some tests do not have assertions and that prevents us from fully 
> understanding what is a test failure and what is an error. In many cases, 
> these are tests that were originally written with older versions of JUnit in 
> mind (i.e: equal or older than v4), so they lack modernization.
>  
> We should ensure every test has an assertion. The assertion does not, 
> necessarily, needs to be visible (i.e.: it can be called in a separate 
> method).
>  
> When asserting that a piece of code does not throw an error, we should use 
> JUnit's 5 
> [assertDoesNotThrow|https://junit.org/junit5/docs/5.8.2/api/org.junit.jupiter.api/org/junit/jupiter/api/Assertions.html#assertDoesNotThrow(org.junit.jupiter.api.function.Executable)]
>  (either the linked method or one of the others with different signatures).
>  
>  



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


[jira] [Commented] (CAMEL-19833) camel-bindy: race condition in BindyAbstractFactory.link()

2023-09-07 Thread Luigi De Masi (Jira)


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

Luigi De Masi commented on CAMEL-19833:
---

Pull request: https://github.com/apache/camel/pull/11307

> camel-bindy: race condition in BindyAbstractFactory.link()
> --
>
> Key: CAMEL-19833
> URL: https://issues.apache.org/jira/browse/CAMEL-19833
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 3.21.0
>Reporter: Luigi De Masi
>Assignee: Luigi De Masi
>Priority: Major
>
> org.apache.camel.dataformat.bindy.BindyAbstractFactory.link() calls 
> org.apache.camel.util.ReflectionHelper.setField() :
> {noformat}
> public static void setField(Field f, Object instance, Object value) {
> try {
> boolean oldAccessible = f.isAccessible();
> boolean shouldSetAccessible = 
> !Modifier.isPublic(f.getModifiers()) && !oldAccessible;
> if (shouldSetAccessible) {
> f.setAccessible(true);
> }
> f.set(instance, value);
> if (shouldSetAccessible) {
> f.setAccessible(oldAccessible);
> }
> } catch (Exception ex) {
> throw new UnsupportedOperationException("Cannot inject value of 
> class: " + value.getClass() + " into: " + f);   // breakpoint
> }
> }
> {noformat}
> In a concurrent situation, access violation occurs due to race condition:
> Thread A: invokes check the accessibility and set "shouldSetAccessible" to 
> true.
> Thread A: invokes f.setAccessible(true);
> Thread B: invokes check the accessibility and set "shouldSetAccessible" to 
> false.
> Thread A: invokes  f.set(instance, value and f.setAccessible(oldAccessible);
> Thread B: invokes f.set(instance, value); and 
> java.lang.IllegalAccessException occurs.
>  - Following exception will occur.
> {noformat}
> java.lang.UnsupportedOperationException: Cannot inject value of class: class 
> com.mycompany.MyModel2 into: private com.mycompany.MyModel2 
> com.mycompany.MyModel.myModel2
>   at 
> org.apache.camel.util.ReflectionHelper.setField(ReflectionHelper.java:192)
>   at 
> org.apache.camel.dataformat.bindy.BindyAbstractFactory.link(BindyAbstractFactory.java:150)
>   at 
> org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.lambda$consumeFile$0(BindyCsvDataFormat.java:263)
>   at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
>   at 
> java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
>   at 
> java.base/java.util.stream.ReferencePipeline$Head.forEachOrdered(ReferencePipeline.java:772)
>  
>   at 
> org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.unmarshal(BindyCsvDataFormat.java:183)
>  
>   at 
> org.apache.camel.support.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:76)
>  
>   at 
> org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:477)
>  
>   at 
> org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:181)
>   at 
> org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:54)
>   at 
> org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:482)
>   at 
> org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.done(RedeliveryErrorHandler.java:416)
>   at 
> org.apache.camel.processor.ThreadsProcessor$ProcessCall.run(ThreadsProcessor.java:87)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
> {noformat}



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


[jira] [Updated] (CAMEL-19833) camel-bindy: race condition in BindyAbstractFactory.link()

2023-09-07 Thread Luigi De Masi (Jira)


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

Luigi De Masi updated CAMEL-19833:
--
Summary: camel-bindy: race condition in BindyAbstractFactory.link()  (was: 
camel-bindy - race condition in BindyAbstractFactory.link())

> camel-bindy: race condition in BindyAbstractFactory.link()
> --
>
> Key: CAMEL-19833
> URL: https://issues.apache.org/jira/browse/CAMEL-19833
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 3.21.0
>Reporter: Luigi De Masi
>Assignee: Luigi De Masi
>Priority: Major
>
> org.apache.camel.dataformat.bindy.BindyAbstractFactory.link() calls 
> org.apache.camel.util.ReflectionHelper.setField() :
> {noformat}
> public static void setField(Field f, Object instance, Object value) {
> try {
> boolean oldAccessible = f.isAccessible();
> boolean shouldSetAccessible = 
> !Modifier.isPublic(f.getModifiers()) && !oldAccessible;
> if (shouldSetAccessible) {
> f.setAccessible(true);
> }
> f.set(instance, value);
> if (shouldSetAccessible) {
> f.setAccessible(oldAccessible);
> }
> } catch (Exception ex) {
> throw new UnsupportedOperationException("Cannot inject value of 
> class: " + value.getClass() + " into: " + f);   // breakpoint
> }
> }
> {noformat}
> In a concurrent situation, access violation occurs due to race condition:
> Thread A: invokes check the accessibility and set "shouldSetAccessible" to 
> true.
> Thread A: invokes f.setAccessible(true);
> Thread B: invokes check the accessibility and set "shouldSetAccessible" to 
> false.
> Thread A: invokes  f.set(instance, value and f.setAccessible(oldAccessible);
> Thread B: invokes f.set(instance, value); and 
> java.lang.IllegalAccessException occurs.
>  - Following exception will occur.
> {noformat}
> java.lang.UnsupportedOperationException: Cannot inject value of class: class 
> com.mycompany.MyModel2 into: private com.mycompany.MyModel2 
> com.mycompany.MyModel.myModel2
>   at 
> org.apache.camel.util.ReflectionHelper.setField(ReflectionHelper.java:192)
>   at 
> org.apache.camel.dataformat.bindy.BindyAbstractFactory.link(BindyAbstractFactory.java:150)
>   at 
> org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.lambda$consumeFile$0(BindyCsvDataFormat.java:263)
>   at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
>   at 
> java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
>   at 
> java.base/java.util.stream.ReferencePipeline$Head.forEachOrdered(ReferencePipeline.java:772)
>  
>   at 
> org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.unmarshal(BindyCsvDataFormat.java:183)
>  
>   at 
> org.apache.camel.support.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:76)
>  
>   at 
> org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:477)
>  
>   at 
> org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:181)
>   at 
> org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:54)
>   at 
> org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:482)
>   at 
> org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.done(RedeliveryErrorHandler.java:416)
>   at 
> org.apache.camel.processor.ThreadsProcessor$ProcessCall.run(ThreadsProcessor.java:87)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>   at java.base/java.lang.Thread.run(Thread.java:833)
> {noformat}



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


[jira] [Assigned] (CAMEL-19555) camel-spring: ensure tests have assertions

2023-09-07 Thread Otavio Rodolfo Piske (Jira)


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

Otavio Rodolfo Piske reassigned CAMEL-19555:


Assignee: (was: Otavio Rodolfo Piske)

> camel-spring: ensure tests have assertions
> --
>
> Key: CAMEL-19555
> URL: https://issues.apache.org/jira/browse/CAMEL-19555
> Project: Camel
>  Issue Type: Task
>  Components: camel-spring, camel-spring-ws, camel-spring-xml, tests
>Affects Versions: 4.0.0
>Reporter: Otavio Rodolfo Piske
>Priority: Minor
>  Labels: easy, help-wanted
>
> Some tests do not have assertions and that prevents us from fully 
> understanding what is a test failure and what is an error. In many cases, 
> these are tests that were originally written with older versions of JUnit in 
> mind (i.e: equal or older than v4), so they lack modernization.
>  
> We should ensure every test has an assertion. The assertion does not, 
> necessarily, needs to be visible (i.e.: it can be called in a separate 
> method).
>  
> When asserting that a piece of code does not throw an error, we should use 
> JUnit's 5 
> [assertDoesNotThrow|https://junit.org/junit5/docs/5.8.2/api/org.junit.jupiter.api/org/junit/jupiter/api/Assertions.html#assertDoesNotThrow(org.junit.jupiter.api.function.Executable)]
>  (either the linked method or one of the others with different signatures).
>  
>  



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


[jira] [Commented] (CAMEL-19555) camel-spring: ensure tests have assertions

2023-09-07 Thread Otavio Rodolfo Piske (Jira)


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

Otavio Rodolfo Piske commented on CAMEL-19555:
--

Hello, are you still planning to work on this issue?

> camel-spring: ensure tests have assertions
> --
>
> Key: CAMEL-19555
> URL: https://issues.apache.org/jira/browse/CAMEL-19555
> Project: Camel
>  Issue Type: Task
>  Components: camel-spring, camel-spring-ws, camel-spring-xml, tests
>Affects Versions: 4.0.0
>Reporter: Otavio Rodolfo Piske
>Assignee: Otavio Rodolfo Piske
>Priority: Minor
>  Labels: easy, help-wanted
>
> Some tests do not have assertions and that prevents us from fully 
> understanding what is a test failure and what is an error. In many cases, 
> these are tests that were originally written with older versions of JUnit in 
> mind (i.e: equal or older than v4), so they lack modernization.
>  
> We should ensure every test has an assertion. The assertion does not, 
> necessarily, needs to be visible (i.e.: it can be called in a separate 
> method).
>  
> When asserting that a piece of code does not throw an error, we should use 
> JUnit's 5 
> [assertDoesNotThrow|https://junit.org/junit5/docs/5.8.2/api/org.junit.jupiter.api/org/junit/jupiter/api/Assertions.html#assertDoesNotThrow(org.junit.jupiter.api.function.Executable)]
>  (either the linked method or one of the others with different signatures).
>  
>  



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


[jira] [Created] (CAMEL-19845) Camel-Spring-Boot: Add SBOM to release

2023-09-07 Thread Andrea Cosentino (Jira)
Andrea Cosentino created CAMEL-19845:


 Summary: Camel-Spring-Boot: Add SBOM to release
 Key: CAMEL-19845
 URL: https://issues.apache.org/jira/browse/CAMEL-19845
 Project: Camel
  Issue Type: Task
  Components: build system
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
 Fix For: 4.1.0


The idea is having something like:

https://repo1.maven.org/maven2/org/apache/commons/commons-dbcp2/2.10.0/

Since there is no agreement on the standard we could generate both, cyclonedx 
and spdx, for the moment we have only cyclonedx maven plugin settings.



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


[jira] [Resolved] (CAMEL-19653) camel-jpa - Something can cause ASF CI to hang

2023-09-07 Thread Otavio Rodolfo Piske (Jira)


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

Otavio Rodolfo Piske resolved CAMEL-19653.
--
Resolution: Invalid

These hang-ups haven't happened for several weeks. I think we can close them 
and reopen if needed. 

> camel-jpa - Something can cause ASF CI to hang
> --
>
> Key: CAMEL-19653
> URL: https://issues.apache.org/jira/browse/CAMEL-19653
> Project: Camel
>  Issue Type: Task
>  Components: tests
>Reporter: Claus Ibsen
>Assignee: Otavio Rodolfo Piske
>Priority: Major
>  Labels: easy, help-wanted
>
> I have seen this several times how camel-jpa tests just stop printing logs at
> {code}
> [INFO] ---
> [INFO]  T E S T S
> [INFO] ---
> [INFO] Running org.apache.camel.component.jpa.JpaComponentTest
> [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.828 
> s -- in org.apache.camel.component.jpa.JpaComponentTest
> [INFO] Running org.apache.camel.component.jpa.JpaEndpointTest
> [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.098 
> s -- in org.apache.camel.component.jpa.JpaEndpointTest
> [INFO] Running org.apache.camel.component.jpa.JpaOutputTargetTest
> [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.679 
> s -- in org.apache.camel.component.jpa.JpaOutputTargetTest
> [INFO] Running org.apache.camel.component.jpa.JpaOutputTypeTest
> [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.514 
> s -- in org.apache.camel.component.jpa.JpaOutputTypeTest
> [INFO] Running org.apache.camel.component.jpa.JpaPagingTest
> [INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.743 
> s -- in org.apache.camel.component.jpa.JpaPagingTest
> [INFO] Running org.apache.camel.component.jpa.JpaTest
> [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.187 
> s -- in org.apache.camel.component.jpa.JpaTest
> [INFO] Running org.apache.camel.component.jpa.JpaUseMergeTest
> [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.231 
> s -- in org.apache.camel.component.jpa.JpaUseMergeTest
> [INFO] Running org.apache.camel.component.jpa.JpaUsePersistTest
> [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.212 
> s -- in org.apache.camel.component.jpa.JpaUsePersistTest
> [INFO] Running 
> org.apache.camel.component.jpa.JpaUsingCustomPersistenceUnitTest
> [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.598 
> s -- in org.apache.camel.component.jpa.JpaUsingCustomPersistenceUnitTest
> [INFO] Running org.apache.camel.component.jpa.JpaWithAliasTest
> [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.099 
> s -- in org.apache.camel.component.jpa.JpaWithAliasTest
> [INFO] Running 
> org.apache.camel.component.jpa.JpaWithNamedQueryAndParametersMultivaluedTest
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.076 
> s -- in 
> org.apache.camel.component.jpa.JpaWithNamedQueryAndParametersMultivaluedTest
> [INFO] Running 
> org.apache.camel.component.jpa.JpaWithNamedQueryAndParametersTest
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.085 
> s -- in org.apache.camel.component.jpa.JpaWithNamedQueryAndParametersTest
> [INFO] Running org.apache.camel.component.jpa.JpaWithNamedQueryTest
> {code}
> And the CI jobs has been running for 7+ hours.
> https://ci-builds.apache.org/job/Camel/job/Camel%20JDK17/job/main/1040/



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


[jira] [Updated] (CAMEL-19842) camel-zookeeper-master: fix MasterEndpointFailoverIT

2023-09-07 Thread Otavio Rodolfo Piske (Jira)


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

Otavio Rodolfo Piske updated CAMEL-19842:
-
Fix Version/s: 4.0.1
   4.1.0

> camel-zookeeper-master: fix MasterEndpointFailoverIT
> 
>
> Key: CAMEL-19842
> URL: https://issues.apache.org/jira/browse/CAMEL-19842
> Project: Camel
>  Issue Type: Test
>Reporter: Otavio Rodolfo Piske
>Assignee: Otavio Rodolfo Piske
>Priority: Major
> Fix For: 4.0.1, 4.1.0
>
>
> This test started failing after the fix for CAMEL-19815.



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


[jira] [Updated] (CAMEL-19844) Add SBOM to release

2023-09-07 Thread Andrea Cosentino (Jira)


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

Andrea Cosentino updated CAMEL-19844:
-
Description: 
The idea is having something like:

https://repo1.maven.org/maven2/org/apache/commons/commons-dbcp2/2.10.0/

Since there is no agreement on the standard we could generate both, cyclonedx 
and spdx, for the moment we have only cyclonedx maven plugin settings.

> Add SBOM to release
> ---
>
> Key: CAMEL-19844
> URL: https://issues.apache.org/jira/browse/CAMEL-19844
> Project: Camel
>  Issue Type: Task
>  Components: build system
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 4.1.0
>
>
> The idea is having something like:
> https://repo1.maven.org/maven2/org/apache/commons/commons-dbcp2/2.10.0/
> Since there is no agreement on the standard we could generate both, cyclonedx 
> and spdx, for the moment we have only cyclonedx maven plugin settings.



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


[jira] [Created] (CAMEL-19844) Add SBOM to release

2023-09-07 Thread Andrea Cosentino (Jira)
Andrea Cosentino created CAMEL-19844:


 Summary: Add SBOM to release
 Key: CAMEL-19844
 URL: https://issues.apache.org/jira/browse/CAMEL-19844
 Project: Camel
  Issue Type: Task
  Components: build system
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
 Fix For: 4.1.0






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


[jira] [Commented] (CAMEL-18951) Introducing SBOM generation

2023-09-07 Thread Colm O hEigeartaigh (Jira)


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

Colm O hEigeartaigh commented on CAMEL-18951:
-

Alright thanks!

> Introducing SBOM generation 
> 
>
> Key: CAMEL-18951
> URL: https://issues.apache.org/jira/browse/CAMEL-18951
> Project: Camel
>  Issue Type: Improvement
>  Components: build system
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 4.0-M1, 4.0.0
>
>
> We could use some of the maven plugin out there:
> https://github.com/CycloneDX/cyclonedx-maven-plugin
> To me this one is really complete.
> For the beginning I will use a profile without adding the generated SBOM to 
> the assembly (I don't know how big will it be), but I do believe it would be 
> really helpful and I would like to add it as standard information with each 
> release



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


[jira] [Commented] (CAMEL-18951) Introducing SBOM generation

2023-09-07 Thread Andrea Cosentino (Jira)


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

Andrea Cosentino commented on CAMEL-18951:
--

At this stage, we are still not releasing it, but I'm planning to add it to the 
release profile.

For the moment you have the current SBOM snapshot here: 
https://github.com/apache/camel/tree/main/camel-sbom

We are auto-generating it once a week on Sunday.

The idea, now, is to add the SBOM to the release as other projects are starting 
to do. I already done that in camel-kamelets for example: 
https://github.com/apache/camel-kamelets/pull/1631

> Introducing SBOM generation 
> 
>
> Key: CAMEL-18951
> URL: https://issues.apache.org/jira/browse/CAMEL-18951
> Project: Camel
>  Issue Type: Improvement
>  Components: build system
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 4.0-M1, 4.0.0
>
>
> We could use some of the maven plugin out there:
> https://github.com/CycloneDX/cyclonedx-maven-plugin
> To me this one is really complete.
> For the beginning I will use a profile without adding the generated SBOM to 
> the assembly (I don't know how big will it be), but I do believe it would be 
> really helpful and I would like to add it as standard information with each 
> release



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


[jira] [Commented] (CAMEL-18951) Introducing SBOM generation

2023-09-07 Thread Colm O hEigeartaigh (Jira)


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

Colm O hEigeartaigh commented on CAMEL-18951:
-

[~acosentino] Is this generated SBOM available somewhere in Maven Central? For 
example I added it for Santuario recently 
[https://repo1.maven.org/maven2/org/apache/santuario/xmlsec/4.0.0-M1/]

 

> Introducing SBOM generation 
> 
>
> Key: CAMEL-18951
> URL: https://issues.apache.org/jira/browse/CAMEL-18951
> Project: Camel
>  Issue Type: Improvement
>  Components: build system
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 4.0-M1, 4.0.0
>
>
> We could use some of the maven plugin out there:
> https://github.com/CycloneDX/cyclonedx-maven-plugin
> To me this one is really complete.
> For the beginning I will use a profile without adding the generated SBOM to 
> the assembly (I don't know how big will it be), but I do believe it would be 
> really helpful and I would like to add it as standard information with each 
> release



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


[jira] [Updated] (CAMEL-19816) camel-platform-http-vertx: Add headers for local address & remote address

2023-09-07 Thread James Netherton (Jira)


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

James Netherton updated CAMEL-19816:

Fix Version/s: 4.0.1

> camel-platform-http-vertx: Add headers for local address & remote address
> -
>
> Key: CAMEL-19816
> URL: https://issues.apache.org/jira/browse/CAMEL-19816
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-platform-http-vertx
>Reporter: James Netherton
>Assignee: James Netherton
>Priority: Minor
> Fix For: 4.0.1, 4.1.0
>
>
> netty-http provides the capability to retrieve info about the local and 
> remote address via  headers CamelNettyLocalAddress & CamelNettyRemoteAddress. 
> It can be useful if you want to get at info like figuring out the address of 
> the connecting client.
> We can do a similar thing in platform-http-vertx and get the relevant info 
> from the Vert.x HttpServerRequest on the RoutingContext.



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