fix(controller): Fix getPodByNode, TestGetPodByNode. Fixes #6458#6897
fix(controller): Fix getPodByNode, TestGetPodByNode. Fixes #6458#6897alexec merged 4 commits intoargoproj:masterfrom
Conversation
|
@alexec Can you approve me for running workflows so I can fix this test? |
|
|
Went back to the commit which added this test (cc701a1) and it passes consistently there. This test now fails consistently so something has regressed since this went in. |
|
The test fails because it expects the cache to contain a pod called |
|
@alexec do you know of a recent change that would cause the template name (whalesay) to be included in the pod name? |
Yes. That changed recently. Test will need to be updated. |
What was the change? |
|
Um. See Git history? |
|
Looks like it was changed in #6712 |
|
Now that the test is running successfully it appears that it is flaky, failing about 3% of the time. |
Signed-off-by: Micah Beeman <micah.beeman@workiva.com>
Signed-off-by: Micah Beeman <micah.beeman@workiva.com>
Signed-off-by: Micah Beeman <micah.beeman@workiva.com>
82e7702 to
d630bc0
Compare
|
@alexec Do you have to approve each run of the tests? |
Signed-off-by: Micah Beeman <micah.beeman@workiva.com>
Codecov Report
@@ Coverage Diff @@
## master #6897 +/- ##
==========================================
+ Coverage 48.44% 48.49% +0.05%
==========================================
Files 265 265
Lines 19259 19260 +1
==========================================
+ Hits 9330 9341 +11
+ Misses 8880 8871 -9
+ Partials 1049 1048 -1
Continue to review full report at Codecov.
|
|
@alexec I am not sure why the E2E test failed, seems unrelated to my changes? |
|
That test is flakey. |
| return nil, fmt.Errorf("Expected node type %s, got %s", wfv1.NodeTypePod, node.Type) | ||
| } | ||
| return woc.controller.getPod(woc.wf.GetNamespace(), node.ID) | ||
| podName := wfutil.PodName(woc.wf.Name, node.Name, node.TemplateName, node.ID) |
There was a problem hiding this comment.
this is a bug fix, needs to be back-ported to v3.2
(argoproj#6897) Signed-off-by: Micah Beeman <micah.beeman@workiva.com> Signed-off-by: kriti-sc <kathuriakriti1@gmail.com>
Signed-off-by: Micah Beeman micah.beeman@workiva.com
getPodByNode was broken by the changes in #6712
Fixed by using the
PodNameutil to obtain the pod name to pass togetPodAdded sleep after pods are created to fix flakiness in TestGetPodByNode
Fixes #6458