New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 794505 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Consider always run selective PRESUBMIT check for auto-roller

Project Member Reported by nedngu...@google.com, Dec 13 2017

Issue description

As 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?


 
I think that the revert _did_ ran PRESUBMIT (it's there when you click on the link you posted).

That run of presubmit did not catch the error because it ran on bf837d509 + patch, where the presubmit tests do pass. However, between running the presubmit and landing, another CL (df4e6461e) also landed and the combination bf837d509 + df4e6461e + patch is what fails the presubmit.

Exactly *that* combination of CL's is what ran on the auto-roller here:
https://chromium-review.googlesource.com/c/chromium/src/+/822912

However the auto-roller does not run catapult's presubmit; I guess the question is whether it's possible/desirable to add that to the list of tests ran by the auto-roller.
Cc: borenet@chromium.org kbr@chromium.org
Summary: Consider always run selective PRESUBMIT check for auto-roller (was: Consider always run PRESUBMIT check for automatic revert)
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.
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

Comment 4 by aga...@chromium.org, Dec 13 2017

Components: -Infra>Codereview>Gerrit Infra>Client
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.
#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

Comment 6 by aga...@chromium.org, 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.
>  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.

Comment 8 by aga...@chromium.org, 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