harshilv17 commented on PR #6834:
URL: https://github.com/apache/camel-k/pull/6834#issuecomment-5748466743

   Checked this against #6836 properly rather than by eye. Short answer: yes 
for the logic, with one cosmetic leftover I'd like your call on.
   
   #6836 asks to "remove the logic which is still supporting the feature". Here 
is every place on `main` that carried synthetic-**Kit** support, and its state 
on this branch:
   
   | on `main` | what it was | this branch |
   |---|---|---|
   | `integrationkit_types.go:166` | `IntegrationKitTypeSynthetic = 
"synthetic"` | removed |
   | `integrationkit_types_support.go:116` | `(*IntegrationKit).IsSynthetic()` 
| removed |
   | `integrationkit/initialize.go:54` | the "Synthetic Kit, won't be able to 
build or monitor this one" branch | removed |
   | `integrationkit/error.go:46` | `kit.IsExternal() \|\| kit.IsSynthetic()` 
skip | removed |
   | `integrationkit/integrationkit_controller.go:243` | same skip on the 
target Kit | removed |
   | `integrationkit/monitor.go:48,52` | the skip plus the 
`SyntheticKitDeprecated` condition | removed |
   | `trait/camel.go:96,137` | `e.IntegrationKit.IsSynthetic()` catalog 
handling | removed |
   | `trait/jvm.go:80` | `e.IntegrationKit.IsSynthetic()` classpath handling | 
removed |
   | `apis/camel/v1/trait/container.go` | "the operator will create a 
**synthetic** IntegrationKit" on `container.image` | reworded; CRDs, 
`camel-k-crds.adoc` and `container.adoc` regenerated |
   
   `grep -rni synthetic --include='*.go'` on this branch returns nothing 
outside `_test.go` and the generated fake clientsets, where "synthetic method" 
is unrelated client-gen boilerplate. `go build ./...` is clean.
   
   One detail worth flagging: nothing on `main` ever *writes* `kit.type: 
synthetic` — the constant had readers only. So there is no creation path left 
to remove. A synthetic Kit could only arrive from an older operator or a 
hand-applied label, and after this PR such a Kit is simply treated as a normal 
one.
   
   **The leftover.** Eight test functions in `pkg/trait` still carry 
`SyntheticKit` in their names:
   
   ```
   knative_test.go      NewFakeEnvironmentForSyntheticKit, 
TestKnativeSyntheticKit{Default,Enabled}
   trait_types_test.go  
TestDetermineControllerStrategySyntheticKit{Default,ForceKnative}
   kamelets_test.go     
TestKameletSyntheticKit{ConditionTrue,AutoConditionFalse}
   health_test.go       TestApplyHealthTraitSyntheticKit
   ```
   
   These are names only. They already exercise the replacement path — 
`createNonManagedBuildTestEnvironment`, or a Kit with no catalog attached — so 
the coverage is correct and none of them keeps the old feature alive. I left 
them out to keep the diff to the removal itself. If you would rather the tree 
have zero `synthetic` mentions, say so and I will push a follow-up commit 
renaming them to `NonManagedBuild`.
   
   And if you prefer the split after all, I can lift the Kit-side hunks 
(`integrationkit/*`, the two trait call sites, the constant and 
`IsSynthetic()`) into their own PR against #6836 and leave this one purely 
Synthetic Integrations. Either is quick from here — the combined form is what 
is in front of you now.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to