feat(traits): remove deprecated logging, master and telemetry traits - #6807
hxxxi-malog wants to merge 9 commits into
Conversation
squakez
left a comment
There was a problem hiding this comment.
LGTM, thanks for the work!
|
|
|
Now, |
squakez
left a comment
There was a problem hiding this comment.
Thanks for the fix. I've gone through more carefully and there are a few things to change.
|
Thank you for your review. I have now reverted the special handling in ExtractAndMaybeDeleteTraits and configureTrait, removed the removed-trait-specific tests, and changed TestTraitsMerge to use the cron trait. |
|
Pipe test is failing with I think that the |
squakez
left a comment
There was a problem hiding this comment.
The proposed fix should clear the error.
|
@hxxxi-malog please, rebase. Once done if all checks are green we can merge. |
Thanks for your review. The validate check on main is also red at |
|
|
Ah, yeah, sorry, that is some wrong formatting that I'm going to fix it in |
|
@hxxxi-malog should be fixed on |
- Ignore legacy trait annotations of the removed logging, master and telemetry traits during extraction (cleaning them up when migrating), while still rejecting other unknown traits - Restore the exported resources.TemplateResource API that was removed with the master trait, with a neutral test template - Extend removed-trait test coverage: table-driven configure tests for all three traits, legacy JSON field names, merge behavior and the annotation paths for Integration, IntegrationKit and Pipe - Regenerate deepcopy artifacts with the pinned controller-gen v0.20.0 so generated style matches CI output
…aits Revert ExtractAndMaybeDeleteTraits and Catalog.configureTrait to the previous logic so removed traits are treated exactly like any other trait missing from the catalog, and drop the tests that were specific to removed-trait behavior. TestTraitsMerge now uses the cron trait instead of the deprecated logging one.
3b92b6d to
0fb3e88
Compare
|
Thanks @squakez ! The rebase is done, the branch is now on top of the latest main, and both camel.properties suggestions have been included. |
|
E2E master test has to be removed as well. Not sure if there is also logging left over. |
|
|
Thanks, I'll remove the e2e master test. As for logging leftovers, I couldn't find any — there is no logging-specific e2e test, and the remaining loggerName usages are Kamelet configuration unrelated to the trait. The DeprecatedLogging field in One question: |
|
Telemetry test needs to stay as they are testing telemetries via the new mechanism, not involving older trait. Thanks! |
|
Done, the master e2e test has been removed in the commit, and its dedicated route fixture |
|
@hxxxi-malog sorry, I made a mistake. Just double checking and the master test was fine, I mean, it did not reference already any master trait. It must stay, and, if it failed, we need to verify why. Please revert the related removal and we can run another round of test to validate what was really going on. My apologies for the confusion. |
This reverts commit 70ecec4.
|
OK, the master e2e test and its fixture have been reverted, with content identical to main. |
|
|
|
I think the reason the check failed is that the deleted master trait is still automatically activated on main and adds the master capability to the Integration. During the build, this is used to package the cluster service library into the image. After removing it, the image is missing that library, so Quarkus ignores those three properties, and the |
Yeah, it seems it is the correct diagnose. Please, add the related dependency into the test and we can restart a round of test, thanks! |
|
OK, I've finished adding the dependency to every KamelRun in the master e2e test, and now we can start testing to see how it works. |
|
|
|
Hmm... it looks like the last dependency fix has taken effect, but the test still fails because the trait has revealed another hidden responsibility: the deleted trait would parse URIs like |
Fixes #6805
Removes the
logging,masterandtelemetrytraits, deprecated since 2.9.0, following the removal pattern used for the Jolokia trait (#6764).What is removed
pkg/trait/logging.go,master.go,telemetry.go)pkg/trait/discovery/, which was only used by the telemetry traitpkg/resources/resources/addons/master/; RBAC is no longer created automatically by the operatorresources.TemplateResourcehelper, its test and its master template fixture, because they were only used by the removed master traitGenerated CRDs, Helm CRDs, deepcopy code, apply configurations and API documentation are updated to match the remaining deprecated API fields.
Compatibility and behavior
spec.traitsfields remain in the CRD/API with their original JSON names:logging,masterandtelemetryDeprecatedLogging,DeprecatedMasterandDeprecatedTelemetry, following the existing removed-trait patternspec.traitshave no active implementation and are silently ignoredMigration
traits.logging.level=DEBUG->-p quarkus.log.level=DEBUG--trait telemetry.endpoint=http://jaeger:4317->-p quarkus.otel.exporter.otlp.traces.endpoint=http://jaeger:4317-p quarkus.camel.cluster.kubernetes.resource-name=<integration>-lock-p quarkus.camel.cluster.kubernetes.resource-type=Lease-p quarkus.camel.cluster.kubernetes.labels."camel.apache.org/integration"=<integration-name>For existing Integrations using the master trait, create the manual RBAC before removing the trait configuration.
Tests and verification
quarkus.console.colorgo test ./pkg/trait ./pkg/apis/camel/v1 ./pkg/apis/camel/v1/trait ./pkg/client/camel/applyconfiguration/camel/v1 ./pkg/resources ./pkg/controller/pipe ./pkg/cmd ./pkg/platformgo test -tags=integration -run "^\$" ./e2e/...git diff --checkpassesAI-generated by Codex on behalf of @hxxxi-malog; reviewed and completed by @hxxxi-malog.