local-prod-nginx: honor --port and accept 401 as hub readiness - #620
Merged
Conversation
Two fixes for 'npm run local-prod:nginx': - '--port N' now works like plain local-prod: the port is parsed via the shared local-prod-port.mjs and substituted into the generated nginx config (config/local-nginx.conf gains an NGINX_PORT placeholder, like DIST_PATH). - The hub readiness check no longer uses 'curl -f': with OIDC_CLIENT_ID set in the environment the hub enables auth and /health returns 401, so the -f check could never pass even though the hub was up. Any HTTP response now counts as ready, and the script logs when auth is enabled via the environment. Tests: scripts/local-prod-port.test.mjs covers the --port parity and the 401-tolerant readiness check. Docs updated in hub-client/README.md and scripts/README.md.
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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.
Motivation: running
npm run local-prod:nginxlocally with auth (OIDC_CLIENT_IDset in the shell, so the hub enables OIDC) stalled atHub health check failed after 10 attempts. With auth on,/healthrequires credentials and returns 401, so thecurl -freadiness check could never pass — even though the hub was up.--port Nnow works for the nginx variant, parsed via the sharedlocal-prod-port.mjsand substituted into the generated nginx config (NGINX_PORTplaceholder, likeDIST_PATH)scripts/local-prod-port.test.mjs; READMEs + hub-client changelog updated