From 0908342fbf6efad777d1c6b93bc6abd7b8d8cc18 Mon Sep 17 00:00:00 2001 From: tan Date: Mon, 17 Nov 2025 10:41:49 +0530 Subject: [PATCH] fix(test,doc): port env name change Follow up from https://github.com/JuliaComputing/JuliaHub.jl/pull/113. That actually still had an issue, wherein the fallback was expecting a PORT env to be set, which would not be available in v2 environment. --- docs/src/guides/jobs.md | 2 +- test/jobenvs/job-exposed-port/server.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/guides/jobs.md b/docs/src/guides/jobs.md index 56fdd147a..4a5c9df9f 100644 --- a/docs/src/guides/jobs.md +++ b/docs/src/guides/jobs.md @@ -255,7 +255,7 @@ job = JuliaHub.submit_job( using Oxygen, HTTP # Environment variable name `PORT` was used in older JuliaHub environments # and has been replaced with `JULIAHUB_APP_PORT` in newer environments - PORT = parse(Int, get(ENV, "JULIAHUB_APP_PORT", ENV["PORT"])) + PORT = parse(Int, get(ENV, "JULIAHUB_APP_PORT", get(ENV, "PORT", ""))) @get "/" function(req::HTTP.Request) return "success" end diff --git a/test/jobenvs/job-exposed-port/server.jl b/test/jobenvs/job-exposed-port/server.jl index 6c0186594..7ac9aad33 100644 --- a/test/jobenvs/job-exposed-port/server.jl +++ b/test/jobenvs/job-exposed-port/server.jl @@ -2,7 +2,7 @@ using Oxygen, HTTP # Environment variable name `PORT` was used in older JuliaHub environments # and has been replaced with `JULIAHUB_APP_PORT` in newer environments -const PORT = parse(Int, get(ENV, "JULIAHUB_APP_PORT", ENV["PORT"])) +const PORT = parse(Int, get(ENV, "JULIAHUB_APP_PORT", get(ENV, "PORT", ""))) const NREQUESTS = Ref{Int}(0) function results_json()