Repository navigation
feat(decision): make the artifact directory configurable - #1118
jcarterbohan wants to merge 1 commit into
Conversation
bhearsum
left a comment
There was a problem hiding this comment.
Do you have some context as to the motivation behind adding this? Is there an open issue or bug that this is related to? I'm not seeing any way for this to get used, unless there's callers outside of taskgraph that specifically use these functions, and I'm not aware of any.
(It's not necessarily a bad change, but I'd also prefer not to add new code that has no known use case...)
|
My bad for not giving more detail on this. I’m working on a Gecko patch for bug 1935412 to reuse standalone Taskgraph’s decision helpers. The first Gecko caller would be Firefox CI already symlinks |
bhearsum
left a comment
There was a problem hiding this comment.
Thanks for the explainer! One small thing to change, but otherwise looks good to me.
| if not os.path.isdir(ARTIFACTS_DIR): | ||
| os.mkdir(ARTIFACTS_DIR) | ||
| path = ARTIFACTS_DIR / filename | ||
| directory = ARTIFACTS_DIR if artifact_dir is None else Path(artifact_dir) |
There was a problem hiding this comment.
Let's have artifact_dir passed in as a Path rather than converted here; that way both of the possible sources of it are consistent.
(And please do the same for the other functions.)
Add an optional
artifact_dirargument to the artifact read, write, and rename helpers so callers can choose where artifacts are stored. The default isartifacts/. This also fixes YAML reads from relative directories.This is part of the effort to merge decision task logic between standalone Taskgraph and Gecko.
Tested locally with 31 decision and action tests. Ruff passed.