Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-3661

Not possible to use multiple postStart commands

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Release Notes
    • Hide
      = Multiple postStart events

      With this update, {prod-short} supports multiple postStart events in devfiles.

      NOTE: Composite commands are currently not supported as postStart events.

      .Devfile example with two commands as postStart events
      ====
      [source,yaml]
      ----
      schemaVersion: 2.1.0
      metadata:
        name: multi-post-start
      components:
        - name: tools
          container:
            image: quay.io/devfile/universal-developer-image
      commands:
        - id: first-command
          exec:
            component: tools
            commandLine: "echo first command"
        - id: second-command
          exec:
            component: tools
            commandLine: "echo second command"
      events:
        postStart:
          - first-command
          - second-command
      ----
      ====
      Show
      = Multiple postStart events With this update, {prod-short} supports multiple postStart events in devfiles. NOTE: Composite commands are currently not supported as postStart events. .Devfile example with two commands as postStart events ==== [source,yaml] ---- schemaVersion: 2.1.0 metadata:   name: multi-post-start components:   - name: tools     container:       image: quay.io/devfile/universal-developer-image commands:   - id: first-command     exec:       component: tools       commandLine: "echo first command"   - id: second-command     exec:       component: tools       commandLine: "echo second command" events:   postStart:     - first-command     - second-command ---- ====
    • Enhancement
    • Done

    Description

      Description of problem:

      Creating workspace from a devfile which contains multiple events (i.e. multiple postStart commands) fails.

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

      Steps to Reproduce

      Try to create a workspace based on the following devfile:

      schemaVersion: 2.1.0
      metadata:
        name: demo-project
      components:
        - name: tools
          container:
            image: quay.io/devfile/universal-developer-image:ubi8-f5ffca8
            memoryRequest: 1Gi
            memoryLimit: 3Gi
            cpuLimit: 1000m
            cpuRequest: 500m
      commands:
        - id: second-command
          exec:
            component: tools
            commandLine: "echo second command"
        - id: install
          exec:
            component: tools
            commandLine: "/home/user/.sdkman/candidates/jbang/current/bin/jbang trust add -o --fresh --quiet https://github.com/apache/camel/blob/HEAD/dsl/camel-jbang/camel-jbang-main/dist/CamelJBang.java"
      events:
        postStart:
          - install
          - second-command 

      It fails with following error:

      • Error processing devfile: component tools has multiple postStart events attached to it
      • RestartOpen in Verbose mode

      Actual results:

      It's not possible to use multiple postStart events

      Expected results:

      It's possible to use multiple postStart events

      Reproducibility (Always/Intermittent/Only Once):

      always

      Build Details:

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

      • Error processing devfile: component tools has multiple postStart events attached to it
      • RestartOpen in Verbose mode

      Attachments

        Issue Links

          Activity

            People

              amisevsk Angel Misevski
              rhn-support-agiertli Anton Giertli
              Maksym Musienko Maksym Musienko
              Max Leonov Max Leonov
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: