Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-397

[RHDH Local] Container entrypoints should fail on errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • 1.6.0
    • RHDH Local
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • Release Note Not Required
    • RHDH Install 3278

      Description of problem:

      As caught in one of my recent review comments, the scripts used as entrypoints for the compose containers do not fail if there is an error, which can lead to unexpected behaviors.

      They should fail sooner rather than later.

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      1. Add a call to a command that does not exist in the containers (like `yq`)
      2. Start the app with "podman compose up" or "docker compose up"

      Actual results:

      1. The logs show that the command does not exist, but this doesn't prevent the containers from starting
      [rhdh]                    | /opt/app-root/src/wait-for-plugins-and-start.sh: line 46: yq: command not found
      [rhdh]                    | Waiting for dynamic-plugins-root/app-config.dynamic-plugins.yaml to be created by install-dynamic-plugins container ...
      [rhdh]                    | Debugger listening on ws://0.0.0.0:9229/c019b082-c0d3-44a0-aa8a-e0985a5712ce                                                                                       
      [rhdh]                    | For help, see: https://nodejs.org/en/docs/inspector                                                                                                                
      [rhdh]                    | 2025-06-24T12:29:24.064Z developer-hub-init info Starting Developer Hub backend                                                                                    
      [rhdh]                    | (node:1) [UNDICI-EHPA] Warning: EnvHttpProxyAgent is experimental, expect them to change at any time.                                                              
      [rhdh]                    | (Use `node --trace-warnings ...` to show where the warning was created)                                                                                            
      [rhdh]                    | Loading config from MergedConfigSource{FileConfigSource{path="/opt/app-root/src/app-config.yaml"}, FileConfigSource{path="/opt/app-root/src/app-config.example.yaml
      "}, FileConfigSource{path="/opt/app-root/src/app-config.example.production.yaml"}, FileConfigSource{path="/opt/app-root/src/dynamic-plugins-root/app-config.dynamic-plugins.yaml"}, FileConfigS
      ource{path="/opt/app-root/src/generated/app-config.patched.yaml"}, EnvConfigSource{count=0}}
      [...]
      

      Expected results:

      In case of any error (unless explicitly caught and handled in the script), the scripts should error out.

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

        1. image-2025-08-13-00-58-14-525.png
          22 kB
          Leanne Ahern
        2. image-2025-08-13-01-09-36-906.png
          10 kB
          Leanne Ahern
        3. image-2025-08-13-01-27-08-431.png
          12 kB
          Leanne Ahern

              lahern Leanne Ahern
              rh-ee-asoro Armel Soro
              RHIDP - Install
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: