oscerd commented on PR #31122:
URL: https://github.com/apache/camel/pull/31122#issuecomment-7309451324

   Round 2 (15d2831263e5) picks up the three open points, plus gnodet-bot's 
`data_base64` note:
   
   - **`data_base64` is reserved** (davsclaus, gnodet-bot): added to 
`RESERVED_ATTRIBUTE_NAMES` and to the upgrade-guide line. Checked against 
`EventBridgeUtil.serialize` in eventbridge-util: for a non-JSON 
`datacontenttype` it removes `data`, Base64-encodes the bytes and writes them 
as `data_base64`, and only then flattens the extensions over the map, so an 
extension of that name would overwrite the payload. Test: 
`cloudEventExtensionNamedDataBase64IsRejected`.
   - **The validated bus, source and type are what gets sent** (davsclaus): 
went with the write-back. After validation, `applyResolvedAttributes` sets the 
resolved `source` and `type` on the event and writes the resolved bus onto 
`aliyuneventbusname`, the only bus key the SDK serializes 
(`EBConstants.EXTENSION_EVENTBUSNAME`), on a copy of the extensions map; the 
`aliyunEventBus` and `eventBusName` hint keys are dropped from that copy so 
only the canonical key goes on the wire. The producer sends the same instance, 
so the request carries exactly what was validated. Tests: 
`cloudEventBusResolvedFromConfigIsWrittenBackOntoTheEvent`, 
`cloudEventTypeResolvedFromConfigIsWrittenBackOntoTheEvent`. The upgrade guide 
now says that the body instance is updated in place and which keys are written 
or removed. The JIRA description predates this choice and needs the same 
update: `aliyuneventbusname` stays allowed, the two hint keys are read and 
replaced rather than rejected.
   - **Case-insensitive match** (davsclaus): reserved names are compared with 
`toLowerCase(Locale.ROOT)`. Test: 
`cloudEventExtensionReusingReservedNameInDifferentCaseIsRejected`.
   
   Module tests: 61/61 green locally (29 in `MapCloudEventValidationTest`); the 
scoped Maven run regenerated nothing that needed committing.
   
   _Claude Code on behalf of oscerd_
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to