-
Notifications
You must be signed in to change notification settings - Fork 18
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
Move merged PR job directories to trash_bin_dir
#271
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a look at the PR. Looks good overall. Some small suggestions here and there. I wonder if we would want to keep the cleanup_pr.sh
script. It might allow us to clean up manually. We could remove it later if the whole auto-cleanup works smoothly.
Feature/disk cleanup
Co-authored-by: Thomas Röblitz <[email protected]>
Co-authored-by: Thomas Röblitz <[email protected]>
Feature/disk cleanup
Actions are 'closed', not 'merged'
Properly read from config
true -> True
…si-bot-software-layer into feature/disk_cleanup
Feature/disk cleanup
merged is a Bool (?)
Better formatting for merge conflict errors
Also move pr event dirs
Use shutil.copy2 and os.remove instead
Feature/disk cleanup
copytree with dirs_exist_ok True
As it stands now the bot will:
I think this is ready for review. I have two questions to look into as part of the review:
|
trash_bin_dir
trash_bin_dir
- putting configuration settings into a single section - using shutil.move instead of shutil.copy (move should fallback to copy if moving is not doable)
Looked at the PR and tested it. Added a few suggestions in Neves-P#2 While the suggested changes will break some symbolic links (we can look at fixing these later), they should make the procedure efficient by only moving data around (and only fallback to copying if moving wouldn't work). |
Tweak cleanup procedure
add empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks @Neves-P !
This PR adds a handler function for merged PRs that then moves the job directories into a
trash_bin_dir
, the location of which can be set via the config.At the moment there is no scripting or automation to delete the contents of
trash_bin_dir
, this functionality will follow later.The next step is testing the current implementation on a bot instance not running in
software.eessi.io
:trash_bin_root_dir
and have the correct subdirectory structure that makestrash_bin_dir
.Most likely the
config
files need to be adjusted and things are likely to fail as the new additions have not run within the context of a bot instance. I will do so on Hábrók in Groningen and will report back on progress here.