Recipes should have a command to say if a CL affects a recipe |
|||
Issue descriptionThe use case is the led_recipes_tester that I'm developing. It'd be very useful to be able to ask the recipe engine if a CL affects a given recipe. recipes already has the depgraph command, which means that the general information is already generated. It's a bit hard to consume at the moment though.
,
Jul 27
,
Jul 30
So I propose:
# input
{
"files": ["list", "of", "repo", "relative", "files"],
"recipes": ["list", "of", "recipes"]
}
# output
{
"recipes": ["list", "of", "affected", "recipes"],
"invalid_recipes": ["list", "of", "unknown", "recipes"],
"error": "string with error message, if any"
}
And it'll be invoked as:
./recipes.py analyze <input_json_path> <output_json_path>
SG?
,
Jul 30
SGTM I think it's possible that you'd want to be able to do this on dependent repos. Example is we want to see if a change in depot_tools would affect the chromium recipe, which is in build. I don't think that's too hard to do using this format, but just an FYI. Edward wants to use this same recipe for depot_tools, so that's a needed feature for him.
,
Aug 23
I'm going to take a stab at implementing this.
,
Sep 7
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/recipes-py/+/19f53cfa422c6b4aed11a29c415f801051e2bac5 commit 19f53cfa422c6b4aed11a29c415f801051e2bac5 Author: Stephen Martinis <martiniss@google.com> Date: Fri Sep 07 00:08:15 2018 Add the analyze command Bug: 868608 Change-Id: I826bc2f979eef3ec4696a201392932a08b8c8b0b Reviewed-on: https://chromium-review.googlesource.com/1188389 Commit-Queue: Stephen Martinis <martiniss@chromium.org> Reviewed-by: Robbie Iannucci <iannucci@chromium.org> [add] https://crrev.com/19f53cfa422c6b4aed11a29c415f801051e2bac5/recipe_engine/analyze.proto [modify] https://crrev.com/19f53cfa422c6b4aed11a29c415f801051e2bac5/recipes.py [add] https://crrev.com/19f53cfa422c6b4aed11a29c415f801051e2bac5/recipe_engine/unittests/analyze_test.py [add] https://crrev.com/19f53cfa422c6b4aed11a29c415f801051e2bac5/recipe_engine/analyze_pb2.py [add] https://crrev.com/19f53cfa422c6b4aed11a29c415f801051e2bac5/recipe_engine/analyze.py [add] https://crrev.com/19f53cfa422c6b4aed11a29c415f801051e2bac5/unittests/analyze_test.py
,
Sep 11
#6 implements this. |
|||
►
Sign in to add a comment |
|||
Comment 1 by martiniss@chromium.org
, Jul 27