Repository navigation
ci: give the sasjs server the port it polls - #1501
sasjs-dev[bot] wants to merge 1 commit into
Conversation
sasjs/server 3.0.0 (released 2026-10-26) refuses to start when neither `HTTP_PORT` nor `HTTPS_PORT` is set: ``` [error] Invalid environment variable(s) provided: - no listener is enabled - set HTTP_PORT and/or HTTPS_PORT (either may be used alone) ``` The job downloads `releases/latest/download/linux.zip`, so every pull request opened since that release picks it up and fails at "Wait for sasjs server to be ready" - the step polls port 5000, so that is the port the server gets. Unrelated to any product change: the last green run of this workflow (2026-10-26 10:45) predates the release.
There was a problem hiding this comment.
Reviewed the full base...head diff: one CI change, adding HTTP_PORT=5000 to the sasjs/server .env. The value matches both the readiness poll (http://localhost:5000/SASjsApi/info) and the SASJS_SERVER_URL/SAS9_SERVER_URL used by the server tests, so the port wiring is consistent end to end; no other files touched, and ci: is the right release-driving type for a workflow-only change.
.github/workflows/run-tests.yml:111 - no completed check runs were reported at the reviewed head, so this fix is unverified by CI here. Confirm the server step actually starts and passes before merging, since the whole point of the change is that the server cannot start without a listener.
No blocking issues.
Coverage reportTotal coverage
Show files with reduced coverage 🔻Reduced coverage
Report generated by 🧪jest coverage report action from db40938 |
Issue
sasjs/server3.0.0 was released on 2026-10-26 23:35 UTC. This workflow downloadshttps://github.com/sasjs/server/releases/latest/download/linux.zip, so every pull request opened since then fails at "Wait for sasjs server to be ready".The server says why, in the log this job prints when the wait expires:
Intent
Give the server the port the wait step already polls.
Implementation
echo "HTTP_PORT=5000" >> .envin the "Create .env file for sasjs/server" step, next to the other server settings. The wait step pollshttp://localhost:5000/SASjsApi/info, so 5000 is the port it must have.Evidence it is not a product change
Checks