galasa-dev / projectmanagement

Project Management repo for Issues and ZenHub
7 stars 4 forks source link

Galasactl Resources Apply times out with a large resources file #1959

Closed Tom-Slattery closed 1 month ago

Tom-Slattery commented 2 months ago

Describe the bug

I have an automated pipeline that applies CPS properties to the Ecosystem using Galasactl. The CPS Properties file is large, and this is causing the resources apply to time out wih a 504 error.

Steps to reproduce

  1. Create a large CPS properties yaml file
  2. Run "galasactl resources apply -f my_file.yaml"
  3. You will see an error as follows:
  4. galasactl resources apply -f cps.yaml -b $BOOTSTRAP_URL --log -
    2024/08/12 09:30:51 Galasa CLI - apply Resources Command
    2024/08/12 09:30:51 Galasa home is '/workspaces/.galasa'
    2024/08/12 09:30:53 The API server is at '*****API SERVER******'
    2024/08/12 09:30:53 GetBearerToken entered.
    2024/08/12 09:30:53 Retrieving bearer token from file '/workspaces/.galasa/bearer-tokens/*******API SERVER*******%2Fapi.json'
    2024/08/12 09:30:53 Retrieved bearer token from file '/workspaces/.galasa/bearer-tokens/*******API SERVER*******%2Fapi.json' OK
    2024/08/12 09:30:53 JwtCache: Get. Returning jwt of length 792. err: <nil>
    2024/08/12 09:30:53 GetBearerToken exiting. length of bearerToken: 792 err:<nil>
    2024/08/12 09:31:53 sendResourcesRequestToServer Failed - HTTP response - status code:504 payload:<html>
    <head><title>504 Gateway Time-out</title></head>
    <body>
    <center><h1>504 Gateway Time-out</h1></center>
    <hr><center>nginx</center>
    </body>
    </html>
    2024/08/12 09:31:53 GAL1115E: An unexpected response was received from the Galasa Ecosystem. Collect a log with the --log option and contact your Galasa Ecosystem adminstrator.
    Error: GAL1115E: An unexpected response was received from the Galasa Ecosystem. Collect a log with the --log option and contact your Galasa Ecosystem adminstrator.
    2024/08/12 09:31:53 GAL1115E: An unexpected response was received from the Galasa Ecosystem. Collect a log with the --log option and contact your Galasa Ecosystem adminstrator.
    2024/08/12 09:31:53 Exit code is 1

    Expected behavior

    Resources apply should work for any size of file

Additional context

N/A

techcobweb commented 2 months ago

How big is this resources file please ? Can you time galasactl ... to see how long it all takes overall ?

techcobweb commented 2 months ago

I reproduced it with the attached file.

props2.yaml.zip

eamansour commented 1 month ago

Released in 0.37.0