Skip to content

[backport camel-4.18.x] CAMEL-23575: camel-mongodb-gridfs - align Exchange header constant names with Camel naming convention#23473

Merged
oscerd merged 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/23413-to-camel-4.18.x
May 22, 2026
Merged

[backport camel-4.18.x] CAMEL-23575: camel-mongodb-gridfs - align Exchange header constant names with Camel naming convention#23473
oscerd merged 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/23413-to-camel-4.18.x

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 22, 2026

Backport of #23413 onto camel-4.18.x

Cherry-pick of #23413 (CAMEL-23575) onto the 4.18.x maintenance branch for the 4.18.3 release line. The GridFsConstants header-name values were byte-identical on main and camel-4.18.x, so the rename applies cleanly.

Renames (string values only; Java field names unchanged)

Constant Before After
GRIDFS_OPERATION gridfs.operation CamelGridFsOperation
GRIDFS_METADATA gridfs.metadata CamelGridFsMetadata
GRIDFS_CHUNKSIZE gridfs.chunksize CamelGridFsChunkSize
GRIDFS_OBJECT_ID gridfs.objectid CamelGridFsObjectId
GRIDFS_FILE_ID_PRODUCED gridfs.fileid CamelGridFsFileId

Includes the cascading regen of the component catalog and the GridFsHeaderNameBuilder Endpoint DSL accessors. Routes referencing the constants symbolically are unaffected.

Upgrade guide

Per the backport upgrade-guide policy, the 4.18 upgrade-guide entry (camel-4x-upgrade-guide-4_18.adoc) is added on main in a separate doc-sync PR rather than on this maintenance branch.

Original PR: #23413
Target branch: camel-4.18.x (4.18.3)

Test plan

  • Cherry-pick clean apart from the expected _4_21.adoc -> _4_18.adoc upgrade-guide relocation (now handled on main)
  • Full reactor sanity build: mvn clean install -DskipTests from repo root — green; no uncommitted regen drift

Backport prepared by Claude Code on behalf of Andrea Cosentino.

…mes with Camel naming convention (apache#23413)

Renames the values of the Exchange header constants in GridFsConstants to
follow the standard Camel<Component><Field> naming convention used across
the rest of the component catalog, bringing camel-mongodb-gridfs in line
with the parent camel-mongodb component
(MongoDbConstants.OPERATION_HEADER = "CamelMongoDbOperation").

The Java field names are unchanged so routes/code referencing the
constants symbolically continue to work as-is:

  gridfs.operation -> CamelGridFsOperation
  gridfs.metadata  -> CamelGridFsMetadata
  gridfs.chunksize -> CamelGridFsChunkSize
  gridfs.objectid  -> CamelGridFsObjectId
  gridfs.fileid    -> CamelGridFsFileId

The cascading rename of the auto-generated Endpoint DSL accessors on
GridFsHeaderNameBuilder is included (gridfsOperation() -> gridFsOperation(),
etc.) along with the regenerated component catalog. The upgrade-guide
entry for this change is added on the main branch (per the backport
upgrade-guide policy).

Consistent with the same alignment applied to camel-lucene (CAMEL-23509),
camel-jgroups (CAMEL-23510), camel-jgroups-raft (CAMEL-23511), and
camel-cxf (CAMEL-23526).

Reported by Claude Code on behalf of Andrea Cosentino.

(cherry picked from commit 8f0b1ac)
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd added the backport indicate that a Pull request is a backport from a fix from the main branch label May 22, 2026
@oscerd oscerd requested review from davsclaus and orpiske May 22, 2026 10:35
Copy link
Copy Markdown
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean backport, LGTM.

Reviewed:

  1. Header renames are correct and consistent -- all five constants follow the CamelGridFs* naming convention, consistent with the parent camel-mongodb component's CamelMongoDb* prefix and with the same renames already merged on main via #23413.

  2. Code change is identical to main -- the GridFsConstants.java diff is byte-identical to the original PR. Java field names are unchanged, so any code referencing constants symbolically continues to work.

  3. Generated files are included -- catalog JSON (both camel-catalog and component-local) and Endpoint DSL GridFsEndpointBuilderFactory.java are regenerated and consistent. The DSL accessor renames (gridfsMetadata() -> gridFsMetadata(), etc.) match.

  4. Upgrade guide -- the PR correctly omits an upgrade guide entry on the camel-4.18.x branch, following the established convention (entries live on main). The 4.18 upgrade guide on main already has analogous entries for camel-jgroups, camel-lucene, camel-jgroups-raft, and camel-cxf header renames, but not yet for camel-mongodb-gridfs. A follow-up doc-sync PR to main adding the 4.18 entry for this rename is needed -- the PR description mentions this.

  5. Tests -- the existing tests reference constants symbolically (GridFsConstants.GRIDFS_OPERATION etc.), so no test changes are needed for the rename. This is fine.

No concerns.

Claude Code on behalf of Guillaume Nodet

@oscerd oscerd merged commit 054d0c1 into apache:camel-4.18.x May 22, 2026
3 checks passed
oscerd added a commit to oscerd/camel that referenced this pull request May 22, 2026
…y to main

Adds the camel-mongodb-gridfs header-constant rename note to the
"Upgrading from 4.18.1 to 4.18.3" section of camel-4x-upgrade-guide-4_18.adoc
on main, matching the backport to camel-4.18.x (apache#23473, cherry-pick of

Per the backport upgrade-guide policy, the version-specific upgrade-guide
files for all releases live on main as the canonical history; the entry
for the 4.18.3 release line must therefore be present here even though the
code fix is backported to the camel-4.18.x maintenance branch.

Reported by Claude Code on behalf of Andrea Cosentino.

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
oscerd added a commit that referenced this pull request May 22, 2026
…y to main (#23477)

Adds the camel-mongodb-gridfs header-constant rename note to the
"Upgrading from 4.18.1 to 4.18.3" section of camel-4x-upgrade-guide-4_18.adoc
on main, matching the backport to camel-4.18.x (#23473, cherry-pick of

Per the backport upgrade-guide policy, the version-specific upgrade-guide
files for all releases live on main as the canonical history; the entry
for the 4.18.3 release line must therefore be present here even though the
code fix is backported to the camel-4.18.x maintenance branch.

Reported by Claude Code on behalf of Andrea Cosentino.

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport indicate that a Pull request is a backport from a fix from the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants