Re: [PR] feat(ctrl): dry build - support Pipe BuildComplete phase [camel-k]

2025-12-14 Thread via GitHub


squakez commented on PR #6408:
URL: https://github.com/apache/camel-k/pull/6408#issuecomment-3650611547

   @pkalsi97 you may have a look at the PR which introduced the Integration 
dry-build: https://github.com/apache/camel-k/pull/6339 - in theory the `gc` 
trait would only affect Integration lifecycle, so, already managed by the 
Integration. However, it could be exactly a bug. Please, try the dry-build with 
an Integration with a kamelet to confirm it's a bug we're suffering that. In 
such case, please, just open a new bug issue to be fixed eventually and we can 
merge this. If you already have the code to deploy/undeploy the Pipe I think we 
can include it here, and leave the e2e test as well but temporary disabled 
until the confimap issue is solved. Thanks!


-- 
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]



Re: [PR] feat(ctrl): dry build - support Pipe BuildComplete phase [camel-k]

2025-12-13 Thread via GitHub


pkalsi97 commented on PR #6408:
URL: https://github.com/apache/camel-k/pull/6408#issuecomment-3649616218

   @squakez Here are some more findings 
   
   ```
   === RUN   TestPipeBuildDontRun/build_and_dont_run_pipe
   binding "pipe-deploygfnaz" created
   === RUN   TestPipeBuildDontRun/deploy_the_pipe
   Integration "pipe-deploygfnaz" deployed
   ...
   Integration Status:
 conditions:
 - message: 'error during trait customization: kamelets trait configuration 
failed:
 ConfigMap "pipe-deploygfnaz-kamelet-log-sink-template" not found'
   reason: InitializationFailed
   status: "False"
   type: Ready
 phase: Error
 
 generatedSources:
 - contentRef: pipe-deploygfnaz-kamelet-log-sink-template   # ConfigMap 
MISSING
   from-kamelet: true
   name: log-sink.yaml
 - contentRef: pipe-deploygfnaz-kamelet-timer-source-template
   from-kamelet: true
   name: timer-source.yaml
   Found 0 deployments
   Found 0 pods
   --- FAIL: TestPipeBuildDontRun (203.80s)
   --- PASS: TestPipeBuildDontRun/build_and_dont_run_pipe (23.58s)
   --- FAIL: TestPipeBuildDontRun/deploy_the_pipe (180.07s)
   FAIL
   ``` 
   
   As per my understanding and looking at the flow and doing some digging my 
findings are that this is related to **gc.go** file in trait. 
   
   **Explanation:** I think the GC trait assumes `BuildComplete` phase always 
means "undeploy cleanup". However, `BuildComplete` after 
`--dont-run-after-build` is not an undeploy, it's the initial build state where 
resources should be preserved. Hence the `Deploy` step is unable to find 
ConfigMap. 
   
   Let me know if you resonate with this findinding. We can create an issue and 
deal with it in a separate PR.


-- 
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]



Re: [PR] feat(ctrl): dry build - support Pipe BuildComplete phase [camel-k]

2025-12-13 Thread via GitHub


pkalsi97 commented on PR #6408:
URL: https://github.com/apache/camel-k/pull/6408#issuecomment-3649446393

   @squakez I am working on CLI `deploy`, I am facing some trouble in the e2e 
test. 
   
   When running `kamel bind --dont-run-after-build` followed by kamel deploy 
for Pipes, the deploy fails with:
   ```
   kamelets trait configuration failed: ConfigMap 
"pipe-xxx-kamelet-log-sink-template" not found
   ``` 
   
   here are the new test I am running 
   ```go
t.Run("deploy the pipe", func(t *testing.T) {
g.Expect(Kamel(t, ctx, "deploy", name, "-n", 
ns).Execute()).To(Succeed())
g.Eventually(IntegrationPhase(t, ctx, ns, name), 
TestTimeoutMedium).Should(Equal(v1.IntegrationPhaseRunning))
g.Eventually(PipePhase(t, ctx, ns, name), 
TestTimeoutMedium).Should(Equal(v1.PipePhaseReady))
g.Eventually(Deployment(t, ctx, ns, 
name)).ShouldNot(BeNil())
g.Eventually(IntegrationPodPhase(t, ctx, ns, name), 
TestTimeoutMedium).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
name, v1.IntegrationConditionReady), TestTimeoutMedium).
Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ctx, ns, name), 
TestTimeoutMedium).Should(ContainSubstring("HelloPipe"))
})
t.Run("undeploy the pipe", func(t *testing.T) {
g.Expect(Kamel(t, ctx, "undeploy", name, "-n", 
ns).Execute()).To(Succeed())
g.Eventually(IntegrationPhase(t, ctx, ns, name), 
TestTimeoutMedium).Should(Equal(v1.IntegrationPhaseBuildComplete))
g.Eventually(PipePhase(t, ctx, ns, name), 
TestTimeoutMedium).Should(Equal(v1.PipePhaseBuildComplete))
g.Eventually(IntegrationPodsNumbers(t, ctx, ns, 
name)).Should(Equal(ptr.To(int32(0
g.Eventually(Deployment(t, ctx, ns, 
name)).Should(BeNil())
})
   ``` 
   
   I'll look into this, I am not sure how much time it will take. do the test 
look good to you?


-- 
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]



Re: [PR] feat(ctrl): dry build - support Pipe BuildComplete phase [camel-k]

2025-12-13 Thread via GitHub


pkalsi97 commented on PR #6408:
URL: https://github.com/apache/camel-k/pull/6408#issuecomment-3649241316

   @squakez I'll add it here itself in some time.


-- 
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]



Re: [PR] feat(ctrl): dry build - support Pipe BuildComplete phase [camel-k]

2025-12-13 Thread via GitHub


github-actions[bot] commented on PR #6408:
URL: https://github.com/apache/camel-k/pull/6408#issuecomment-3649233229

   :warning: Unit test coverage report - coverage decreased from 51.6% to 51.5% 
(**-0.1%**)


-- 
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]



[PR] feat(ctrl): dry build - support Pipe BuildComplete phase [camel-k]

2025-12-12 Thread via GitHub


pkalsi97 opened a new pull request, #6408:
URL: https://github.com/apache/camel-k/pull/6408

   Fixes #6340
   
   When using dry build (--dont-run-after-build) with a Pipe, the Pipe now 
correctly shows 'Build Complete' phase instead of staying stuck on 'Creating'.
   
   Changes:
   - Added PipePhaseBuildComplete constant
   - Updated monitor to handle IntegrationPhaseBuildComplete
   - Added unit test and E2E test


-- 
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]