Repository navigation
fix(servers): offer node templates when creating a server - #170
Merged
Merged
Conversation
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.
Contributor License AgreementAll identified human contributors have signed the current CLA. Current CLA: https://github.com/ConvoyPanel/panel/blob/47c3288b4e4bf24666b78e76986970baa7b398db/CONTRIBUTOR_LICENSE_AGREEMENT To sign, comment exactly: 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:
Commits without a linked GitHub author, requiring maintainer review:
If you already signed, comment |
Collaborator
Author
|
recheck cla |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.