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

Fix traffic graph #794

Merged
merged 2 commits into from
Aug 23, 2024
Merged

Fix traffic graph #794

merged 2 commits into from
Aug 23, 2024

Conversation

rgrandl
Copy link
Contributor

@rgrandl rgrandl commented Aug 21, 2024

After we introduced system components (weavelet control and deployment control), the traffic graph doesn't display anything in the weaver multi dashboard.

This is because when we display the graph, we look at the components of the application and then we try to match them to the traffic between them. However, the edges show traffic for components that are missing from the status (e.g., the system components). Hence, when we display the graph there is no 1:1 mapping between components and the traffic between them.

This PR fixes this issue by not displaying traffic for system components (in fact the user shouldn't care about that). Maybe a better fix would be to do this in the javascript itself, but we can do that in the future if needed.

After we introduced system components (weavelet control and deployment
control), the traffic graph doesn't display anything in the weaver multi
dashboard.

This is because when we display the graph, we look at the components
of the application and then we try to match them to the traffic between
them. However, the edges show traffic for components that are missing from the
status (e.g., the system components). Hence, when we display the graph
there is no 1:1 mapping between components and the traffic between
them.

This PR fixes this issue by not displaying traffic for system
components (in fact the user shouldn't care about that). Maybe a better
fix would be to do this in the javascript itself, but we can do that in
the future if needed.
@rgrandl rgrandl force-pushed the fix_multi_dashboard branch from 82bf51c to 604488a Compare August 23, 2024 17:31
@rgrandl rgrandl requested a review from mwhittaker August 23, 2024 17:51
@@ -165,7 +165,7 @@ func run(deployer string, args []string) (int, error) {
binary := "weaver-" + deployer
if _, err := exec.LookPath(binary); err != nil {
msg := fmt.Sprintf(`"weaver %s" is not a weaver command. See "weaver --help". If you're trying to invoke a custom deployer, the %q binary was not found. You may need to install the %q binary or add it to your PATH.`, deployer, binary, binary)
return 1, fmt.Errorf(wrap(msg, 80))
return 1, fmt.Errorf(wrap(msg, 80), "%s")
Copy link
Member

Choose a reason for hiding this comment

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

Sorry for not understanding, but what does the "%s" do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Should be fmt.Errorf("%s", wrap(msg, 80)). The linter complains if we don't specify the format.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, gotcha!

@rgrandl rgrandl force-pushed the fix_multi_dashboard branch from 8ffe799 to 4215989 Compare August 23, 2024 18:09
Copy link
Contributor Author

@rgrandl rgrandl left a comment

Choose a reason for hiding this comment

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

Thanks, Michael

@rgrandl rgrandl merged commit 3f55afa into main Aug 23, 2024
10 checks passed
@rgrandl rgrandl deleted the fix_multi_dashboard branch August 23, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants