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

We have jobs which are not run every week #246

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

theseal
Copy link
Contributor

@theseal theseal commented Jan 27, 2025

If the cleanup job removes output files from jobs run less then every week we get alert from the monitor.

If the cleanup job removes output files from jobs run less then every week we get
alert from the monitor.
Copy link
Member

@mickenordin mickenordin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mikaelfrykholm mikaelfrykholm left a comment

Choose a reason for hiding this comment

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

This looks scary and prone to errors.
# m h dom mon dow command
@yearly /usr/local/bin/scriptherder apa

❯ ./cleanup_scriptherder
 Traceback (most recent call last):
   File "/tmp/./cleanup_scriptherder", line 63, in <module>
     job_name = tokens[position].replace("-", "_")
                ~~~~~~^^^^^^^^^^
 IndexError: list index out of range

@theseal
Copy link
Contributor Author

theseal commented Jan 30, 2025

This looks scary and prone to errors.
I would agree if we were editing the crontab by our self but in this case it's puppet doing all the magic, consistency.

# m h dom mon dow command @yearly /usr/local/bin/scriptherder apa

❯ ./cleanup_scriptherder
 Traceback (most recent call last):
   File "/tmp/./cleanup_scriptherder", line 63, in <module>
     job_name = tokens[position].replace("-", "_")
                ~~~~~~^^^^^^^^^^
 IndexError: list index out of range

Can try to add some error handling so we don't crash but the only "bad" thing if this script doesn't match a requested scriptherder job is that might get a disk event after a while.

Copy link
Contributor

@mikaelfrykholm mikaelfrykholm left a comment

Choose a reason for hiding this comment

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

LGTM

@theseal theseal merged commit 04dd8d4 into main Feb 3, 2025
6 checks passed
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.

3 participants