Skip to content

[DO NOT MERGE] Test Scalpel shadow comparison — kafka-version bump#24250

Closed
gnodet wants to merge 10 commits into
apache:mainfrom
gnodet:test-scalpel-shadow-comparison
Closed

[DO NOT MERGE] Test Scalpel shadow comparison — kafka-version bump#24250
gnodet wants to merge 10 commits into
apache:mainfrom
gnodet:test-scalpel-shadow-comparison

Conversation

@gnodet

@gnodet gnodet commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

DO NOT MERGE — test PR

This PR validates the Scalpel shadow comparison feature from PR #22524.

What this tests

  • Bumps kafka-version from 4.3.1 to 4.3.0 in parent/pom.xml (a managed dependency change)
  • The CI script from PR ci: add Scalpel shadow comparison and upgrade to 0.3.7 #22524 is included in this branch, so the Scalpel shadow comparison section should appear in the CI PR comment
  • Grep should find only the modules that explicitly reference ${kafka-version} — Scalpel should additionally detect downstream modules that transitively depend on kafka through Maven's dependency graph

Expected outcome

The CI PR comment should include a collapsible "Scalpel shadow comparison" section showing:

  • Direct modules detected by Scalpel
  • Downstream modules that Scalpel would also test
  • Downstream modules with tests skipped (from the exclusion list)

Cleanup

Close this PR without merging once the CI result has been validated.

Claude Code on behalf of Guillaume Nodet

gnodet and others added 4 commits June 25, 2026 04:42
Add a shadow comparison section to CI PR comments showing what Scalpel's
skip-tests mode would have tested, without affecting actual test execution.
This validates Scalpel's module detection across many PRs before switching
to Scalpel-driven test execution.

Changes:
- incremental-build.sh: switch from GitHub API diff to local git merge-base,
  configure Scalpel with skipTestsForDownstreamModules and fetchBaseBranch=false,
  add writeScalpelComparison() for collapsible PR comment section
- pr-build-main.yml / sonar-build.yml: add base branch fetch step for
  Scalpel's merge-base detection in shallow CI clones
- CI-ARCHITECTURE.md: document shadow comparison approach and configuration
The checkout action was accidentally downgraded from v7.0.0 to v6.0.2,
and persist-credentials: false was dropped from sonar-build.yml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ION_LIST

Restore fetchDiff() to use the GitHub API (unchanged from main) instead
of local git merge-base. The grep-based script has no dependency on local
git history — only Scalpel needs it. This eliminates regression risk for
the existing incremental build path.

Also derive skip_downstream from EXCLUSION_LIST via sed instead of
hardcoding a duplicate list that could silently diverge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When Scalpel fails (mvn validate error, missing report due to shallow
clone depth, or full-build trigger), surface the reason in the PR
comment's shadow comparison section instead of silently omitting it.

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.

@gnodet gnodet force-pushed the test-scalpel-shadow-comparison branch from 757b653 to f2e1a15 Compare June 25, 2026 13:09
@gnodet gnodet changed the title [DO NOT MERGE] Test Scalpel shadow comparison for PR #22524 [DO NOT MERGE] Test Scalpel shadow comparison — jackson2-version bump Jun 25, 2026
@gnodet gnodet changed the title [DO NOT MERGE] Test Scalpel shadow comparison — jackson2-version bump [DO NOT MERGE] Test Scalpel shadow comparison — kafka-version bump Jun 25, 2026
@gnodet gnodet force-pushed the test-scalpel-shadow-comparison branch from f2e1a15 to 6bfb1fc Compare June 25, 2026 15:00
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • parent

POM dependency changes: targeted tests included

Changed properties: kafka-version

Modules affected by dependency changes (45)
  • :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-debezium-common
  • :camel-debezium-db2
  • :camel-debezium-mongodb
  • :camel-debezium-mysql
  • :camel-debezium-oracle
  • :camel-debezium-postgres
  • :camel-debezium-sqlserver
  • :camel-endpointdsl
  • :camel-endpointdsl-support
  • :camel-ibm-secrets-manager
  • :camel-itest
  • :camel-jbang-core
  • :camel-jbang-it
  • :camel-jbang-main
  • :camel-jbang-mcp
  • :camel-jbang-plugin-edit
  • :camel-jbang-plugin-generate
  • :camel-jbang-plugin-kubernetes
  • :camel-jbang-plugin-route-parser
  • :camel-jbang-plugin-test
  • :camel-jbang-plugin-tui
  • :camel-jbang-plugin-validate
  • :camel-kafka
  • :camel-kamelet-main
  • :camel-launcher
  • :camel-launcher-container
  • :camel-report-maven-plugin
  • :camel-route-parser
  • :camel-yaml-dsl
  • :camel-yaml-dsl-deserializers
  • :camel-yaml-dsl-maven-plugin
  • :camel-yaml-dsl-validator
  • :camel-yaml-dsl-validator-maven-plugin
  • :coverage
  • :docs
  • :dummy-component
