Skip to content

CAMEL-23643: Add service version to test-infra metadata#23633

Merged
davsclaus merged 4 commits into
mainfrom
CAMEL-23643
May 29, 2026
Merged

CAMEL-23643: Add service version to test-infra metadata#23633
davsclaus merged 4 commits into
mainfrom
CAMEL-23643

Conversation

@davsclaus
Copy link
Copy Markdown
Contributor

Summary

  • Add serviceVersion field to @InfraService annotation and generated metadata.json
  • Auto-detect service version from container image tags in container.properties (65 container-based services)
  • Auto-detect service version from Maven dependency resolution via META-INF/infra-service.properties GA hints (6 embedded/special services: FTP, FTPS, SFTP, Hazelcast, Ignite, SMB)
  • All 68 test-infra services now report their service version in metadata

How it works

Three-tier version detection in CamelTestInfraGenerateMetadataMojo:

  1. Annotation override@InfraService(serviceVersion = "...") for manual specification
  2. Container image tag — scans container.properties from dependency JARs, matches alias to image key, extracts version from Docker image tag (handles cross-module properties, multi-image modules like Kafka, RocketMQ's separate .version pattern)
  3. GA hint lookup — reads META-INF/infra-service.properties files that map service alias to Maven groupId:artifactId, then resolves the artifact version from the dependency tree. Zero maintenance on version bumps.

Test plan

  • Build camel-package-maven-plugin and camel-test-infra-all
  • Verify all 68 services have serviceVersion in generated metadata.json
  • Verify container-based services extract correct image tags (Kafka=4.3.0, Redpanda=v26.1.9, Redis=7.4.9-alpine, etc.)
  • Verify embedded services resolve from Maven dependencies (FTP=1.2.1, SFTP=2.18.0, Hazelcast=5.4.0, Ignite=2.18.0, SMB=0.14.0)
  • Verify multi-image modules match correct per-implementation version (Kafka 4 variants, HiveMQ 2 variants)

Claude Code on behalf of Claus Ibsen

🤖 Generated with Claude Code

davsclaus and others added 2 commits May 29, 2026 11:53
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… and show in TUI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@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.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • core/camel-api
  • dsl/camel-jbang/camel-jbang-core
  • dsl/camel-jbang/camel-jbang-plugin-tui
  • test-infra/camel-test-infra-all
  • test-infra/camel-test-infra-ftp
  • test-infra/camel-test-infra-hazelcast
  • test-infra/camel-test-infra-ignite
  • test-infra/camel-test-infra-smb
  • tooling/maven/camel-package-maven-plugin
  • tooling/spi-annotations

ℹ️ Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the test-dependents label to force testing all dependents.

POM dependency changes: targeted tests included

Modules affected by dependency changes (11)
  • :camel-api
  • :camel-catalog
  • :camel-jbang-core
  • :camel-jbang-plugin-tui
  • :camel-package-maven-plugin
  • :camel-test-infra-all
  • :camel-test-infra-ftp
  • :camel-test-infra-hazelcast
  • :camel-test-infra-ignite
  • :camel-test-infra-smb
  • :spi-annotations

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • dsl/camel-jbang/camel-jbang-core: 1 test(s) disabled on GitHub Actions

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-jbang-core. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
Build reactor — dependencies compiled but only changed modules were tested (11 modules)
  • Camel :: API
  • Camel :: Catalog :: Camel Catalog
  • Camel :: JBang :: Core
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: Maven Plugins :: Camel Maven Package
  • Camel :: SPI Annotations
  • Camel :: Test Infra :: All test services
  • Camel :: Test Infra :: Ftp
  • Camel :: Test Infra :: Hazelcast
  • Camel :: Test Infra :: Ignite
  • Camel :: Test Infra :: Server Message Block

⚙️ View full build and test results

Copy link
Copy Markdown
Contributor

@apupier apupier left a comment

Choose a reason for hiding this comment

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

I think we need to update the job which is creating the PR to upgrade the container

@davsclaus
Copy link
Copy Markdown
Contributor Author

I think we need to update the job which is creating the PR to upgrade the container

I do not undertand

@apupier
Copy link
Copy Markdown
Contributor

apupier commented May 29, 2026

I think we need to update the job which is creating the PR to upgrade the container

I do not undertand

When this job is running https://github.com/apache/camel/blob/main/.github/workflows/check-container-versions.yml , it is updating the value in the container.properties file (see fro instance #23619 ). With this PR, it should also update the value in the catalog/[...]/test-infra/metadata.json file, isn't it?

@davsclaus
Copy link
Copy Markdown
Contributor Author

Good point @apupier — tracked in CAMEL-23648 to update the check-container-versions.yml workflow to also regenerate metadata.json after bumping container image versions.

Claude Code on behalf of Claus Ibsen

@davsclaus davsclaus merged commit 8c61aec into main May 29, 2026
6 checks passed
@davsclaus davsclaus deleted the CAMEL-23643 branch May 29, 2026 13:59
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.

2 participants