Skip to content

Add deployment scope support and rename it-classloader to it-instrumentation#23

Merged
ylecaillez merged 4 commits intopingidentity:mainfrom
ylecaillez:feature/deployment-scope
Mar 24, 2026
Merged

Add deployment scope support and rename it-classloader to it-instrumentation#23
ylecaillez merged 4 commits intopingidentity:mainfrom
ylecaillez:feature/deployment-scope

Conversation

@ylecaillez
Copy link
Copy Markdown
Collaborator

Add a 'scope' field to the deployment descriptor that controls which classes are instrumented. When scope is 'test', both target/classes and target/test-classes are combined into a single classes.jar, and test-scoped dependencies are included.

  • Add 'scope' field to ServiceDescriptor and TraceAuditorDescriptor
  • Remove dead instrumentTestClasses() method from Instrumentation
  • Accept List classesDirs in instrumentClasses() to support combining multiple source directories
  • Add scope validation (reject scope with artifact/dir)
  • Rename collectRuntimeDependencyJars() to collectDependencyJars(scope) to include test-scoped artifacts when scope is 'test'
  • Rename it-classloader IT to it-instrumentation with new package name
  • Extend verify.groovy to test the actual instrumented call path: bytecode inspection (javap) and runtime execution of redirected Thread creation via ThreadsInterceptors.newThread()

…ntation

Add a 'scope' field to the deployment descriptor that controls which
classes are instrumented. When scope is 'test', both target/classes and
target/test-classes are combined into a single classes.jar, and
test-scoped dependencies are included.

- Add 'scope' field to ServiceDescriptor and TraceAuditorDescriptor
- Remove dead instrumentTestClasses() method from Instrumentation
- Accept List<Path> classesDirs in instrumentClasses() to support
  combining multiple source directories
- Add scope validation (reject scope with artifact/dir)
- Rename collectRuntimeDependencyJars() to collectDependencyJars(scope)
  to include test-scoped artifacts when scope is 'test'
- Rename it-classloader IT to it-instrumentation with new package name
- Extend verify.groovy to test the actual instrumented call path:
  bytecode inspection (javap) and runtime execution of redirected
  Thread creation via ThreadsInterceptors.newThread()
…ly-typed fields

Replace optional artifact/dir/scope String fields in ServiceDescriptor and
TraceAuditorDescriptor with a sealed Source interface (Artifact, Dir, Project).
Source.of() factory validates mutually exclusive fields at deserialization time,
eliminating the need for separate validation in BuildMojo. Use @JacksonInject to
provide the project artifactId during YAML parsing so Source.Project is fully
constructed at parse time. Add custom serializers to write Source variants back
as flat YAML keys.
Add requireNonNull for className, ip, and source in ServiceDescriptor and
TraceAuditorDescriptor. Normalize args to List.of() when null. Validate
Source fields are mutually exclusive (artifact, dir, scope). Move GAV
parsing into Artifact constructor for fail-fast validation, and move
parseScope into Scope enum. Consolidate ServiceDescriptorSerializer and
TraceAuditorDescriptorSerializer into a single DeploymentDescriptorSerializer
class with a public serialize() entry point.
@ylecaillez ylecaillez merged commit 985e261 into pingidentity:main Mar 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant