Repository navigation
Conversation
gnodet-bot
left a comment
There was a problem hiding this comment.
The protocol field is correctly annotated with @Deprecated and @Metadata(deprecationNote=...), but the getter and setter methods are missing the same deprecation markers. Per Camel convention (see e.g. AWS2S3VectorsConfiguration), both the accessor methods should carry @Deprecated and a @deprecated Javadoc tag.
Additionally, the new Javadoc text "The protocol to use when instantiating the Transcribe client" is misleading for a no-op option — it implies the value is actually used. Consider something like "The protocol to use when instantiating the Transcribe client (deprecated, this option has no effect)" or simply retain the original wording with a deprecation note.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
gnodet-bot
left a comment
There was a problem hiding this comment.
Following up on my earlier review — the @Deprecated/@deprecated finding has been addressed. One issue remains.
The fix introduced a duplicate Javadoc block on both the getter and setter: each method now has two consecutive /** ... */ blocks immediately before it. The Java language and all Javadoc tooling only recognize the last Javadoc comment immediately preceding a declaration — the first block is an orphan that will silently be ignored. The resulting class-level documentation will show just the second block, but the stray first block is misleading noise in the source.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
davsclaus
left a comment
There was a problem hiding this comment.
TL;DR: correct deprecation of a dead option, one leftover from the suggestion commits to clean up.
I checked that protocol is really unused: apart from the generated Transcribe2EndpointConfigurer/Transcribe2ComponentConfigurer, nothing calls getProtocol(), and Transcribe2ClientFactory and the shared AWS client builder only apply proxyProtocol. The field, accessors, both JSON copies, both DSL factories and the upgrade-guide entry are all in place, and fixing the borrowed proxyProtocol description is a nice catch.
The one thing left: applying the review suggestions left two Javadoc blocks on each accessor. In Transcribe2Configuration.java, the old /** The protocol to use when instantiating the Transcribe client */ blocks right before the new ones on getProtocol() (line 267) and setProtocol() (line 280) are now orphaned. Could you delete those two and run mvn formatter:format impsort:sort on the module once, since GitHub suggestion commits are not formatted? Heads-up: #29709 appends an upgrade-guide entry at the same spot, so one of the two will need a small rebase.
Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 9 of 726 tested, 23 compile-only — current: 9 all testedMaveniverse Scalpel detected 9 affected modules (current approach: 9). Skip-tests mode would test 9 modules (5 direct + 8 downstream), skip tests for 23 (generated code, meta-modules) Modules Scalpel would test (9)
Modules with tests skipped (23)
All tested modules (36 modules, 6m 58s total)Total reactor time: 6m 58s
Top 20 slowest modules:
|
oscerd
left a comment
There was a problem hiding this comment.
Clean, complete deprecation, with one small thing to tidy.
The call is right: protocol is dead. The Transcribe client comes from the shared AwsClientBuilderUtil, which reads region, endpoint override and the proxy settings off AwsCommonConfiguration, and that interface exposes getProxyProtocol(), not getProtocol(). So the option was never applied, and its description was the proxyProtocol one copied over, which made it read as if it configured the proxy. Deprecating it and correcting the description to stop claiming a proxy role is the right pair of changes.
The regeneration is complete: deprecated: true plus the deprecationNote land in both the component META-INF JSON and the camel-catalog copy, and the component and endpoint DSL factories carry the note too. The upgrade-guide entry points users at proxyProtocol with proxyHost and proxyPort, which is the option that actually reaches the client builder. Good.
One cleanup: getProtocol() and setProtocol(...) each end up with two /** ... */ blocks back to back, the first without the @deprecated tag and the second with it. Javadoc keeps only the block immediately above the member, so the first is dropped and left as a dangling comment. That is the same orphaned-Javadoc pattern your own #29641 swept out of the tree, so it is worth collapsing each pair into the single block that carries the @deprecated tag.
Claude Code on behalf of oscerd
|
Fixed — and thanks for spotting it; the irony of leaving orphaned Javadoc behind is not lost on me, given #29641. Both pairs on /**
* The protocol to use when instantiating the Transcribe client
*
* @deprecated Not used: nothing reads this option when the Transcribe client is built
*/
@Deprecated
public Protocol getProtocol() {I checked the file for any other adjacent The generated metadata is unchanged by this, which is worth stating explicitly since I cannot run the regen here: the schema generator reads the last Javadoc block before the member, and that block's first line is the same text as the orphan's, so the description in both JSON copies and in the two DSL factories stays byte-identical. I re-read them after the edit to confirm. On On the rebase heads-up — agreed, #29706 and #29709 both append to |
davsclaus
left a comment
There was a problem hiding this comment.
Thanks for the cleanup. Since my last review, e25f90b collapses the duplicated Javadoc, so getProtocol()/setProtocol() (Transcribe2Configuration.java:267-285) each have one block with the @deprecated tag. That was the last code point; the generated files are unaffected since the description comes from the field annotations.
One thing before this can go in: the PR now conflicts with main in docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc (main appended the camel-docling OCR-headers section at the same place), and because of the conflict GitHub has not run CI at all. Could you rebase on main and keep both sections, with yours after the last one? Once CI is green this is good to go.
Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
…fect Transcribe2Configuration declares a protocol option that nothing reads. The Transcribe client is built by the shared AwsClientBuilderUtil, which takes the region, the endpoint override and the proxy settings off AwsCommonConfiguration; protocol is not part of that interface, and getProtocol() is called only by the generated configurer. Setting protocol=HTTP on an aws2-transcribe endpoint is accepted and does nothing. Its description made that worse: the setter carried the javadoc of setProxyProtocol, "To define a proxy protocol when instantiating the Transcribe client", so the option read as if it configured the proxy - which is what proxyProtocol, three fields below, actually does. Deprecate it with a note, as camel-docling's apiKeyHeader was deprecated in this release, and give it a description that no longer claims to configure a proxy. The catalog metadata, both DSL builder factories and the 4.24 upgrade guide follow.
…pache/camel/component/aws2/transcribe/Transcribe2Configuration.java Co-authored-by: Guillaume Nodet - AI Bot <gnodet+bot@gmail.com>
…pache/camel/component/aws2/transcribe/Transcribe2Configuration.java Co-authored-by: Guillaume Nodet - AI Bot <gnodet+bot@gmail.com>
…plicated Applying the review suggestions through GitHub left two consecutive /** */ blocks on getProtocol and setProtocol, the first without the @deprecated tag. Javadoc keeps only the block immediately above the member, so the first one is an orphan - the same defect apache#29641 swept out of the tree. Each pair is now the single block that carries the tag. The generated description is unchanged: the generator reads the last block before the member, and its first line is the same.
e25f90b to
dc3d7a3
Compare
|
Rebased on main — the branch had gone While re-checking the branch I verified the two things I had asserted without proof in my earlier reply, since both are the kind of claim that is cheap to make and expensive to get wrong: The generated description is exactly what a regen would produce. I had said the if (!Strings.isNullOrEmpty(option.getDeprecationNote())) {
if (!sb.isEmpty() && sb.charAt(sb.length() - 1) != '.') {
sb.append('.');
}
sb.append(" Deprecation note: ").append(option.getDeprecationNote());
}So the period is inserted by the generator, not by the Javadoc — which is why the Javadoc has no trailing period and the JSON does. Both JSON copies are byte-identical to each other (
One point worth stating plainly, since it is a description change and not just a deprecation: the old text was "To define a proxy protocol when instantiating the Transcribe client". That is The deprecation markers you asked for are on the field and on both accessors, and the duplicate Javadoc blocks are collapsed to the single block carrying the |
gnodet-bot
left a comment
There was a problem hiding this comment.
Following up on my earlier reviews — both findings are now addressed.
- Missing
@Deprecated/@deprecatedon accessors — ✅ Addressed. Field, getter, and setter all carry@Deprecatedand the@deprecatedJavadoc tag. - Duplicate Javadoc blocks — ✅ Addressed. Each accessor now has a single consolidated block carrying the
@deprecatedtag; the orphaned blocks are gone.
The generated files (aws2-transcribe.json in both locations) correctly reflect "deprecated": true and the deprecationNote. Both DSL factory methods carry @Deprecated. The upgrade-guide entry accurately documents the situation and points users at proxyProtocol/proxyHost/proxyPort.
LGTM.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
davsclaus
left a comment
There was a problem hiding this comment.
Thanks for the rebase. The upgrade-guide conflict is gone, and comparing the patch before and after the rebase, the code is the same as at e25f90b; only the upgrade-guide context moved (your section now follows the camel-docling one).
Re-checked the deprecation as a whole: the field in Transcribe2Configuration has @Deprecated plus @Metadata(deprecationNote = ...), the getter/setter carry @deprecated/@Deprecated, both aws2-transcribe.json copies mark the option deprecated with the note, the component and endpoint DSL builders are @Deprecated, and the upgrade-guide entry points users at proxyProtocol/proxyHost/proxyPort. CI's regen check will confirm the generated files.
Optional: a JIRA key in the title (CAMEL-XXXX: ...) so the deprecation shows up in the release notes.
Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
Resolve the conflict in the 4.24 upgrade guide: keep the entries from main and the camel-aws2-transcribe entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-checking after the rebase/conflict-resolution commit (d810ea4) by @davsclaus.
The merge commit brings in changes from main and resolves the conflict in camel-4x-upgrade-guide-4_24.adoc by keeping both entries — main's camel-docling OCR-headers section first, then this PR's camel-aws2-transcribe section. No code logic changed.
All findings from previous reviews are still addressed:
- ✅
@Deprecated+@Metadata(deprecationNote=...)on the field - ✅
@deprecatedJavadoc +@Deprecatedon both accessors (single consolidated block each) - ✅ Both generated JSON copies updated (
deprecated: true,deprecationNotepresent) - ✅ Both DSL factory methods marked
@Deprecated - ✅ Upgrade-guide entry accurate and complete
LGTM.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Resolves the conflict in the 4.24 upgrade guide: keeps main's new sections and this PR's camel-aws2-transcribe section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com> # Conflicts: # docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-checking after @davsclaus's merge-of-main commit (f7b9d62).
The merge brings in additional upstream context in the upgrade guide — no code logic changed. The actual deprecation work is identical to the commit I reviewed at d810ea4.
All prior findings remain addressed:
- ✅
@Deprecated+@Metadata(deprecationNote = ...)on theprotocolfield - ✅
@deprecatedJavadoc +@Deprecatedon both getter and setter (single consolidated block each — no orphaned Javadoc) - ✅ Both generated JSON copies updated (
"deprecated": true,deprecationNotepresent, both byte-identical) - ✅ Both DSL factory methods marked
@Deprecated - ✅ Upgrade-guide entry accurate: documents the dead option, points users at
proxyProtocol/proxyHost/proxyPort
LGTM.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-checking after @Dhairya-007's merge-of-main commit (5250f8d).
The merge brings in additional upstream context in the main branch — no changes to the actual PR content. The deprecation work is identical to what I reviewed at f7b9d62d.
All prior findings remain addressed:
- ✅
@Deprecated+@Metadata(deprecationNote = ...)on theprotocolfield - ✅
@deprecatedJavadoc +@Deprecatedon both getter and setter (single consolidated block each) - ✅ Both generated JSON copies updated (
"deprecated": true,deprecationNotepresent, both byte-identical) - ✅ Both DSL factory methods marked
@Deprecated - ✅ Upgrade-guide entry accurate: documents the dead option, points users at
proxyProtocol/proxyHost/proxyPort
LGTM.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Problem
Transcribe2Configurationdeclares aprotocoloption:Nothing reads it. The Transcribe client is built by the shared
AwsClientBuilderUtil, which reads the region, the endpoint override and the proxy settings off theAwsCommonConfigurationinterface — and that interface has noprotocol, onlygetProxyProtocol(). Across all ofcomponents/camel-aws, the only callers ofTranscribe2Configuration.getProtocol()are the generatedTranscribe2EndpointConfigurerandTranscribe2ComponentConfigurer. Settingprotocol=HTTPon anaws2-transcribeendpoint is accepted and does nothing.It is also the only
Protocol protocolfield in the whole aws2 family.aws2-sqshas aprotocoloption too, but aStringone that it genuinely uses to build the queue URL scheme.The description made it worse.
setProtocolcarriedsetProxyProtocol's javadoc:so the option read as if it configured the proxy — which is exactly what
proxyProtocol, declared ten lines below it, really does and which the shared builder really applies. A user following the documentation would setprotocoland get no proxy and no warning.Fix
Deprecate it with a
deprecationNote, followingcamel-docling'sapiKeyHeaderin #29591 — the same situation, deprecated the same way in this release — and give it a description that no longer claims to configure a proxy.Changed:
Transcribe2Configuration—@Deprecated+@Metadata(deprecationNote = ...), and the getter/setter javadoc.aws2-transcribe.jsonand itscamel-catalogcopy —"deprecated": trueplus the note, on both the component property and the endpoint parameter. The two files are byte-identical afterwards.Transcribe2EndpointBuilderFactory(2 methods) andAws2TranscribeComponentBuilderFactory(1 method) —@Deprecatedand the re-wrapped javadoc.camel-4x-upgrade-guide-4_24.adoc— the entry a deprecation takes, pointing users atproxyProtocol/proxyHost/proxyPort.The generated files were updated by hand, since I cannot run maven here; I took the exact shape from the
apiKeyHeadercommit (5de82a9) and re-wrapped the DSL javadoc with the generator's own width (69 characters of text at indent 9), checking first that the wrap reproduces the untouched lines. If the regen job still finds a difference I will take its patch.Tests
No behaviour changes, so there is nothing new to assert: the option did nothing before and does nothing now, it is only labelled honestly. The existing
aws2-transcribetests cover the client building that this does not touch.