Skip to content

fix(servers): offer node templates when creating a server - #170

Merged
ericwang401 merged 4 commits into
4.xfrom
fix/create-server-templates
Sep 29, 2026
Merged

ericwang401 merged 4 commits into
4.xfrom
fix/create-server-templates

Conversation

@ericwang401

Copy link
Copy Markdown
Collaborator

Fixes #169: Create Server offered no templates after picking a node. Converts the node id before looking up template groups, adds Playwright with a regression test, and moves the 4.x CI onto the runner like main's. See the commits for details. This PR is the new workflow's first run.

The Create Server modal binds its node select to a string, and d45db5d made
useTemplateGroupsSWR skip any node id that is not a positive integer. The
check was meant to stop requests before a node is picked, but it rejected
'5' as well, so the template group list never loaded and no template could
be chosen. AddressesMultiSelectForm already converts with parseInt, which is
why only templates broke.

Convert with Number: '' becomes 0 and is still skipped, and a chosen node
now fetches.

Fixes #169
The frontend had no tests, which is how #169 shipped. This adds Playwright
and a first test that logs in as an admin, opens Create Server, picks a node
and checks its template group and template are offered. It fails on
v4.7.0-rc.1 and passes with the fix.

E2eSeeder provides the admin, node and templates the tests use. The node is
only a database row, so tests are limited to flows that never contact
Proxmox. Run it against a throwaway database: the tests expect
migrate:fresh.
Follow main: set up PHP and Node on the runner and use MySQL and Redis
service containers, rather than docker-compose.ci.yml and the unmaintained
performave/convoy-workspace image. Versions match what ddev runs for 4.x:
PHP 8.2, Node 20, MySQL 8.0.

The job now also seeds the panel with E2eSeeder, serves it on
127.0.0.1:8000 and runs the Playwright tests, uploading the report, traces
and Laravel logs when anything fails.

docker-compose.ci.yml has no other users, so it is removed along with its
entry in the release archive's exclude list.
.env.ci only differed from .env.example in its hosts, database password
and a committed APP_KEY. Copy .env.example, point it at the service
containers and generate a key per run instead, so there is one less env
file to keep in step with the other.

It stays a written file rather than job-level env vars: `php artisan
serve` does not pass its own environment to the app it serves, which the
Playwright step goes through.
@ericwang401 ericwang401 reopened this Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Contributor License Agreement

All identified human contributors have signed the current CLA.

Current CLA: https://github.com/ConvoyPanel/panel/blob/47c3288b4e4bf24666b78e76986970baa7b398db/CONTRIBUTOR_LICENSE_AGREEMENT

To sign, comment exactly:

I am at least 18 years old, I have read the Performave Individual Contributor License Agreement, and I electronically sign and agree to it.

This signature is only for individual contributors who are at least 18 years old. If your contribution is owned by a company, employer, client, school, or other legal entity, don't sign here. It needs separate written permission or a separate contributor agreement instead.

Missing signatures:

  • None

Commits without a linked GitHub author, requiring maintainer review:

  • None

If you already signed, comment recheck cla.

@ericwang401

Copy link
Copy Markdown
Collaborator Author

recheck cla

@ericwang401 ericwang401 reopened this Sep 29, 2026
@ericwang401
ericwang401 merged commit 5651bfe into 4.x Sep 29, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant