-
Notifications
You must be signed in to change notification settings - Fork 366
feat(ctrl): dry build - support Pipe BuildComplete phase and deploy/undeploy CLI #6408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
squakez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work. I think we need to complement the CLI deploy and provide some test to verify that, after the user build the Pipe, can deploy the Pipe in a similar way done for the Integration. And, in that case, the flow proceed correctly.
Let me know if you want to include this in a follow up issue or you can tackle in this same PR.
|
|
|
@squakez I'll add it here itself in some time. |
|
@squakez I am working on CLI When running here are the new test I am running 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? |
|
@squakez Here are some more findings 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 Let me know if you resonate with this findinding. We can create an issue and deal with it in a separate PR. |
|
@pkalsi97 you may have a look at the PR which introduced the Integration dry-build: #6339 - in theory the |
|
@squakez Thanks for the input. Please take a look at the deploy/undeploy and let me know if it needs any changes. I'll refer to the PR mentioned above and investigate further to figure out why exactly these test are failing. If I am able to find a bug I'll raise the issue and PR fix. Alternatively we can directly create an issue stating that these e2e test are being skipped and we need to investigate further why they are failing and how they can be fixed. |
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:
New Changes: