-
Notifications
You must be signed in to change notification settings - Fork 245
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
Script to mass-update bot cache in all issues #2165
Conversation
A new Pull Request was created by @iarspider for branch master. @smuzaffar, @iarspider, @cmsbuild, @aandvalenzuela can you please review it and eventually sign? Thanks. |
cms-bot internal usage |
@iarspider , can you please automatically process all
|
mass-update-cache.py
Outdated
|
||
cnt = 0 | ||
|
||
for issue in repo.get_issues(): |
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.
why process all issues? I would suggest to only process PRsand sort the PRs for updated
(https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests)
mass-update-cache.py
Outdated
bot_cache = load_bot_cache_local(comment_msg) | ||
print(" Read bot cache from technical comment:", comment) | ||
break | ||
if bot_cache and ("commits" not in bot_cache): |
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 guess we would like to stop if there is no bot cache ... right? We do not want to process over 40K PRs , we only want to process those PRs where we have old bot cache
mass-update-cache.py
Outdated
file=f, | ||
) | ||
|
||
api_rate_limits(gh) |
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.
move it under the for loop i.e. call it for every PR you process.
Pull request #2165 was updated. |
@iarspider , looks good. I would suggest to add |
|
Pull request #2165 was updated. |
In total, there are 6 PRs (all in cms-data) that need cache update. |
can you please report those 6 PRs here? |
cms-data PRs list looks good. what about cms-sw/cmsdist ? |
Pull request #2165 was updated. |
I think the reason some PRs were missed is the following: for repos other than cms-sw/cmssw, code-check is not ran, so already-seen comment is created immediately, before the technical comment. But cache is still correctly stored in technical comment, because already-seen comment didn't exist when the |
@smuzaffar for a single-use script, I see no reason to merge it. I will create and run Jenkins job after you review this.