Add support for FUZZ_TARGET_BUILD_BUCKET_PATH (#663)#676
Conversation
|
/gcbrun |
|
/gcbrun |
|
/gcbrun |
|
/gcbrun |
|
/gcbrun |
|
/gcbrun |
2 similar comments
|
/gcbrun |
|
/gcbrun |
Dor1s
left a comment
There was a problem hiding this comment.
LGTM as it doesn't affect any production instances right now, but I guess we're going to discuss some stuff on Monday anyway
|
|
||
| return fuzz_target_build_bucket_path.replace('%TARGET%', fuzz_target) | ||
|
|
||
| raise BuildManagerException('No primary bucket path defined.') |
There was a problem hiding this comment.
nit: maybe move this to line 1105 with an inverted condition, and then carry on with the other code without an extra intent
There was a problem hiding this comment.
You mean like this?
release_build_bucket_path = environment.get_value('RELEASE_BUILD_BUCKET_PATH')
if release_build_bucket_path:
return release_build_bucket_path
fuzz_target_build_bucket_path = environment.get_value(
'FUZZ_TARGET_BUILD_BUCKET_PATH')
if not fuzz_target_build_bucket_path:
raise BuildManagerException('No primary bucket path defined.')
fuzz_target = environment.get_value('FUZZ_TARGET')
if not fuzz_target:
raise BuildManagerException('FUZZ_TARGET is not defined.')
return fuzz_target_build_bucket_path.replace('%TARGET%', fuzz_target)I feel like in this case avoiding the extra indents makes the logic a little less clear.
There was a problem hiding this comment.
Yeah, this looks more straightforward to me, but it's not a big deal, up to you :)
There was a problem hiding this comment.
I am ok with either (like current one slightly better since it give correlation for fuzz target branch). i just want BuildManagerException on more informative on RELEASE_BUILD_BUCKET_PATH and FUZZ_TARGET_BUILD_BUCKET_PATH
There was a problem hiding this comment.
could you clarify where more info could be added to the exception messages?
There was a problem hiding this comment.
I mean ". Please define RELEASE_BUILD_BUCKET_PATH or FUZZ_TARGET_BUILD_BUCKET_PATH in the job definition."
| if not bucket_paths_env_vars: | ||
| def _get_targets_list(bucket_path): | ||
| """Get the target list for a given bucket path.""" | ||
| targets_list_path = os.path.join( |
There was a problem hiding this comment.
The path here will be gs://bucket/subdir/targets.list, right? Would we want revision separation for this, maybe like:
gs://bucket/subdir/targets_list/(0-9)+.txt
?
I can't find a good reason to keep it right away, but feel hesitant not to preserve those targets.list files either. Let me comment on the doc as well, we can discuss on Monday, if you want.
There was a problem hiding this comment.
Will reply on the doc/tomorrow.
There was a problem hiding this comment.
Can you add more details to this function description or comment here.
| if system_binary: | ||
| return setup_system_binary() | ||
|
|
||
| fuzz_target_build_bucket_path = environment.get_value( |
There was a problem hiding this comment.
Was thinking if we could reuse get_primary_bucket_path here somehow, but don't see a way given that fuzz target is not chosen yet and the order of preference here is different.
There was a problem hiding this comment.
Yes, the use case is a little different here, so I don't think we can re-use it here.
|
|
||
| return fuzz_target_build_bucket_path.replace('%TARGET%', fuzz_target) | ||
|
|
||
| raise BuildManagerException('No primary bucket path defined.') |
There was a problem hiding this comment.
Yeah, this looks more straightforward to me, but it's not a big deal, up to you :)
inferno-chromium
left a comment
There was a problem hiding this comment.
Thanks a ton, once this is stable, please put the env var and short deascription in main documentation.
|
|
||
| return fuzz_target_build_bucket_path.replace('%TARGET%', fuzz_target) | ||
|
|
||
| raise BuildManagerException('No primary bucket path defined.') |
There was a problem hiding this comment.
I am ok with either (like current one slightly better since it give correlation for fuzz target branch). i just want BuildManagerException on more informative on RELEASE_BUILD_BUCKET_PATH and FUZZ_TARGET_BUILD_BUCKET_PATH
| if not bucket_paths_env_vars: | ||
| def _get_targets_list(bucket_path): | ||
| """Get the target list for a given bucket path.""" | ||
| targets_list_path = os.path.join( |
There was a problem hiding this comment.
Can you add more details to this function description or comment here.
| """Set up targets build.""" | ||
| targets_list = _get_targets_list(bucket_path) | ||
| if not targets_list: | ||
| raise BuildManagerException('No targets found') |
There was a problem hiding this comment.
in targets.list file ?
|
/gcbrun |
|
/gcbrun |
Add support for using
FUZZ_TARGET_BUILD_BUCKET_PATH, which is of the format:gs://bucket/subdir/%TARGET%/([0-9]+).zip.'%TARGET%with the actual target name. This is the only new behaviour, as the resulting bucket path can then be passed to RegularBuild to continue regular setup.Also add
build_manager.get_primary_bucket_path, so that regression/progression can list builds properly.Replace calls to
setup_regular_buildwithsetup_build.Also remove revision fixing in schedule_corpus_pruning_tasks. This was needed back when
we were merging sancovs, and is no longer needed.
Move fuzzer_selection.get_fuzz_target_weights() out of build_manager and into fuzz_task. This removes an undesired dependency where
get_fuzz_target_weightschecks what the current task is, and makes it easier to prevent calling it multiple times unnecessarily.Make
revision_pattern_from_build_bucket_pathless greedy to support zip filenames of the format([0-9]+).zip