Skip to content
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 # 186609885: Access cluster logs admin API #797

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

Juan-EBI
Copy link
Contributor

Copy link
Contributor

@jhoanmanuelms jhoanmanuelms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -34,6 +37,10 @@ class LocalClusterClient : ClusterClient {
return if (process.isAlive) "RUNNING" else "DONE"
}

override suspend fun jobLogs(jobId: String): String {
return jobLogs.getValue(jobId.toLong()).readText()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just curious, why do you use getValue instead of jobLogs[jobId.toLong()] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nullable vs not nullable

@@ -49,6 +49,13 @@ class RemoteClusterClient(
}
}

override suspend fun jobLogs(jobId: String): String {
return runInSession {
val (_, response) = executeCommand("cat $logsPath/${jobId}_OUT")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And there we were, thinking about datamovers and separate jobs 🤣

Well done man 👌

@Juan-EBI Juan-EBI merged commit 0df444e into master Jan 14, 2024
1 check passed
@Juan-EBI Juan-EBI deleted the feature/pivotal-186609885 branch January 14, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants