-
Notifications
You must be signed in to change notification settings - Fork 77
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
CLOUDP-272039: Fail when no tests are run #1809
Conversation
88825d8
to
cf71480
Compare
b6e33a6
to
c850a89
Compare
744dc77
to
d1ba549
Compare
.github/workflows/test-e2e-gov.yml
Outdated
AKO_E2E_TEST=1 ginkgo --label-filter="atlas-gov" --timeout 120m --nodes=10 --flake-attempts=1 --randomize-all --race --cover --v --trace --show-node-events --output-interceptor-mode=none --coverpkg=github.com/mongodb/mongodb-atlas-kubernetes/v2/pkg/... | tee .e2e.log | ||
if grep -q "0 Passed" < .e2e.log ; then | ||
echo "No tests were run!" | ||
exit 1 |
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.
I am a bit concerned with the repetition of this line across many scripts below.
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.
The CI should be running the same code as the local dev, but it does not. That is why this fix needs so much repetition.
Fixing the duplicity is a bigger issue than the focus of this PR. It has already been flagged before but not prioritised.
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.
@josvazg I took a quick look on Ginkgo and we can reduce duplication by adding the following code to the Ginkgo suites we have.
var _ = ReportAfterSuite("Ensure test suite was not empty", func(r Report) {
Expect(r.SuiteSucceeded && r.PreRunStats.SpecsThatWillRun > 0).To(BeTrue(), "Suite must run at least 1 test in order to be valid")
})
What do you think?
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.
Uhm, yes I think that would be better.
There is a problem, when running locally we are calling the int
tests and int/clusterwide
somewhat separately, so we might run a label that only runs on one of them and the other should not complain. There is probably another solution for it, but need to figure that out.
In the meantime, I need to understand the helm-update
test failure, which only happens in the CI for some reason.
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.
Applied this suggestion already.
d1ba549
to
a32458a
Compare
test/helper/e2e/actions/steps.go
Outdated
@@ -130,6 +131,10 @@ func WaitTestApplication(data *model.TestDataProvider, ns, labelKey, labelValue | |||
// temp | |||
isAppRunning := func() func() bool { | |||
return func() bool { | |||
status, err := k8s.GetPodStatus(data.Context, data.K8SClient, ns) |
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.
Are these debugging bits? if not, could you clarify how it supports the second status check (line 138)?
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.
yes, I am debugging, please ignore these for the time being.
I will mark as draft and iterate in the helm-update
error first, then will try to move to check the issues within ginkgo instead of from a script, as you suggested above.
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.
Removed the traces, thinking about a different way to debug
Debugging |
20aefac
to
c7a4338
Compare
f4d700e
to
fae6a33
Compare
Signed-off-by: jose.vazquez <[email protected]>
Signed-off-by: jose.vazquez <[email protected]>
fae6a33
to
9b8d614
Compare
After adding traces: failed to get pods: failed to get deployment: deployments.apps "mongodb-atlas-operator" not found
failed to get stream: container "manager" in pod "mongodb-atlas-operator-6f76cd65d9-8kbkh" is waiting to start: image can't be pulled |
98b1cab
to
0504f1f
Compare
Signed-off-by: jose.vazquez <[email protected]>
Easier review guide: ab3c717 Forces failure if tests are skipped. It also fixed the int local script so it invoked clusterwide when using a cluster wide label 2ad192f Removes a non existing test tag 9b8d614 Fixes an issue comparing major versions that was skipping the 0504f1f Ensures e2e test de2f156 Improves the logging for 747f5ce Makes the helm upgrade an |
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.
Walked through in zoom together
CLOUDP-272039
Detect and fail when a test suite did not run any tests. Then:
deletion-protection
test was not running because the test suite was removed at CLOUDP-229283: disable ownership detection #1371helm-update
was not running because of a mistake comparing the major versions.helm-update
was failing because we had to pass the pull secret name at upgrade time.All Submissions: