-
Notifications
You must be signed in to change notification settings - Fork 5
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
Initial local UI+dsub docker compose #20
Conversation
@bfcrampton @alahwa FYI I'm going to need to do a bit more cleanup work and testing on this PR, but exported in case you want to patch and try it out. |
44065f4
to
a668836
Compare
46138de
to
19cae6a
Compare
Nice work! Rebased on new changes in master for playing around. |
19cae6a
to
2602408
Compare
2602408
to
71cbd13
Compare
71cbd13
to
fad986e
Compare
dbfff1c
to
3501148
Compare
ui/src/app/job-monitor.service.ts
Outdated
listAllJobs(): Promise<QueryJobsResponse> { | ||
return this.http.get(`${this.apiUrl}/jobs`, | ||
new RequestOptions({headers: this.headers})) | ||
listAllJobs(parentId?: string): Promise<JobQueryResponse> { |
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.
I think you accidentally reverted this, should still be QueryJobsResponse
.
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.
Right you are - unreverted.
Per offline discussion, also changed the API url to be |
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.
Two minor nits but otherwise looks good!
ui/src/app/job-monitor.service.ts
Outdated
@@ -8,14 +8,20 @@ import {QueryJobsResponse} from './model/QueryJobsResponse'; | |||
/** Service wrapper for accessing the job monitor API. */ | |||
@Injectable() | |||
export class JobMonitorService { | |||
private apiUrl = '/v1'; | |||
private apiUrl = '/api/v1'; |
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.
Could this be an env variable in docker-compose.yml
for the ui
service? Or, alternatively, use a shared env_file for both services.
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.
I wound up using the environment.ts
file. I didn't find an obvious standard way to plumb a flag through to the server. Seems like the normal thing is to load up a JSON file or something if you need server configuration. Didn't both consolidating the env var in docker-compose since I wouldn't be able to plumb it here anyways.
servers/dsub/jobs/__main__.py
Outdated
parser.add_argument( | ||
'--path_prefix', | ||
type=str, | ||
help='Path prefix, e.g. /api to serve from', |
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 update this help string to /api/v1
?
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, done.
👍 |
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.
Oops, didn't send my buffered comments.
ui/src/app/job-monitor.service.ts
Outdated
@@ -8,14 +8,20 @@ import {QueryJobsResponse} from './model/QueryJobsResponse'; | |||
/** Service wrapper for accessing the job monitor API. */ | |||
@Injectable() | |||
export class JobMonitorService { | |||
private apiUrl = '/v1'; | |||
private apiUrl = '/api/v1'; |
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.
I wound up using the environment.ts
file. I didn't find an obvious standard way to plumb a flag through to the server. Seems like the normal thing is to load up a JSON file or something if you need server configuration. Didn't both consolidating the env var in docker-compose since I wouldn't be able to plumb it here anyways.
3501148
to
b3dda78
Compare
c1b3514
to
b8fc896
Compare
@alahwa PTAL |
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.
Looks good, nice work!
b8fc896
to
2daf726
Compare
Resolves #18
/
and API requests on/api
body
parameter, which gets passed through to connexion (whereparameters
doesn't).