semaphoreui / semaphore

Modern UI and powerful API for Ansible, Terraform, OpenTofu, PowerShell and other DevOps tools.
https://semaphoreui.com
MIT License
10.57k stars 1.06k forks source link

Problem: header is always needed when using webhook #2274

Open SkipTam opened 2 months ago

SkipTam commented 2 months ago

Issue

Hi, So i have been trying out webhooks and I was trying to integrate it into Gitea.

  1. I created an integration with no auth
  2. Add an Alias on that integration
  3. Open the url in Firefox to test if task will be executed -> Task was not executed but no error message in Firefox (Like 404 etc.)
  4. Tried with curl if task will be executed -> Task was not executed. Docker compose logs state level=info msg="Receiving Integration from: level=info msg="1 integrations found for alias no task execution in log
  5. tried adding a new matcher on header for integration with key and 123456 -> This would not execute task
  6. tried adding a new matcher on header for integration with t and t -> This would execute task logs state
    level=info msg="Receiving Integration from: x.x.x.x"
    level=info msg="1 integrations found for alias x"
    level=info msg="Running integration 8"
    level=info msg="Task 9 added to queue"
    level=info msg="Set resource locker with TaskRunner 9"
    level=info msg="Task 9 removed from queue"

    I have tested this on 2 machines and 2 installations. Same phenomenon. I'm not sure what's going on. If you need any more information, please don't hesitate to contact me.

Impact

Web-Backend (APIs)

Installation method

Docker

Database

Postgres

Browser

Firefox

Semaphore Version

v2.10.22-e44910d-1721658561

Ansible Version

No response

Logs & errors

semaphore-1 | time="2024-08-12T16:41:04Z" level=info msg="Receiving Integration from: " semaphore-1 | time="2024-08-12T16:41:04Z" level=info msg="1 integrations found for alias nc1kqg0ttuz88gkx" semaphore-1 | time="2024-08-12T16:41:38Z" level=info msg="Receiving Integration from: " semaphore-1 | time="2024-08-12T16:41:38Z" level=info msg="1 integrations found for alias nc1kqg0ttuz88gkx

semaphore-1 | time="2024-08-12T16:42:38Z" level=info msg="Receiving Integration from: " semaphore-1 | time="2024-08-12T16:42:38Z" level=info msg="1 integrations found for alias nc1kqg0ttuz88gkx" semaphore-1 | time="2024-08-12T16:42:38Z" level=info msg="Running integration 8" semaphore-1 | time="2024-08-12T16:42:38Z" level=info msg="Task 9 added to queue" semaphore-1 | time="2024-08-12T16:42:41Z" level=info msg="Set resource locker with TaskRunner 9" semaphore-1 | time="2024-08-12T16:42:41Z" level=info msg="Task 9 removed from queue"

Manual installation - system information

none

Configuration

git repository task template with git repository

Additional information

No response

SkipTam commented 2 months ago

It can be "Solved" with using =! and adding random things. But i don't think that's intended.

h3po commented 2 months ago

I have a similar issue: when using Token auth method, the unused username field of the selected credential must be set, otherwise even the correct password/token is not accepted. Btw, the secret selection box is titled "Vault Password" which confused me for a long while until I realized this must be where the token is supposed to be selected.