semaphoreui / semaphore

Modern UI for Ansible, Terraform, OpenTofu, Bash, Pulumi.
https://semaphoreui.com
MIT License
10.24k stars 1.04k forks source link

Problem: API /project/1/templates/ fails with Postgres #2221

Open UNiXMIT opened 1 month ago

UNiXMIT commented 1 month ago

Issue

I have set up a new instance, so I can start using Postgres instead of BoltDB. I create a new template and I can see it in Postgres. BUT the API endpoint /project/1/templates/ fails to return anything but gives a 200 return code. /project/1/templates/1 works OK and returns the template. Am I missing something? Because /project/1/templates/ fails, I cannot see any templates in the UI.

Impact

Web-Frontend (what users interact with), Web-Backend (APIs)

Installation method

Docker

Database

Postgres

Browser

Firefox

Semaphore Version

v2.10.20

Ansible Version

No response

Logs & errors

No response

Manual installation - system information

No response

Configuration

No response

Additional information

No response

UNiXMIT commented 1 month ago

If I navigate to the template using the direct url (i.e.https://example.com/project/1/views/2/templates/1) and run the task once, that template then appears in the UI but I don't want to have to run every single template once to have them appear in the UI.

UNiXMIT commented 1 month ago

As a workaround, I created a SQL script to loop through n times and create a fake task for each template. Now they all appear in the UI