-
Notifications
You must be signed in to change notification settings - Fork 342
Automatically clean up book metadata #976
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
Conversation
@olksdr could you have a look at this one please? |
lib/ES/BranchTracker.pm
Outdated
# tell if it'll be needed again. It is a problem, but not a big one | ||
# right now. | ||
unless ($allowed_for_repo->{$branch} || $branch =~ /^link-check/) { | ||
say "Pruning for $repo $branch"; |
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.
This is leftover debugging info and I'll remove before committing.
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.
LGTM
lib/ES/BranchTracker.pm
Outdated
delete $branches->{$branch}; | ||
} | ||
} | ||
# Empty can show up because there is a new book that weren't not |
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.
I think one not
too many here -> book that weren't not
Thanks for reviewing @olksdr ! |
We keep information about which branches contribute to which books but
before this change we didn't automatically remove the metadata when
a branch is no longer involved in building a book we never cleared that
metadata. For the most part this just left lines in a YAML file that
aren't used except when we remove a branch from a book and then re-add
it. In that case since we only use the branch data to figure out if we
should rebuild a book we wouldn't start to build the book when it is
added back unless the branch that it is built from changes. This happened
to us recently so it makes sense to clean up these files automatically
so it never happens again.
Closes #973