-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pivotal ID #186578721: Allow to execute test jobs in cluster API #781
Conversation
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.
It's looking good, I only have one concern which is related to the private key in the repo
@@ -25,6 +25,8 @@ class ClusterOperations( | |||
private val sessionFunction: () -> Session, | |||
) { | |||
suspend fun triggerJob(jobSpec: JobSpec): Try<Job> { | |||
logger.info { "Triggering Job $jobSpec" } |
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.
👍
} | ||
} | ||
|
||
suspend fun runJob( |
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.
After looking at this improvement, I think we should probably call these methods triggerJobAsync
and triggerJobSync
just to make it super clear the difference between them. Another option would be adding Javadoc. WDYT?
@@ -0,0 +1,39 @@ | |||
-----BEGIN RSA PRIVATE KEY----- |
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 don't think it's a good idea to persist private keys in the repo
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.
is a dummy key required for itest to run
return clusterOperations.jobStatus(jobId) | ||
} | ||
|
||
data class JobSpecDto(val command: String, val queue: String, val megaBytes: Int) { |
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 the last parameter should be called memory
, ramSize
or even just ram
like in the Job class because megaBytes
is not very clear at communicating what the value is actually used for
} | ||
|
||
@PostMapping("/submit") | ||
suspend fun submitJob(@RequestBody job: JobSpecDto): Job { |
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 these endpoints will be super useful
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.
LGTM
https://www.pivotaltracker.com/story/show/186578721