fix: ensure taskgraph full -J --tasks <regex> shows all dependencies#928
Open
ahal wants to merge 1 commit intotaskcluster:mainfrom
Open
fix: ensure taskgraph full -J --tasks <regex> shows all dependencies#928ahal wants to merge 1 commit intotaskcluster:mainfrom
taskgraph full -J --tasks <regex> shows all dependencies#928ahal wants to merge 1 commit intotaskcluster:mainfrom
Conversation
Overwriting `task.dependencies` with the graph edges doesn't play nicely with `get_filtered_taskgraph` (e.g `--tasks <regex>`) because in this case the full graph has already been trimmed. The result is that when using `--tasks`, the dependencies displayed will be a subset of the real dependencies. This is very misleading and can easily lead one to false conclusions while debugging. Recently this caused me to waste an hour of my time. I traced this comment back through history and it's been like this since it was originally implemented. Likely the intent was that if we a have a subset of the graph, then we should modify the task definition to not display any dependencies that aren't part of it. But I disagree with this. I'd argue that `Task.dependencies` is a very important part of the task definition, and not at all relevant to the higher level DAG that the task happens to be a part of. I believe mutating the task definition just because we did some filtering is a bug. Testing the full graph from the Firefox repo, I can confirm this change results in identical graphs (when not using `--tasks`).
b0f8186 to
4cc7091
Compare
Contributor
|
I've also had to spend some time figuring out why dependencies weren't showing up. Thanks for fixing it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overwriting
task.dependencieswith the graph edges doesn't play nicely withget_filtered_taskgraph(e.g--tasks <regex>) because in this case the full graph has already been trimmed. The result is that when using--tasks, the dependencies displayed will be a subset of the real dependencies. This is very misleading and can easily lead one to false conclusions while debugging. Recently this caused me to waste an hour of my time.I traced this comment back through history and it's been like this since it was originally implemented. Likely the intent was that if we a have a subset of the graph, then we should modify the task definition to not display any dependencies that aren't part of it.
But I disagree with this. I'd argue that
Task.dependenciesis a very important part of the task definition, and not at all relevant to the higher level DAG that the task happens to be a part of. I believe mutating the task definition just because we did some filtering is a bug.Testing the full graph from the Firefox repo, I can confirm this change results in identical graphs (when not using
--tasks).