opendevstack / ods-provisioning-app

Provisioning app, which triggers project and component provisions (including Jira / Confluence / BitBucket and OCP resource creation)
Apache License 2.0
15 stars 20 forks source link

3.x (CI BUILD) - "DELETE_COMPONENT" Provision API endpoint fails with HTTP 401 #699

Closed clemensutschig closed 2 years ago

clemensutschig commented 2 years ago

Describe the bug ODS CI Build for 3.x fails during TestVerifyOdsQuickstarterProvisionThruProvisionApi

Affected version (please complete the following information):

Log Output (ensure to remove any confidential information like tokens, project names, etc.


12:57:48      amazon-ebs: === RUN   TestVerifyOdsQuickstarterProvisionThruProvisionApi
12:57:50      amazon-ebs:     jenkinsfile_test.go:33: Execution of `create-project-api.sh/delete component` for 'ODSVERIFY' failed:
12:57:50      amazon-ebs:         StdOut: No config file found, assuming defaults, current dir: /home/openshift/opendevstack/ods-quickstarters/tests/release-manager
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:         Started provision project script with command (DELETE_COMPONENT)!
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:         ... encoding basic auth credentials in base64 format
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:         ... sending request to 'https://prov-app-ods.ocp.odsbox.lan' (output will be saved in file './response.txt' and headers in file './headers.txt')
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:         create or update project, or delete component - DELETE_COMPONENT
12:57:50      amazon-ebs:         ... DELETE_COMPONENT project request payload loaded from 'golden/create-quickstarter-request.json'
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:         ... displaying payload file content:
12:57:50      amazon-ebs:         {
12:57:50      amazon-ebs:           "projectKey" : "ODSVERIFY",
12:57:50      amazon-ebs:           "quickstarters" : [
12:57:50      amazon-ebs:             {
12:57:50      amazon-ebs:               "component_type" : "release-manager",
12:57:50      amazon-ebs:               "component_id" : "releasemanager"
12:57:50      amazon-ebs:             },
12:57:50      amazon-ebs:             {
12:57:50      amazon-ebs:               "component_type" : "be-golang-plain",
12:57:50      amazon-ebs:               "component_id" : "golang"
12:57:50      amazon-ebs:             }
12:57:50      amazon-ebs:           ]
12:57:50      amazon-ebs:         }
12:57:50      amazon-ebs:         curl DELETE request successful...
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:         ... displaying HTTP response body (content from './response.txt'):
12:57:50      amazon-ebs:         No request (body) response recorded
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:         ... displaying HTTP response code
12:57:50      amazon-ebs:         http_resp_code=401
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:         something went wrong... endpoint responded with error code [HTTP CODE=401] (expected was 200)
12:57:50      amazon-ebs:```
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:         StdErr:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
12:57:50      amazon-ebs:                                          Dload  Upload   Total   Spent    Left  Speed
12:57:50      amazon-ebs: 100   224    0     0  100   224      0    112  0:00:02  0:00:01  0:00:01   112
12:57:50      amazon-ebs:
12:57:50      amazon-ebs:         Err: exit status 1
12:57:50      amazon-ebs: --- FAIL: TestVerifyOdsQuickstarterProvisionThruProvisionApi (2.01s)
12:57:50      amazon-ebs: FAIL
12:57:50      amazon-ebs: FAIL  github.com/opendevstack/ods-quickstarters/tests/release-manager 2.024s
12:57:50      amazon-ebs: ?     github.com/opendevstack/ods-quickstarters/tests/utils   [no test files]
12:57:50      amazon-ebs: FAIL
12:57:50  ==> amazon-ebs: make: *** [test] Error 1

**Additional context**
Current 3.x CI build
clemensutschig commented 2 years ago

ok finally - I found it .. :)

in 3.x: https://github.com/opendevstack/ods-quickstarters/blob/3.x/tests/release-manager/jenkinsfile_test.go#L26

and in 4.x/master: https://github.com/opendevstack/ods-core/blob/4.x/tests/smoketest/provision-api_test.go#L101

clemensutschig commented 2 years ago

@stitakis any ideas? ...

There is no code change whatsoever...

clemensutschig commented 2 years ago

And now the CI worked again .. this must be some weird race condition