Consider always run selective PRESUBMIT check for auto-roller |
|||
Issue descriptionAs revert do not run PRESUBMIT check, we occasionally slip in badly broken CL. e.g: revert https://chromium-review.googlesource.com/c/catapult/+/822340 cause an import error for later CLs. Should we consider always run PRESUBMIT for automatic revert?
,
Dec 13 2017
Oh, I misunderstood the situation. Update the title +kbr@: we also want this for gpu test. We have a grossed work around by running pylint directly in gpu's unittest suite.
,
Dec 13 2017
One way I think we can implement this: add EXTRA_PRESUBMIT=path_to_presubmit_1;path_to_presubmit_2.. in the CL description. Change presubmit_support to recognize this & run the extra presubmits. Then for catapult roll, we add: EXTRA_PRESUBMIT=//tools/perf/PRESUBMIT.py;//content/test/gpu/PRESUBMIT.py
,
Dec 13 2017
Your PRESUBMIT.py file can have arbitrary logic in it. No need to add new tags to the commit message and a bunch of extra parsing and handling to presubmit in general, just add the logic to your presubmits themselves.
,
Dec 13 2017
#4: What is the right way to trigger PRESUBMIT in other directories from our presubmit? In this case, deps roll CL only touch src/DEPS file and we want to trigger PRESUBMIT in tools/perf/ & content/test/gpu/PRESUBMIT.py
,
Dec 13 2017
Ah, I see. That actually does seem like something that presubmit_support should just do automatically. When a DEPS file is modified, it should list all directories whose pin is changed as "modified files" and run all PRESUBMIT files above them.
,
Dec 13 2017
> When a DEPS file is modified, it should list all directories whose pin is changed as "modified files" and run all PRESUBMIT files above them. I am not sure I understand. tools/perf/ & content/test/gpu/ both depends on third_party/catapult. This relationship must be hardcoded somewhere for presubmit_support to know to run PRESUBMIT in those directories, right? I was proposing that we put this in catapult roll cl description. Another way is we can put this in DEPS file.
,
Dec 13 2017
Oh sorry, I was skipping ahead in my mind. Thing that we should do automatically: If a DEPS file is changed, touching the entry for "foo/bar/baz", then any PRESUBMIT files in "foo/" and "foo/bar/" should be run, just like if baz were a normal file that had been modified. But I see why that won't help in this case and should be tracked elsewhere. @dirk this is why we need presubmit and tests based off of GN (or bazel :P) targets, not based off of directory trees. |
|||
►
Sign in to add a comment |
|||
Comment 1 by perezju@chromium.org
, Dec 13 2017