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

refactor how jobs are logged in the project manager #3740

Merged
merged 4 commits into from
Aug 26, 2024
Merged

Conversation

johrstrom
Copy link
Contributor

refactor how jobs are logged in the project manager

Fixes #3707 by adding a module to take care of updating these log files. Of course this moves the log file location so it breaks current jobs which is fine because this is still beta.

Comment on lines +6 to +10
stored_job = existing_jobs.detect { |j| j.id == job.id && j.cluster == job.cluster }

if stored_job.nil?
new_jobs = (existing_jobs + [job.to_h]).map(&:to_h)
else
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like completed jobs are not being saved with clusters, which is causing there to be duplicate entries in the job log that appear to never load in the projects#show page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for checking! I thought there was something buggy here but couldn't quite put my finger on it.

Copy link
Contributor

@ashton22305 ashton22305 left a comment

Choose a reason for hiding this comment

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

LGTM!

@johrstrom johrstrom merged commit b8b9674 into master Aug 26, 2024
26 checks passed
@johrstrom johrstrom deleted the pm-job-logger branch August 26, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

associate job log with project, not launchers
3 participants