Skip to content

CAMEL-23244: camel-azure - remove deprecated component-specific CredentialType enums#24879

Merged
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23244
Jul 20, 2026
Merged

CAMEL-23244: camel-azure - remove deprecated component-specific CredentialType enums#24879
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23244

Conversation

@oscerd

@oscerd oscerd commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Motivation

CAMEL-23244: the ten component-specific CredentialType enums have been deprecated since 4.19.0 in favor of the shared org.apache.camel.component.azure.common.CredentialType (which is a superset of all of them, with a per-component support matrix in its javadoc). This completes the migration by removing them.

Changes

  • Removed the deprecated CredentialType enums from cosmosdb, eventgrid, eventhubs, files, functions, key-vault, servicebus, storage-blob, storage-datalake, storage-queue.
  • Rewired all references (configurations, client factories, components, endpoints, tests — including static imports) to the shared enum; regenerated configurers, module JSON, catalog and endpoint/component DSL factories.
  • Upgrade-guide entry in camel-4x-upgrade-guide-4_22.adoc (breaking for Java/Endpoint-DSL imports; endpoint URIs unaffected — option values keep the same names, and each component's enums= restriction still lists only its supported values).
  • Side effect worth noting: SERVICE_CLIENT_INSTANCE (datalake) and TOKEN_CREDENTIAL (functions) were already advertised in those components' option metadata but missing from their local enums, so binding them could never resolve — with the shared enum they now bind as advertised.

Main-only (4.22.0): removal is intentionally not backported.

Testing

  • mvn clean install for camel-azure-common + all 10 migrated modules: 11/11 BUILD SUCCESS, no test failures.
  • Full reactor mvn clean install -DskipTests from root: success, all regenerated files committed.

Claude Code on behalf of Andrea Cosentino (@oscerd).

🤖 Generated with Claude Code

@oscerd oscerd added the task label Jul 17, 2026
@oscerd
oscerd requested review from Croway and davsclaus July 17, 2026 21:00

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Claude Code review on behalf of gnodet

Review — PR #24879

Clean mechanical cleanup completing the CredentialType consolidation started in 4.19.0.

What's done correctly

  • All 10 component-specific `CredentialType` enums deleted
  • All imports rewired to `org.apache.camel.component.azure.common.CredentialType`
  • Each component's catalog JSON still restricts `enums=` to only its supported values (not the full superset) — correct behavior
  • Generated files (configurers, catalog, endpoint DSL, component DSL) are consistent with the source changes
  • Upgrade guide entry clearly lists all 10 removed FQCNs and explains that endpoint URIs are unaffected (only Java/Endpoint-DSL imports need updating)

Good catch on the side effect

The PR description notes that `SERVICE_CLIENT_INSTANCE` (datalake) and `TOKEN_CREDENTIAL` (functions) were advertised in those components' option metadata but missing from their local enums, so setting them via the API could never resolve. With the shared enum, these now work as documented — a silent bugfix as a bonus.

Scope

Correctly main-only (4.22.0) — no backport needed for a deprecation cleanup.

LGTM.

@davsclaus

Copy link
Copy Markdown
Contributor

I guess you have spotted the merge conflicts

@oscerd oscerd self-assigned this Jul 20, 2026
@oscerd oscerd added this to the 4.22.0 milestone Jul 20, 2026
@oscerd
oscerd force-pushed the fix/CAMEL-23244 branch from b3bc220 to 462de5d Compare July 20, 2026 08:26
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@apupier

apupier commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Shouldn't we wait for an LTS with this kind of deprecation visible? so waiting for 4.23 to remove it

…ntialType enums

The component-specific CredentialType enums, deprecated since 4.19.0, are
removed in favor of the shared org.apache.camel.component.azure.common
CredentialType from camel-azure-common. Endpoint URIs are unaffected (values
keep the same names); Java imports must switch to the shared enum. This also
makes the SERVICE_CLIENT_INSTANCE (datalake) and TOKEN_CREDENTIAL (functions)
values advertised in the option metadata actually bindable, since the shared
enum contains them while the removed local enums did not.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd
oscerd force-pushed the fix/CAMEL-23244 branch from 462de5d to 23b03ec Compare July 20, 2026 10:57
@oscerd

oscerd commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

The idea was to remove before the next LTS, so we should have this in 4.22.0. The next LTS is 4.22.0 not 4.23.0

@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-azure/camel-azure-cosmosdb
  • components/camel-azure/camel-azure-eventgrid
  • components/camel-azure/camel-azure-eventhubs
  • components/camel-azure/camel-azure-files
  • components/camel-azure/camel-azure-functions
  • components/camel-azure/camel-azure-key-vault
  • components/camel-azure/camel-azure-servicebus
  • components/camel-azure/camel-azure-storage-blob
  • components/camel-azure/camel-azure-storage-datalake
  • components/camel-azure/camel-azure-storage-queue
  • docs
  • dsl/camel-componentdsl
  • dsl/camel-endpointdsl

🔬 Scalpel shadow comparison — Scalpel: 22 tested, 25 compile-only — current: 18 all tested

Maveniverse Scalpel detected 47 affected modules (current approach: 18).

⚠️ Modules only in Scalpel (29)
  • apache-camel
  • camel-allcomponents
  • camel-catalog
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-csimple-maven-plugin
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

Skip-tests mode would test 22 modules (14 direct + 8 downstream), skip tests for 25 (generated code, meta-modules)

Modules Scalpel would test (22)
  • camel-azure-cosmosdb
  • camel-azure-eventgrid
  • camel-azure-eventhubs
  • camel-azure-files
  • camel-azure-functions
  • camel-azure-key-vault
  • camel-azure-servicebus
  • camel-azure-storage-blob
  • camel-azure-storage-datalake
  • camel-azure-storage-queue
  • camel-catalog
  • camel-componentdsl
  • camel-endpointdsl
  • camel-jbang-mcp
  • camel-jbang-plugin-mcp
  • camel-jbang-plugin-route-parser
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-launcher-container
  • camel-yaml-dsl-validator
  • camel-yaml-dsl-validator-maven-plugin
  • docs
Modules with tests skipped (25)
  • apache-camel
  • camel-allcomponents
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-csimple-maven-plugin
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • dummy-component

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

All tested modules (47 modules)
  • Camel :: All Components Sync point
  • Camel :: Assembly
  • Camel :: Azure :: CosmosDB
  • Camel :: Azure :: Event Grid
  • Camel :: Azure :: Event Hubs
  • Camel :: Azure :: Files
  • Camel :: Azure :: Functions
  • Camel :: Azure :: Key Vault
  • Camel :: Azure :: ServiceBus
  • Camel :: Azure :: Storage Blob
  • Camel :: Azure :: Storage Datalake
  • Camel :: Azure :: Storage Queue
  • Camel :: Catalog :: CSimple Maven Plugin (deprecated)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Catalog :: Camel Report Maven Plugin
  • Camel :: Catalog :: Camel Route Parser
  • Camel :: Catalog :: Console
  • Camel :: Catalog :: Dummy Component
  • Camel :: Catalog :: Lucene (deprecated)
  • Camel :: Catalog :: Maven
  • Camel :: Catalog :: Suggest
  • Camel :: Component DSL
  • Camel :: Coverage
  • Camel :: Docs
  • Camel :: Endpoint DSL
  • Camel :: Endpoint DSL :: Support
  • Camel :: Integration Tests
  • Camel :: JBang :: Core
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Main
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Kamelet Main
  • Camel :: Launcher
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL
  • Camel :: YAML DSL :: Deserializers
  • Camel :: YAML DSL :: Maven Plugins
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

@oscerd
oscerd merged commit cb32ec1 into apache:main Jul 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants