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

Always stream job logs in gitlab pipeline #1288

Merged
merged 1 commit into from
Jan 14, 2021
Merged

Always stream job logs in gitlab pipeline #1288

merged 1 commit into from
Jan 14, 2021

Conversation

adcroft
Copy link
Collaborator

@adcroft adcroft commented Jan 13, 2021

  • When a batch job fails on the gitlab pipeline we used to see the job logs but we suspect this behavior changed a long time ago.
  • This commit intercepts an error from the sbatch command and causes the pipeline to fail only after streaming the log, which is the very next command after sbatch.
  • A test of the interception working as intended uses the notorious Revise framework #1283. This pipeline was failing without the logs being produced. With this cherry-picked commit the logs are now visible: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/jobs/59699 (GFDL-only).

- When a batch job fails we used to see the job logs but we suspect this
  behavior changed a long time ago. This commit intercepts an error from
  the sbatch command and causes the pipeline to fail only after streaming
  the log.
@adcroft adcroft requested a review from marshallward January 13, 2021 21:56
@adcroft
Copy link
Collaborator Author

adcroft commented Jan 13, 2021

Test (that should pass) is at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/11847

@marshallward marshallward merged commit 91b6a15 into mom-ocean:dev/gfdl Jan 14, 2021
@adcroft adcroft deleted the stream-log-on-fail branch March 2, 2021 19:50
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