You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "oscerd (via GitHub)" <gi...@apache.org> on 2026/09/08 09:00:15 UTC

[PR] CAMEL-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   ## Issue
   
   [CAMEL-24542](https://issues.apache.org/jira/browse/CAMEL-24542)
   
   ## Problem
   
   `QdrantHeaders.PAYLOAD_SELECTOR` (`CamelQdrantPointsPayloadSelector`) is declared with `@Metadata` and
   advertised in the generated `qdrant.json`, but it was never read anywhere in the component. Both read
   operations built the selector from the `CamelQdrantWithPayload` boolean only:
   
   ```java
   // retrieve
   WithPayloadSelectorFactory.enable(in.getHeader(
           QdrantHeaders.INCLUDE_PAYLOAD, QdrantHeaders.DEFAULT_INCLUDE_PAYLOAD, boolean.class)),
   
   // similaritySearch
   .setWithPayload(enable(in.getHeader(
           QdrantHeaders.INCLUDE_PAYLOAD, QdrantHeaders.DEFAULT_INCLUDE_PAYLOAD, boolean.class)));
   ```
   
   A route that set a `Points.WithPayloadSelector` to request specific payload fields was silently given
   the whole payload.
   
   ## Fix
   
   Both operations resolve the selector through one helper — an explicit `PAYLOAD_SELECTOR` header wins,
   otherwise the `INCLUDE_PAYLOAD` boolean selects all or nothing exactly as before:
   
   ```java
   private static Points.WithPayloadSelector payloadSelector(Message in) {
       Points.WithPayloadSelector selector = in.getHeader(
               QdrantHeaders.PAYLOAD_SELECTOR, Points.WithPayloadSelector.class);
       if (selector != null) {
           return selector;
       }
       return enable(in.getHeader(
               QdrantHeaders.INCLUDE_PAYLOAD, QdrantHeaders.DEFAULT_INCLUDE_PAYLOAD, boolean.class));
   }
   ```
   
   Wiring the header up was preferred over deleting the constant: it maps directly onto a real Qdrant
   capability (`WithPayloadSelectorFactory.include` / `exclude`) that the component otherwise cannot
   reach, and it is backwards compatible — a route that does not set the header is unaffected.
   
   ## Test
   
   `QdrantPayloadSelectorIT` runs against a real Qdrant container. It upserts a point carrying two
   payload fields, `keep` and `drop`, then asserts:
   
   - `RETRIEVE` with `include("keep")` returns a payload with **only** `keep`
   - `RETRIEVE` with no selector and `INCLUDE_PAYLOAD=true` still returns **both** fields (the fallback)
   - `SIMILARITY_SEARCH` with `include("keep")` returns a payload with **only** `keep`
   
   Verified that exactly the two selector tests fail before the change (`drop` comes back) and that the
   fallback tests pass either way.
   
   Module suite green: 12 unit tests and 26 integration tests. Full reactor build clean.
   
   ## Documentation
   
   Behaviour change documented in `camel-4x-upgrade-guide-4_23.adoc` — a route that already sets the
   header starts receiving only the payload fields it selected.
   
   ---
   _Claude Code on behalf of oscerd_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   ✅ Backport to `camel-4.22.x` created: https://github.com/apache/camel/pull/26318


-- 
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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   :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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   ✅ Backport to `camel-4.18.x` created: https://github.com/apache/camel/pull/26319


-- 
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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   <!-- camel-backport-bot -->
   
   ### 🔄 Backport Bot
   
   **Conflicts (🤖 agent dispatched to resolve):**
   - âš ī¸ `camel-4.22.x` — Cherry-pick conflict in: docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
   - âš ī¸ `camel-4.18.x` — Cherry-pick conflict in: docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
   
   â„šī¸ If you push additional commits after `/port`, use `/port` again to update the port PRs.


-- 
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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   <!-- camel-backport-bot -->
   
   ### 🔄 Backport Bot
   
   This bugfix was merged into `main` and may need porting to:
   - `camel-4.22.x`
   - `camel-4.18.x`
   
   Labels `port/<branch>` have been added. Remove a label to opt out of porting to that branch.
   
   Port PRs will be created shortly.


-- 
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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   ✅ Backport to `camel-4.22.x` created: https://github.com/apache/camel/pull/26318


-- 
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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   <!-- camel-backport-bot -->
   
   ### 🔄 Backport Bot
   
   **Conflicts (🤖 agent dispatched to resolve):**
   - âš ī¸ `camel-4.22.x` — Command failed: git remote add fork https://github.com/gnodet-bot/camel.git
   error: remote fork already exists.
   
   - âš ī¸ `camel-4.18.x` — Command failed: git remote add fork https://github.com/gnodet-bot/camel.git
   error: remote fork already exists.
   
   
   â„šī¸ If you push additional commits after `/port`, use `/port` again to update the port PRs.


-- 
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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `components/camel-ai/camel-qdrant`
   - `docs`
   
   ---
   
   <details><summary>:microscope: Scalpel shadow comparison — Scalpel: 12 tested, 26 compile-only — current: 11 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **38 affected modules** (current approach: 11).
   
   <details><summary>:warning: Modules only in Scalpel (27)</summary>
   
   - `apache-camel`
   - `camel-allcomponents`
   - `camel-catalog`
   - `camel-catalog-console`
   - `camel-catalog-maven`
   - `camel-catalog-suggest`
   - `camel-componentdsl`
   - `camel-endpointdsl`
   - `camel-endpointdsl-support`
   - `camel-itest`
   - `camel-jbang-core`
   - `camel-jbang-it`
   - `camel-jbang-main`
   - `camel-jbang-plugin-edit`
   - `camel-jbang-plugin-generate`
   - `camel-jbang-plugin-kubernetes`
   - `camel-jbang-plugin-test`
   - `camel-kamelet-main`
   - `camel-launcher`
   - `camel-report-maven-plugin`
   - `camel-route-parser`
   - `camel-yaml-dsl`
   - `camel-yaml-dsl-deserializers`
   - `camel-yaml-dsl-maven-plugin`
   - `coverage`
   - `docs`
   - `dummy-component`
   
   </details>
   
   **Skip-tests mode would test 12 modules** (2 direct + 10 downstream), **skip tests for 26** (generated code, meta-modules)
   
   <details><summary>Modules Scalpel would test (12)</summary>
   
   - `camel-jbang-mcp`
   - `camel-jbang-plugin-mcp`
   - `camel-jbang-plugin-route-parser`
   - `camel-jbang-plugin-tui`
   - `camel-jbang-plugin-validate`
   - `camel-langchain4j-embeddings`
   - `camel-langchain4j-embeddingstore`
   - `camel-launcher-container`
   - `camel-qdrant`
   - `camel-yaml-dsl-validator`
   - `camel-yaml-dsl-validator-maven-plugin`
   - `docs`
   
   </details>
   
   <details><summary>Modules with tests skipped (26)</summary>
   
   - `apache-camel`
   - `camel-allcomponents`
   - `camel-catalog`
   - `camel-catalog-console`
   - `camel-catalog-maven`
   - `camel-catalog-suggest`
   - `camel-componentdsl`
   - `camel-endpointdsl`
   - `camel-endpointdsl-support`
   - `camel-itest`
   - `camel-jbang-core`
   - `camel-jbang-it`
   - `camel-jbang-main`
   - `camel-jbang-plugin-edit`
   - `camel-jbang-plugin-generate`
   - `camel-jbang-plugin-kubernetes`
   - `camel-jbang-plugin-test`
   - `camel-kamelet-main`
   - `camel-launcher`
   - `camel-report-maven-plugin`
   - `camel-route-parser`
   - `camel-yaml-dsl`
   - `camel-yaml-dsl-deserializers`
   - `camel-yaml-dsl-maven-plugin`
   - `coverage`
   - `dummy-component`
   
   </details>
   
   > :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
   
   </details>
   
   <details><summary>All tested modules (38 modules, 4m 48s total)</summary>
   
   **Total reactor time:** 4m 48s
   
   | Module | Duration | Status |
   | --- | --- | --- |
   | Camel :: Launcher | 48.6s | SUCCESS |
   | Camel :: JBang :: MCP | 36.8s | SUCCESS |
   | Camel :: AI :: Qdrant | 23.2s | SUCCESS |
   | Camel :: JBang :: Plugin :: TUI | 20.9s | SUCCESS |
   | Camel :: AI :: LangChain4j :: EmbeddingStore | 20.4s | SUCCESS |
   | Camel :: Component DSL | 18.3s | SUCCESS |
   | Camel :: JBang :: Plugin :: Kubernetes | 15.7s | SUCCESS |
   | Camel :: Catalog :: Camel Catalog | 15.2s | SUCCESS |
   | Camel :: Docs | 14.8s | SUCCESS |
   | Camel :: Kamelet Main | 9.6s | SUCCESS |
   | Camel :: Catalog :: Camel Route Parser | 7.9s | SUCCESS |
   | Camel :: Catalog :: Camel Report Maven Plugin | 7.8s | SUCCESS |
   | Camel :: JBang :: Plugin :: Testing | 7.8s | SUCCESS |
   | Camel :: YAML DSL :: Deserializers | 7.0s | SUCCESS |
   | Camel :: All Components Sync point | 5.0s | SUCCESS |
   | Camel :: YAML DSL :: Validator | 4.1s | SUCCESS |
   | Camel :: YAML DSL :: Maven Plugins | 3.2s | SUCCESS |
   | Camel :: Catalog :: Suggest | 2.8s | SUCCESS |
   | Camel :: Catalog :: Maven | 2.6s | SUCCESS |
   | Camel :: YAML DSL :: Validator Maven Plugin | 2.4s | SUCCESS |
   | Camel :: Coverage | 1.9s | SUCCESS |
   | Camel :: JBang :: Plugin :: Generate | 1.9s | SUCCESS |
   | Camel :: Assembly | 1.6s | SUCCESS |
   | Camel :: Catalog :: Dummy Component | 1.4s | SUCCESS |
   | Camel :: JBang :: Plugin :: Edit | 1.4s | SUCCESS |
   | Camel :: JBang :: Main | 1.1s | SUCCESS |
   | Camel :: JBang :: Plugin :: Validate | 0.8s | SUCCESS |
   | Camel :: Endpoint DSL :: Support | 0.7s | SUCCESS |
   | Camel :: Launcher :: Container | 0.7s | SUCCESS |
   | Camel :: JBang :: Plugin :: MCP | 0.7s | SUCCESS |
   | Camel :: Catalog :: Console | 0.6s | SUCCESS |
   | Camel :: JBang :: Plugin :: Route Parser | 0.6s | SUCCESS |
   | Camel :: JBang :: Integration tests | 0.6s | SUCCESS |
   | Camel :: AI :: LangChain4j :: Embedding | n/a |  |
   | Camel :: Endpoint DSL | n/a |  |
   | Camel :: Integration Tests | n/a |  |
   | Camel :: JBang :: Core | n/a |  |
   | Camel :: YAML DSL | n/a |  |
   
   **Top 20 slowest modules:**
   - `Camel :: Launcher` (48.6s)
   - `Camel :: JBang :: MCP` (36.8s)
   - `Camel :: AI :: Qdrant` (23.2s)
   - `Camel :: JBang :: Plugin :: TUI` (20.9s)
   - `Camel :: AI :: LangChain4j :: EmbeddingStore` (20.4s)
   - `Camel :: Component DSL` (18.3s)
   - `Camel :: JBang :: Plugin :: Kubernetes` (15.7s)
   - `Camel :: Catalog :: Camel Catalog` (15.2s)
   - `Camel :: Docs` (14.8s)
   - `Camel :: Kamelet Main` (9.6s)
   - `Camel :: Catalog :: Camel Route Parser` (7.9s)
   - `Camel :: Catalog :: Camel Report Maven Plugin` (7.8s)
   - `Camel :: JBang :: Plugin :: Testing` (7.8s)
   - `Camel :: YAML DSL :: Deserializers` (7.0s)
   - `Camel :: All Components Sync point` (5.0s)
   - `Camel :: YAML DSL :: Validator` (4.1s)
   - `Camel :: YAML DSL :: Maven Plugins` (3.2s)
   - `Camel :: Catalog :: Suggest` (2.8s)
   - `Camel :: Catalog :: Maven` (2.6s)
   - `Camel :: YAML DSL :: Validator Maven Plugin` (2.4s)
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/34207579288)


-- 
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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   <!-- camel-backport-bot -->
   
   ### 🔄 Backport Bot
   
   **Conflicts (🤖 agent dispatched to resolve):**
   - âš ī¸ `camel-4.22.x` — Command failed: git remote add fork https://github.com/gnodet-bot/camel.git
   error: remote fork already exists.
   
   - âš ī¸ `camel-4.18.x` — Command failed: git remote add fork https://github.com/gnodet-bot/camel.git
   error: remote fork already exists.
   
   
   â„šī¸ If you push additional commits after `/port`, use `/port` again to update the port PRs.


-- 
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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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

   <!-- camel-backport-bot -->
   
   ### 🔄 Backport Bot
   
   **Conflicts (🤖 agent dispatched to resolve):**
   - âš ī¸ `camel-4.22.x` — Cherry-pick conflict in: docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
   - âš ī¸ `camel-4.18.x` — Cherry-pick conflict in: docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
   
   â„šī¸ If you push additional commits after `/port`, use `/port` again to update the port PRs.


-- 
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-24542: camel-qdrant - honour the PayloadSelector header [camel]

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


-- 
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