🔬 Scalpel shadow comparison (skip-tests mode)

Scalpel skip-tests mode would test 16 modules (3 direct + 13 downstream)

29 downstream module(s) would have tests skipped (generated code, meta-modules)

Modules Scalpel would test (16)
  • camel-debezium-common
  • camel-debezium-db2
  • camel-debezium-mongodb
  • camel-debezium-mysql
  • camel-debezium-oracle
  • camel-debezium-postgres
  • camel-debezium-sqlserver
  • camel-ibm-secrets-manager
  • camel-jbang-mcp
  • camel-jbang-plugin-route-parser
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-kafka
  • camel-launcher-container
  • camel-yaml-dsl-validator
  • camel-yaml-dsl-validator-maven-plugin
Modules with tests skipped (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

ℹ️ 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 :: Catalog :: CSimple Maven Plugin (deprecated)
  • Camel :: Catalog :: CSimple Maven Plugin (deprecated) SUCCESS
  • 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 :: Debezium :: Common
  • Camel :: Debezium :: DB2
  • Camel :: Debezium :: MongoDB
  • Camel :: Debezium :: MySQL
  • Camel :: Debezium :: Oracle
  • Camel :: Debezium :: PostgreSQL
  • Camel :: Debezium :: SQL Server
  • Camel :: Docs
  • Camel :: Endpoint DSL
  • Camel :: Endpoint DSL :: Support
  • Camel :: IBM :: Secrets Manager
  • 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 :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Kafka
  • Camel :: Kamelet Main
  • Camel :: Launcher
  • Camel :: Launcher :: Container
  • Camel :: Parent
  • 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

Scalpel 0.3.5 still includes ~600 uncategorized parent-inherited modules
in affectedModules (scalpel#39, regression from apache#30 fix). Filter jq
queries to only DIRECT and DOWNSTREAM categories, and compute the
summary count from the breakdown rather than the inflated total.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet force-pushed the test-scalpel-shadow-comparison branch from 6bfb1fc to fb35e5b Compare June 25, 2026 16:23
gnodet and others added 2 commits June 25, 2026 17:56
Fixes inflated affectedModules count — parent-inherited modules that
don't use the changed dependency are no longer included (scalpel#39).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet force-pushed the test-scalpel-shadow-comparison branch from fb35e5b to 8b233a6 Compare June 26, 2026 05:36
gnodet added a commit to maveniverse/scalpel that referenced this pull request Jun 26, 2026
… boolean (#42)

Two fixes for issues observed in CI (apache/camel#24250):

1. .mvn/ files (extensions.xml, maven.config) are Maven build infrastructure,
   not module source. When fullBuildTriggers is overridden to exclude .mvn/**,
   these files were still mapped to the root module as SOURCE_CHANGE, causing
   ALL reactor modules to cascade as DOWNSTREAM (670 instead of 45).

2. The report JSON had testsSkippedReason (string) but no testsSkipped (boolean).
   CI scripts using jq '.testsSkipped == true' found 0 matches because the
   field did not exist — only testsSkippedReason was present.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
gnodet and others added 3 commits June 26, 2026 11:55
Fixes inflated affectedModules count where parent POM property changes
(e.g. kafka-version) were reported as affecting all ~670 modules.
Also fixes skipTestsForDownstreamModules not taking effect.

See maveniverse/scalpel#39

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mparison

Temporary POM change to trigger Scalpel's shadow comparison on CI.
This PR validates that the Scalpel shadow section renders correctly
in the PR comment and detects downstream modules that grep misses.

This PR should be closed without merging once validated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This PR changes .mvn/extensions.xml (Scalpel version upgrade) which
would cause Scalpel to see all modules as affected. Exclude .mvn/**
from diff analysis so we only test the kafka-version change.

Test-only change — not intended for merge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet

gnodet commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Closing — validated Scalpel 0.3.7 shadow comparison successfully. Creating fresh test PRs with clean CI history.

Claude Code on behalf of @gnodet

@gnodet gnodet closed this Jun 26, 2026
@gnodet gnodet deleted the test-scalpel-shadow-comparison branch June 26, 2026 12:30
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.

1 participant