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

Add/jobs clean nightly #183

Merged
merged 7 commits into from Mar 27, 2020
Merged

Add/jobs clean nightly #183

merged 7 commits into from Mar 27, 2020

Conversation

@vsoch
Copy link
Member

vsoch commented Mar 26, 2020

Description

This PR is a WIP to add a nightly run to test for expired jobs, and remove them. This will be run as a nightly task, and will push to master after checking over the list of jobs and only checking those that are expired, and of that set, it it does not return a successful response we remove it from the list. I am opening this with a trigger on PR so that I can test, and also am not allowing the push to master to happen. When the script seems to run okay I will remove the pull request trigger and then the exit code before push, and we will test fully for the first overnight run.

I will likely need to run this a few times to test and change, so do not consider it ready for review.

Signed-off-by: vsoch vsochat@stanford.edu
cc @usrse-maintainers

@vsoch vsoch force-pushed the add/jobs-clean-nightly branch from 00dbd25 to 2c79f4d Mar 26, 2020
vsoch added 2 commits Mar 26, 2020
this will be run as a nightly task, and will push to master
after checking over the list of jobs and only checking those that are
expired, and of that set, it it does not return a successful response
we remove it from the list. I am opening this with a trigger on PR so
that I can test, and also am not allowing the push to master to happen.
When the script seems to run okay I will remove the pull request trigger
and then the exit code before push, and we will test fully for the first
overnight run.

Signed-off-by: vsoch <vsochat@stanford.edu>
Signed-off-by: vsoch <vsochat@stanford.edu>
@vsoch vsoch force-pushed the add/jobs-clean-nightly branch from 2c79f4d to a34126f Mar 26, 2020
vsoch added 3 commits Mar 26, 2020
Signed-off-by: vsoch <vsochat@stanford.edu>
Signed-off-by: vsoch <vsochat@stanford.edu>
more appropriate, remove exit code 0 before push, and to remove PR trigger

Signed-off-by: vsoch <vsochat@stanford.edu>
@vsoch

This comment has been minimized.

Copy link
Member Author

vsoch commented Mar 26, 2020

okay, I've just removed the exit before push and trigger on PR, and here is the previous run for others to see https://github.com/USRSE/usrse.github.io/pull/183/checks?check_run_id=537201915 please see the section "install dependencies and run script" of "clean-jobs." When this runs overnight it won't run the urlchecker.yml alongside it, but it does use the action after the new script is generated. Also note that it uses the same exact function to check/retry checking urls as the action, so we are consistent. I'm also renaming that step so it's more clear to look there to rename jobs. See line https://github.com/USRSE/usrse.github.io/pull/183/files#diff-b5500c14d3568dce69acae665b4051c8R16.

scripts/clean_jobs.py Outdated Show resolved Hide resolved
def read_jobs(filepath):
"""read in the jobs data.
"""
# Read in the entire membership counts

This comment has been minimized.

Copy link
@danielskatz

danielskatz Mar 27, 2020

Collaborator

membership counts?

This comment has been minimized.

Copy link
@vsoch

vsoch Mar 27, 2020

Author Member

You got me! I was adopting the previous function from update membership counts. Fixing right away!

scripts/clean_jobs.py Outdated Show resolved Hide resolved
@danielskatz

This comment has been minimized.

Copy link
Collaborator

danielskatz commented Mar 27, 2020

I think this looks good, with the exception of some documentation issues, one typo and two things that look like they were copied from another program and not changes for this purpose.

@vsoch

This comment has been minimized.

Copy link
Member Author

vsoch commented Mar 27, 2020

Yes that's absolutely correct - I started with a similar file and changed most of it (but missed a few of the docstrings!) pushing a fix right away.

Signed-off-by: vsoch <vsochat@stanford.edu>
@vsoch

This comment has been minimized.

Copy link
Member Author

vsoch commented Mar 27, 2020

All set @danielskatz.

@vsoch

This comment has been minimized.

Copy link
Member Author

vsoch commented Mar 27, 2020

looks like @cosden renamed https://us-rse.org/2020-april-workshop to https://us-rse.org/2020-oct-workshop (and this is expected to change again!) I'll fix it here for now so the link isn't dead, and then the next fix will need to be in #184.

…o october

Signed-off-by: vsoch <vsochat@stanford.edu>
@danielskatz

This comment has been minimized.

Copy link
Collaborator

danielskatz commented Mar 27, 2020

looks good - go ahead and merge, then we'll see how it works in practice going forward

@vsoch

This comment has been minimized.

Copy link
Member Author

vsoch commented Mar 27, 2020

Great! Yes, I will be watching this, and promptly respond if anything needs attention.

@vsoch vsoch merged commit 5f16748 into master Mar 27, 2020
2 checks passed
2 checks passed
urlcheck
Details
ci/circleci: build-site Your tests passed on CircleCI!
Details
@vsoch vsoch deleted the add/jobs-clean-nightly branch Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.