You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "ammachado (via GitHub)" <gi...@apache.org> on 2026/06/11 03:48:20 UTC

[PR] CAMEL-21438: Fix flaky tests and missing aarch64 image for TensorFlow Serving [camel]

ammachado opened a new pull request, #23927:
URL: https://github.com/apache/camel/pull/23927

   # Description
   
   Fix three test reliability issues:
   
   **1. `DefaultConsumerBridgeErrorHandlerContinuedTest` (flaky assertion)**
   The test asserted `mock:result` would receive **zero** messages when `continued(true)` is set on the error handler. In practice, `continued(true)` causes the exchange to continue through the main route after error handling, so `mock:result` does receive at least one message. Changed the expectation to `expectedMinimumMessageCount(1)`.
   
   **2. `SimpleLRUCacheTest` (race condition after concurrent puts)**
   After the concurrent-put latch completed, the test immediately asserted cache size and eviction counter. The eviction listener callback can fire asynchronously, causing intermittent failures. Wrapped the post-latch assertions in `Awaitility.await().atMost(10, TimeUnit.SECONDS).untilAsserted(...)` so the assertions wait for the eviction to settle.
   
   **3. TensorFlow Serving test-infra: missing aarch64 image**
   The `bitnami/tensorflow-serving:2.18.0` image on Docker Hub is not available for `aarch64`. Replaced it with `mirror.gcr.io/bitnamilegacy/tensorflow-serving:2.19.1`, which is available on the Google mirror registry for that architecture, consistent with the project's preference for `mirror.gcr.io` over Docker Hub.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch)
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL-21438) filed for the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful subject line and body.
   - [x] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes.
   
   ---
   _Claude Code on behalf of Adriano Machado_


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21438: Fix flaky tests and missing aarch64 image for TensorFlow Serving [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #23927:
URL: https://github.com/apache/camel/pull/23927#discussion_r3393732619


##########
core/camel-core/src/test/java/org/apache/camel/processor/DefaultConsumerBridgeErrorHandlerContinuedTest.java:
##########
@@ -48,10 +48,9 @@ public void testDefaultConsumerBridgeErrorHandlerContinued() throws Exception {
         getMockEndpoint("mock:onException").expectedMinimumMessageCount(1);
         getMockEndpoint("mock:subroute").expectedMinimumMessageCount(1);
 
-        // With continued(true), processing should continue after error handling
-        // However, since the consumer throws before creating a valid exchange,
-        // mock:result won't receive messages
-        getMockEndpoint("mock:result").expectedMessageCount(0);
+        // With continued(true), the exchange continues through the main route after error handling,
+        // so mock:result should receive messages.
+        getMockEndpoint("mock:result").expectedMinimumMessageCount(1);

Review Comment:
   This reverses the original CAMEL-22907 assertion which expected 0 messages here, with the rationale that "the consumer throws before creating a valid exchange". With `continued(true)`, the bridge error handler creates an exchange, onException processes it, and `continued(true)` allows it to proceed through the route to `mock:result`. The original `expectedMessageCount(0)` was a race condition — it passed only when the mock assertion completed before the continued exchange arrived.
   
   The new assertion looks correct, but since it contradicts the original test's explicit intent, confirmation from the CAMEL-22907 author would be valuable.



##########
test-infra/camel-test-infra-tensorflow-serving/src/main/resources/org/apache/camel/test/infra/tensorflow/serving/services/container.properties:
##########
@@ -15,7 +15,7 @@
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
 tensorflow.serving.container=mirror.gcr.io/tensorflow/serving:2.19.1
-tensorflow.serving.container.aarch64=bitnami/tensorflow-serving:2.18.0
+tensorflow.serving.container.aarch64=mirror.gcr.io/bitnamilegacy/tensorflow-serving:2.19.1

Review Comment:
   Minor: the `bitnamilegacy` namespace suggests this image may be deprecated upstream. Worth verifying it has ongoing maintenance so this doesn't need another fix soon.



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21438: Fix six flaky tests and missing aarch64 image for TensorFlow Serving [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #23927:
URL: https://github.com/apache/camel/pull/23927


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21438: Fix flaky tests and missing aarch64 image for TensorFlow Serving [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23927:
URL: https://github.com/apache/camel/pull/23927#issuecomment-4677731904

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `core/camel-core`
   - `test-infra/camel-test-infra-tensorflow-serving`
   
   :warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
   
   - `core/camel-core`: 2 test(s) disabled on GitHub Actions
   
   <details><summary>All tested modules (10 modules)</summary>
   
   - Camel :: AI :: TensorFlow Serving
   - Camel :: JBang :: MCP
   - Camel :: JBang :: Plugin :: Route Parser
   - Camel :: JBang :: Plugin :: TUI
   - Camel :: JBang :: Plugin :: Validate
   - Camel :: Launcher :: Container
   - Camel :: Test Infra :: All test services
   - Camel :: Test Infra :: TensorFlow Serving
   - Camel :: YAML DSL :: Validator
   - Camel :: YAML DSL :: Validator Maven Plugin
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/27323830745)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21438: Fix five flaky tests and missing aarch64 image for TensorFlow Serving [camel]

Posted by "ammachado (via GitHub)" <gi...@apache.org>.
ammachado commented on PR #23927:
URL: https://github.com/apache/camel/pull/23927#issuecomment-4681902403

   > The `mirror.gcr.io/bitnamilegacy/tensorflow-serving:2.19.1` image uses a "legacy" namespace. Worth checking that it has ongoing maintenance for long-term reliability.
   
   Thanks for flagging this. The `bitnamilegacy` namespace is indeed deprecated: Bitnami restructured their container catalog in August 2025 and moved all versioned/pinned tags to `bitnamilegacy` with no further updates. The concern is valid.
   
   However, there is currently no well-maintained `aarch64` image for TensorFlow Serving from any trusted registry:
   - The official `tensorflow/serving` image is `amd64`-only (long-standing open issue, no `arm64` support planned).
   - `emacski/tensorflow-serving`, the main community `aarch64` build, is last published at `2.6.0` and is not actively maintained.
   - AWS Deep Learning Containers publish a `2.19` `aarch64` image, but it is SageMaker-specific and not suitable here.
   
   `bitnamilegacy/tensorflow-serving:2.19.1` is frozen but functional. It is the only option that matches our required version on `aarch64`. We can revisit this when either the official TF Serving project adds `aarch64` support or a community project catches up to 2.19+.
   
   The remaining alternative is to apply the `skipITs.aarch64` fix: add `<skipITs.aarch64>true</skipITs.aarch64>` to `camel-tensorflow-serving/pom.xml` and remove the `bitnamilegacy` line from `container.properties`. Please advice.
   
   _Claude Code on behalf of Adriano Machado_


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21438: Fix flaky tests and missing aarch64 image for TensorFlow Serving [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23927:
URL: https://github.com/apache/camel/pull/23927#issuecomment-4677636087

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21438: Fix six flaky tests and missing aarch64 image for TensorFlow Serving [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #23927:
URL: https://github.com/apache/camel/pull/23927#issuecomment-4687809484

   > > The `mirror.gcr.io/bitnamilegacy/tensorflow-serving:2.19.1` image uses a "legacy" namespace. Worth checking that it has ongoing maintenance for long-term reliability.
   > 
   > Thanks for flagging this. The `bitnamilegacy` namespace is indeed deprecated: Bitnami restructured their container catalog in August 2025 and moved all versioned/pinned tags to `bitnamilegacy` with no further updates. The concern is valid.
   > 
   > However, there is currently no well-maintained `aarch64` image for TensorFlow Serving from any trusted registry:
   > 
   > * The official `tensorflow/serving` image is `amd64`-only (long-standing open issue, no `arm64` support planned).
   > * `emacski/tensorflow-serving`, the main community `aarch64` build, is last published at `2.6.0` and is not actively maintained.
   > * AWS Deep Learning Containers publish a `2.19` `aarch64` image, but it is SageMaker-specific and not suitable here.
   > 
   > `bitnamilegacy/tensorflow-serving:2.19.1` is frozen but functional. It is the only option that matches our required version on `aarch64`. We can revisit this when either the official TF Serving project adds `aarch64` support or a community project catches up to 2.19+.
   > 
   > The remaining alternative is to apply the `skipITs.aarch64` fix: add `<skipITs.aarch64>true</skipITs.aarch64>` to `camel-tensorflow-serving/pom.xml` and remove the `bitnamilegacy` line from `container.properties`. Please advice.
   > 
   > _Claude Code on behalf of Adriano Machado_
   
   Yeah though aarch64 is for mac developers to run on the laptop and not for production users. So it may be okay to allow them to test and validate tensorflow. Can we add a comment that about so we will not forget.
   
   


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21438: Fix five flaky tests and missing aarch64 image for TensorFlow Serving [camel]

Posted by "ammachado (via GitHub)" <gi...@apache.org>.
ammachado commented on code in PR #23927:
URL: https://github.com/apache/camel/pull/23927#discussion_r3396976260


##########
core/camel-core/src/test/java/org/apache/camel/processor/DefaultConsumerBridgeErrorHandlerContinuedTest.java:
##########
@@ -48,10 +48,9 @@ public void testDefaultConsumerBridgeErrorHandlerContinued() throws Exception {
         getMockEndpoint("mock:onException").expectedMinimumMessageCount(1);
         getMockEndpoint("mock:subroute").expectedMinimumMessageCount(1);
 
-        // With continued(true), processing should continue after error handling
-        // However, since the consumer throws before creating a valid exchange,
-        // mock:result won't receive messages
-        getMockEndpoint("mock:result").expectedMessageCount(0);
+        // With continued(true), the exchange continues through the main route after error handling,
+        // so mock:result should receive messages.
+        getMockEndpoint("mock:result").expectedMinimumMessageCount(1);

Review Comment:
   @gnodet, you added this test in `CAMEL-22907` with `expectedMessageCount(0)` and the comment "since the consumer throws before creating a valid exchange, mock:result won't receive messages".
   
   We found it flaky: after the `CAMEL-22907` fix, `continued(true)` causes the exchange to continue through the main route after `onException` handling, so `mock:result` does receive messages. The assertion was changed to `expectedMinimumMessageCount(1)`.
   
   Could you confirm whether this matches the intended post-fix behavior, or whether `mock:result` was expected to remain at zero for a reason we may have missed?
   
   _Claude Code on behalf of Adriano Machado_



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org