Skip to content

server(compiler): providing a clone stage causes worker to hang #1054

@plyr4

Description

@plyr4

Description

using multiple clone steps without providing metadata: clone: false will result in a hanging build, a never-ending step, and eventually a dead worker. not good at all!

bug was first reported by @jbrockopp

the compiler should either throw an error early, or it should squash the default clone step and use the provided one.

Value

bad user experience, wasted build rate limits, probably pretty easy to fix.

Useful Information

behavior was confirmed with the following yaml, but it can be achieved with just steps as well

version: "1"

metadata:
  render_inline: true

templates:
  - name: go_build_inline_file_0
    source: template.yml
    type: file

stages:
  00-clone:
    name: clone
    steps:
    - image: target/vela-git:latest
      name: clone
      parameters:
        tags: true

  01-base:
    name: base
    steps:
    - commands:
      - make validate
      image: golang:1.23
      name: validate
      environment:
        GOPATH: ${VELA_BUILD_WORKSPACE}/.go

with template.yml

metadata:
  template: true

stages:
  template_stage_a:
    steps:
      - name: run_templated_stage_step_0_edited_123
        image: golang:latest
        commands:
          - go build main.go
  1. What is the output of vela --version?

same behavior tested against the following versions locally

v0.26.x
v0.25.x
v0.24.x
v0.23.x
v0.22.x
v0.21.x
  1. What operating system is being used?
Darwin NXM9116F46 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:49:39 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6000 arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/serverIndicates a change to the serverbugIndicates a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions