[backport camel-4.18.x] CAMEL-23575: camel-mongodb-gridfs - align Exchange header constant names with Camel naming convention#23473
Conversation
…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>
gnodet
left a comment
There was a problem hiding this comment.
Clean backport, LGTM.
Reviewed:
-
Header renames are correct and consistent -- all five constants follow the
CamelGridFs*naming convention, consistent with the parentcamel-mongodbcomponent'sCamelMongoDb*prefix and with the same renames already merged onmainvia #23413. -
Code change is identical to main -- the
GridFsConstants.javadiff is byte-identical to the original PR. Java field names are unchanged, so any code referencing constants symbolically continues to work. -
Generated files are included -- catalog JSON (both
camel-catalogand component-local) and Endpoint DSLGridFsEndpointBuilderFactory.javaare regenerated and consistent. The DSL accessor renames (gridfsMetadata()->gridFsMetadata(), etc.) match. -
Upgrade guide -- the PR correctly omits an upgrade guide entry on the
camel-4.18.xbranch, following the established convention (entries live onmain). The 4.18 upgrade guide onmainalready 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 tomainadding the 4.18 entry for this rename is needed -- the PR description mentions this. -
Tests -- the existing tests reference constants symbolically (
GridFsConstants.GRIDFS_OPERATIONetc.), so no test changes are needed for the rename. This is fine.
No concerns.
Claude Code on behalf of Guillaume Nodet
…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>
…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>
Backport of #23413 onto
camel-4.18.xCherry-pick of #23413 (CAMEL-23575) onto the 4.18.x maintenance branch for the 4.18.3 release line. The
GridFsConstantsheader-name values were byte-identical onmainandcamel-4.18.x, so the rename applies cleanly.Renames (string values only; Java field names unchanged)
GRIDFS_OPERATIONgridfs.operationCamelGridFsOperationGRIDFS_METADATAgridfs.metadataCamelGridFsMetadataGRIDFS_CHUNKSIZEgridfs.chunksizeCamelGridFsChunkSizeGRIDFS_OBJECT_IDgridfs.objectidCamelGridFsObjectIdGRIDFS_FILE_ID_PRODUCEDgridfs.fileidCamelGridFsFileIdIncludes the cascading regen of the component catalog and the
GridFsHeaderNameBuilderEndpoint 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 onmainin 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
_4_21.adoc->_4_18.adocupgrade-guide relocation (now handled onmain)mvn clean install -DskipTestsfrom repo root — green; no uncommitted regen driftBackport prepared by Claude Code on behalf of Andrea Cosentino.