woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.29k stars 369 forks source link

Getting error `Missing required param "pipelineId" ` when attempting to run workflows for Bitbucket repositories #4405

Open Michael-Purtill opened 3 hours ago

Michael-Purtill commented 3 hours ago

Component

server, agent, web-ui

Describe the bug

I'm using docker swarm with the latest tag for the woodpecker-server image, and the latest-alpine tag for the woodpecker-agent image. using a .woodpecker file does seem to allow woodpecker to notice it as a workflow. The exact stack file I'm using worked roughly 2.5 weeks ago. Upon running the pipeline, nothing happens, and checking the dev console gives the message Missing required param "pipelineId" The containers for both the server and agent print no logs when this happens.

Steps to reproduce

  1. Create a Docker Swarm stack using the provided stack file.
  2. Set it up to access a bitbucket workspace
  3. add a .woodpecker folder with some manual workflows to a repo
  4. run a pipeline on that repo on whichever branch you added the .woodpecker folder
  5. check the dev console for Missing required param "pipelineId" error

Expected behavior

Successfully find workflows and execute them

System Info

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

Here's the stack file:

services:
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:latest
    ports:
      - 8001:8000
    volumes:
      - woodpecker-server-data:/var/lib/woodpecker/
    env_file: woodpecker.env
    networks:
      - wpkr
    deploy:
      placement:
        constraints: [node.role == manager]
      replicas: 1
      update_config:
        parallelism: 2
        delay: 10s
      restart_policy:
        condition: on-failure
  woodpecker-agent:
    image: woodpeckerci/woodpecker-agent:latest-alpine
    command: agent
    depends_on:
      - woodpecker-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - woodpecker-agent-config:/etc/woodpecker
    env_file: woodpecker.env
    networks:
      - wpkr
    deploy:
      placement:
        constraints: [node.role == manager]
      replicas: 1
      update_config:
        parallelism: 2
        delay: 10s
      restart_policy:
        condition: any
volumes:
  woodpecker-server-data:
    driver: "local"
  woodpecker-agent-config:
    driver: "local"
networks:
  wpkr:
    external: true
    attachable: true

Additional context

No response

Validations

qwerty287 commented 3 hours ago

Looks like a UI issue. With "dev console", you mean the browser console? Can you get a more detailed error?

Michael-Purtill commented 3 hours ago

Looks like a UI issue. With "dev console", you mean the browser console? Can you get a more detailed error?

Yes, browser console. Unfortunately the entire content of the error is 'Error: Missing required param "pipelineId"'. It's coming from minified Javascript. It appears to be because the call to api/repos/<pipelinid>/pipelines is returning no data.

qwerty287 commented 3 hours ago

Can you please check the network console for this api key? How does the call exactly look like and what does it return?

Michael-Purtill commented 2 hours ago

Sure.

upon clicking 'Run Pipeline' and selecting my branch, then clicking 'run pipeline' in the modal, a POST request is made to:

http://<my-ip>:8001/api/repos/1/pipelines

with the payload {"branch":"master","variables":{}}

The response data is a completely empty body. Firefox displays it as No response data for this request

qwerty287 commented 2 hours ago

Interesting, I can reproduce this on ci.woodpecker-ci.org, but not in my local setup. Maybe @anbraten or @6543 can you check the logs? Just try to trigger a manual pipeline - that didn't work for me.