-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[infra] Dont upload a build status for all projects #5609
base: master
Are you sure you want to change the base?
Conversation
Projects that are deleted/disabled/incomplete should not get them. Fixes #5608
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.
Thanks! Code looks great, could I ask a quick question I was wondering when looking at the code?
Eventually history
will be None for projects when we process them and we'll just skip them, so this fixes when there's some historical builds but now the project is deleted/incomplete/etc? I like your solution more than removing history if not project_should_build
.
Exactly. |
@@ -39,6 +41,9 @@ | |||
|
|||
FUZZING_STATUS_FILENAME = 'status.json' | |||
COVERAGE_STATUS_FILENAME = 'status-coverage.json' | |||
PROJECTS_DIR = os.path.normpath( |
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 won't work unfortunately, because this is not run as part of an OSS-Fuzz checkout.
Instead, what we can do to fix this here is to do a datastore query for the Project entity:
Project(name=project_name, |
If it does not exist, then don't upload.
These entities are already being deleted when a project is deleted, but not when it's disabled:
delete_project(cloud_scheduler_client, project) |
Probably need to change something around here to check for the disabled attribute:
def get_projects(repo): |
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.
request changes as per last review.
Projects that are deleted/disabled/incomplete should not get them.
Fixes #5608