-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
3
-
False
-
None
-
False
-
-
Description of problem:
I am working on adding a GitHub Workflow for tracking Codecov in the gitops-operator repo (respective ticket link: https://issues.redhat.com/browse/GITOPS-3278), but the job run is failing due to some OpenShift CI execution, please see this job run: https://github.com/redhat-developer/gitops-operator/actions/runs/7638249211/job/20808735327?pr=590
It failed with:
2024/01/24 09:40:13 Unable to retrieve current OCP version: Malformed version: FAIL coverage: 69.8% of statements FAIL github.com/redhat-developer/gitops-operator/controllers 0.088s ok github.com/redhat-developer/gitops-operator/controllers/argocd 0.022s coverage: 92.9% of statements ok github.com/redhat-developer/gitops-operator/controllers/argocd/openshift 0.015s coverage: 69.6% of statements ? github.com/redhat-developer/gitops-operator/version [no test files] ok github.com/redhat-developer/gitops-operator/controllers/util 0.012s coverage: 16.7% of statements FAIL make: *** [Makefile:113: test] Error 1 Error: Process completed with exit code 2.
I see the actual error is (line 214 in the link of the job run):
2024-01-25T05:46:17Z ERROR controller_argocd_metrics Error retrieving operator's running namespace {"Request.Namespace": "openshift-gitops", "Request.Name": "openshift-gitops", "error": "open /var/run/secrets/kubernetes.io/serviceaccount/namespace: no such file or directory"}
The unit test script used is github.com/redhat-developer/gitops-operator/blob/master/scripts/openshiftci-presubmit-unittests.sh.
Prerequisites (if any, like setup, operators/versions):
Ability to run OpenShift CI unit tests in gitops-operator repo.
Steps to Reproduce
Try to execute GH Action as per the linked job run above.
Actual results:
Expected results:
Reproducibility (Always/Intermittent/Only Once):
Acceptance criteria:
- CodeCov Report should be generated in the PR comment (for example https://github.com/mehabhalodiya/gitops-operator/pull/3#issuecomment-1695446123)
- Check named "PR Check: Unit test with code coverage" should pass in https://github.com/redhat-developer/gitops-operator/pull/590
Definition of Done:
CodeCov Report should be generated.
Additional info (Such as Logs, Screenshots, etc):
Logs can be found in the job run link shared above.