Skip to content

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

Open
oscerd wants to merge 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23413-to-camel-4.14.x
Open

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

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 24, 2026

Backport of #23413 onto camel-4.14.x

Cherry-pick of #23413 (CAMEL-23575) onto the 4.14.x maintenance branch for the 4.14.8 release line. The GridFsConstants header-name values were byte-identical on main, camel-4.18.x and camel-4.14.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.14 upgrade-guide entry (camel-4x-upgrade-guide-4_14.adoc) is added on main in a separate doc-sync PR rather than on this maintenance branch.

Original PR: #23413
Companion backport (4.18.x): #23473
Target branch: camel-4.14.x (4.14.8)

Test plan

  • Cherry-pick clean apart from the expected _4_21.adoc -> _4_14.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 24, 2026
@oscerd oscerd requested review from davsclaus and orpiske May 24, 2026 08:48
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 of #23413 onto camel-4.14.x. I reviewed the original PR and the companion 4.18.x backport (#23473) — this cherry-pick is byte-identical in substance.

What I checked:

  • Constant renames: All 5 GridFS header values correctly renamed from gridfs.*CamelGridFs*, following the standard Camel<Component><Field> convention. Java field names unchanged — routes using symbolic references are unaffected.
  • Generated files: Both catalog JSONs (mongodb-gridfs.json) and the Endpoint DSL factory (GridFsEndpointBuilderFactory.java) are regenerated consistently. Method names updated (gridfsMetadata()gridFsMetadata(), etc.).
  • Upgrade guide: Correctly deferred to a doc-sync PR on main per the backport upgrade-guide policy.
  • No drift: Single cherry-pick commit, clean application.

LGTM.

Claude Code on behalf of Guillaume Nodet

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.

3 participants