Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup of tracing graph #9564

Merged
merged 3 commits into from
Aug 10, 2021
Merged

Cleanup of tracing graph #9564

merged 3 commits into from
Aug 10, 2021

Conversation

bramkragten
Copy link
Member

Proposed change

Some cleanup of the script tracing graph

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

M 0 ${SPACING + NODE_SIZE + 1}
L 0 0
V 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙄

.iconPath=${mdiAsterisk}
tabindex=${tracked ? "0" : "-1"}
tabindex=${track ? "0" : "-1"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe tabindex should actually be removed from the graphs entirely. I added it for accessibility, but in the current implementation it makes no sense and may actually be a hindrance.

I'll raise this as a wider issue somewhere.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that should probably be a separate PR

this.renderedNodes[path] = { config, path };
if (trace) {
if (this.trace && path in this.trace.trace) {
this.trackedNodes[path] = this.renderedNodes[path];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty much the only place (except the choose node) where trackedNodes is modified in a renderer...

Come to think of it, the choose node could probably be made to better recursively use render_node which would make render_condition the only special case for this. It may be worth trying to refactor this out as well and just use render_condition_node directly instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

render_node does the same right? Also adding nodes during rendering? I don't really see the benefit here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just thinking it's an almost unique side effect to modify trackedNodes here, which I think is cosidered a code smell?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... I think it is ok here...

if (trackPass && trackFailed) {
break;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@bramkragten bramkragten enabled auto-merge (squash) August 10, 2021 21:03
@bramkragten bramkragten merged commit f686816 into dev Aug 10, 2021
@delete-merged-branch delete-merged-branch bot deleted the tracing-cleanup branch August 10, 2021 23:23
@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants