Files
Shaurya Srivastava 50c3223ce3 Feat: add configurable HTTP timeout to request, webhook, and notification steps (#7243)
* Feat: expose HTTP timeout on built-in workflow steps

Allow request, webhook, and notification steps to set an optional
timeout (Go duration string) that is forwarded to http.#HTTPDo as
request.timeout, so slow HTTP calls are no longer stuck at the 3s default.

Signed-off-by: shaurya2k06 <shaurya2k06@gmail.com>

* Feat: Made requested changes

Signed-off-by: shaurya2k06 <shaurya2k06@gmail.com>

* Fix: align timeout duration regex with Go ParseDuration

Accept "0" and leading-dot fractions like ".5s", matching
time.ParseDuration more closely while still rejecting unit-less
values such as "30".

Signed-off-by: shaurya2k06 <shaurya2k06@gmail.com>

---------

Signed-off-by: shaurya2k06 <shaurya2k06@gmail.com>
2026-07-22 16:32:18 -07:00

2.1 KiB

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: first-vela-workflow
  namespace: default
spec:
  components:
  - name: express-server
    type: webservice
    properties:
      image: oamdev/hello-world
      port: 8000
    traits:
    - type: ingress
      properties:
        domain: testsvc.example.com
        http:
          /: 8000
  workflow:
    steps:
      - name: dingtalk-message
        type: notification
        properties:
          timeout: 30s
          dingding:
            # the DingTalk webhook address, please refer to: https://developers.dingtalk.com/document/robots/custom-robot-access
            url: 
              value: <url>
            message:
              msgtype: text
              text:
                content: Workflow starting...
      - name: application
        type: apply-application
      - name: slack-message
        type: notification
        properties:
          timeout: 30s
          slack:
            # the Slack webhook address, please refer to: https://api.slack.com/messaging/webhooks
            url:
              secretRef:
                name: <secret-key>
                key: <secret-value>
            message:
              text: Workflow ended.
          lark:
            url:
              value: <lark-url>
            message:
              msg_type: "text"
              content: "{\"text\":\" Hello KubeVela\"}"
          email:
            from:
              address: <sender-email-address>
              alias: <sender-alias>
              password:
                # secretRef:
                #   name: <secret-name>
                #   key: <secret-key>
                value: <sender-password>
              host: <email host like smtp.gmail.com>
              port: <email port, optional, default to 587>
            to:
              - kubevela1@gmail.com
              - kubevela2@gmail.com
            content:
              subject: test-subject
              body: test-body

Expected outcome

We can see that before and after the deployment of the application, the messages can be seen in the corresponding group chat.