Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start pipeline on CI agent with "complicated" label filter #3571

Open
3 tasks done
rockdrilla opened this issue Mar 29, 2024 · 1 comment
Open
3 tasks done
Labels
bug Something isn't working

Comments

@rockdrilla
Copy link
Contributor

Component

server, agent

Describe the bug

I'm trying to setup CI agent with several labels but I suppose that filter accounts only last value for each label.

E.g. if WOODPECKER_FILTER_LABELS is set to test_selector=a,test_selector=b then only last part is in effect.

NB: "dedicated" CI agent (with WOODPECKER_FILTER_LABELS=test_selector=a) was shutdown before git push

"offending" pipeline commit: here
pending pipeline: here

simplified .woodpecker.yml

when:
  event: [ push, tag, manual ]

steps:

  - name: env
    image: docker.io/library/debian:bookworm-slim
    commands:
      - cat /proc/self/environ | sort -zuV | xargs -0 -r -n 1 printf '%q\n'

labels:
  test_selector: a

simplified docker-compose.yml

services:

  woodpecker:
    image: docker.io/woodpeckerci/woodpecker-server:v2.4.1
    environment:
      WOODPECKER_HOST: https://ci.krd.sh
      WOODPECKER_GITEA: "true"
      WOODPECKER_GITEA_URL: https://git.krd.sh

  woodpecker-agent-test-a:
    image: docker.io/woodpeckerci/woodpecker-agent:v2.4.1
    environment:
      WOODPECKER_SERVER: ci.krd.sh:9000
      WOODPECKER_FILTER_LABELS: "test_selector=a"

  woodpecker-agent-test-b:
    image: docker.io/woodpeckerci/woodpecker-agent:v2.4.1
    environment:
      WOODPECKER_SERVER: ci.krd.sh:9000
      WOODPECKER_FILTER_LABELS: "test_selector=b"

  woodpecker-agent-test-ab:
    image: docker.io/woodpeckerci/woodpecker-agent:v2.4.1
    environment:
      WOODPECKER_SERVER: ci.krd.sh:9000
      WOODPECKER_FILTER_LABELS: "test_selector=a,test_selector=b"

Probably, this issue relates to #2634 and #3483

System Info

https://ci.krd.sh/version

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"2.4.1"}

Additional context

No response

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]
@rockdrilla rockdrilla added the bug Something isn't working label Mar 29, 2024
@rockdrilla
Copy link
Contributor Author

Also, if I set label to "second" value then pipeline runs fine.

commit: here
pipeline: here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant