Skip to content

ci: give the sasjs server the port it polls - #1501

Closed
sasjs-dev[bot] wants to merge 1 commit into
mainfrom
ci/server-listener
Closed

sasjs-dev[bot] wants to merge 1 commit into
mainfrom
ci/server-listener

Conversation

@sasjs-dev

@sasjs-dev sasjs-dev Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Issue

sasjs/server 3.0.0 was released on 2026-10-26 23:35 UTC. This workflow downloads https://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:

[error] Invalid environment variable(s) provided:
- no listener is enabled
 - set HTTP_PORT and/or HTTPS_PORT (either may be used alone)

Intent

Give the server the port the wait step already polls.

Implementation

echo "HTTP_PORT=5000" >> .env in the "Create .env file for sasjs/server" step, next to the other server settings. The wait step polls http://localhost:5000/SASjsApi/info, so 5000 is the port it must have.

Evidence it is not a product change

Checks

  • CI green on this PR - that is the check, since the change is to the job itself.

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.

@sasjs-dev sasjs-dev Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sasjs-dev

sasjs-dev Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favour of #1500, where this is folded in at the maintainer's request - one PR for the work, and #1500 needs it to get past the server step.

The change is identical (3 lines in run-tests.yml), cherry-picked there as 20b4542.

@sasjs-dev sasjs-dev Bot closed this Oct 27, 2026
@github-actions

Copy link
Copy Markdown

Coverage report

Total coverage

Status Category Percentage Covered / Total
🟡 Statements 78.88% 4617/5853
🟡 Branches 67.53% 2001/2963
🟡 Functions 78.13% 900/1152
🟢 Lines 86.22% 10954/12704

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Show files with reduced coverage 🔻

Reduced coverage

Status Filename Statements Branches Functions Lines
🟢 src/commands/compile/compileSingleFile.ts 95.83% (-2.08% 🔻) 84% (-4% 🔻) 100% 100%

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Report generated by 🧪jest coverage report action from db40938

@sasjs-dev
sasjs-dev Bot deleted the ci/server-listener branch October 27, 2026 12:05
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.

0 participants