-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add interface to expose HTTP ports on batch jobs #52
Conversation
method::AbstractString, | ||
uripath::AbstractString, | ||
body::Any = UInt8[]; | ||
auth::Authentication=__auth__(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we allow for ::Nothing
or similar here as well? To allow for "anonymous" access, basically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, we should only do that once we have the API to submit jobs that allow for anonymous access, otherwise it's not really consistent between the two functions. I like the API idea itself though (i.e. using nothing
for that).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the function is a very thin wrapper around HTTP.request
. So if you do want to make unauthenticated requests, you can just get the hostname from job.hostname
and call HTTP.request
yourself.
The exact API is still WIP, and needs tests and more docs, but adds two functions right now:
First, an
expose
argument toJuliaHub.submit_job
, that allows you to specify that a port from the job container should be exposed, e.g.:It also adds a
JuliaHub.request
function that takes aJuliaHub.Job
as an argument and constructs aHTTP.request
(pretty much a wrapper aroundHTTP.request
; close #14):