anchore-script-test fails intermittently in CI
Summary
The anchore-script-test
from test.sh
in both the install and upgrade tests in CI fail intermittently when "Initiating image analysis". Not sure what is going on here, because the failing command does not seem to produce any output. We should look into this so we can release without retrying pipelines.
Steps to reproduce
Open an MR against main
to run the tests.
What is the current behavior?
Intermittently fails.
What is the expected behavior?
Consistently passes.
Relevant logs and/or screenshots
NAME: anchore-enterprise
LAST DEPLOYED: Wed Oct 25 19:38:30 2023
NAMESPACE: anchore-enterprise
STATUS: deployed
REVISION: 1
TEST SUITE: anchore-script-config
Last Started: Wed Oct 25 19:39:38 2023
Last Completed: Wed Oct 25 19:39:38 2023
Phase: Succeeded
TEST SUITE: anchore-script-test
Last Started: Wed Oct 25 19:39:38 2023
Last Completed: Wed Oct 25 19:40:07 2023
Phase: Failed
NOTES:
To use Anchore you need the URL, username, and password to access the API and/or the UI.
Anchore can be accessed via port 8228 on the following DNS name from within the cluster:
anchore-enterprise-anchore-engine-api.anchore-enterprise.svc.cluster.local
* NOTE: On first startup of Anchore, the policy-engine performs a CVE data sync which may take several minutes to complete.
During this time the system status will report 'partially_down' and any images added for analysis will stay in the 'not_analyzed' state.
Once the sync is complete, any queued images will be analyzed and the system status will change to 'all_up'.
Initial setup time can be >120sec for postgresql setup and readiness checks to pass for the services as indicated by pod state.
You can check with:
kubectl get pods -l app=anchore-enterprise-anchore-engine,component=api
**WARNING**
As of January 2023, Anchore Engine is no longer maintained.
There will be no future versions released. Users are advised to use Syft and Grype.
Error: 1 error occurred:
* pod anchore-script-test failed
***** Start Helm Test Logs *****
---
Running test.sh...
---
anchore-api-login is now available
Total wait time was 0
Retrieving system health...
DEBUG:anchorecli.clients.apiexternal:As Account = None DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): anchore-enterprise-anchore-engine-api:8228 DEBUG:urllib3.connectionpool:http://anchore-enterprise-anchore-engine-api:8228 "GET /v1 HTTP/1.1" 200 5 DEBUG:anchorecli.clients.apiexternal:As Account = None DEBUG:anchorecli.clients.apiexternal:GET url=http://anchore-enterprise-anchore-engine-api:8228/v1/system DEBUG:anchorecli.clients.apiexternal:GET insecure=True DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): anchore-enterprise-anchore-engine-api:8228 DEBUG:urllib3.connectionpool:http://anchore-enterprise-anchore-engine-api:8228 "GET /v1/system HTTP/1.1" 200 2518 DEBUG:anchorecli.cli.utils:fetched httpcode from response: 200 Service analyzer (anchore-enterprise-anchore-engine-analyzer-7976cd7b7b-fz5tm, http://anchore-enterprise-anchore-engine-analyzer:8084): up Service policy_engine (anchore-enterprise-anchore-engine-policy-7c94f984dc-qnj8x, http://anchore-enterprise-anchore-engine-policy:8087): up Service apiext (anchore-enterprise-anchore-engine-api-6d6c6bb5cc-xhjzw, http://anchore-enterprise-anchore-engine-api:8228): up Service simplequeue (anchore-enterprise-anchore-engine-simplequeue-8c75858dd-4zqh9, http://anchore-enterprise-anchore-engine-simplequeue:8083): up Service catalog (anchore-enterprise-anchore-engine-catalog-79cd6d6dcf-tkhnh, http://anchore-enterprise-anchore-engine-catalog:8082): up Engine DB Version: 0.0.16 Engine Code Version: 1.1.0
***** 200 OK - all services up! *****
Initiating image analysis...
***** End Helm Test Logs *****