woodpecker-ci/woodpecker

Steps with the same name

Opened this issue · 1 comments

Component

other

Describe the bug

Trying to use steps with the same name, pipeline fails or works wrong.

#3411 (comment):

be aware that steps now can have the same name

Steps to reproduce 1

  1. Make pipeline
skip_clone: true
steps:
  notification:
    depends_on:
      - build
    image: alpine
    commands:
      - echo 'Alright'
  build:
    image: alpine
    commands:
      - echo 'Build'
  build:
    image: alpine
    commands:
      - echo 'Test'
  package:
    image: alpine
    commands:
      - echo 'Package'
  1. Get error in editor
    Screenshot 2024-11-16 1
  2. Run pipeline
  3. Get error in UI
    Screenshot 2024-11-16 2

⬆️ pipeline with one build step works well.

server-same-name-map.log
agent-same-name-map.log

Steps to reproduce 2

  1. Make pipeline
skip_clone: true
steps:
  - name: notification
    depends_on:
      - build
    image: alpine
    commands:
      - echo 'Alright'
  - name: build
    image: alpine
    commands:
      - echo 'Build'
  - name: build
    image: alpine
    commands:
      - echo 'Test'
  - name: package
    image: alpine
    commands:
      - echo 'Package'
  1. Run pipeline
  2. See that the only one build step was run (second one with echo Test)
    Screenshot 2024-11-16 3

server-same-name-array.log
agent-same-name-array.log

Expected behavior

  • pipeline fails with error like step names must be unique
  • or pipeline runs both steps with the same name (build)

System Info

Woodpecker `next-75017ac7ca`, Gitea `1.22.3`, Postgres `16`, Kubernetes `v1.30.6+k3s1`

Additional context

#3411 (comment)
#3411 (comment)

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]

mkdir: can't create directory '/woodpecker/src/': Permission denied

The first pipeline on 2.7.1 works as second on next:

Screenshot 2024-11-17 1

The second pipeline on 2.7.1 works the same way as on next.