-
Notifications
You must be signed in to change notification settings - Fork 247
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
Fix traffic graph #794
Conversation
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.
82bf51c
to
604488a
Compare
cmd/weaver/main.go
Outdated
@@ -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") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, gotcha!
8ffe799
to
4215989
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Michael
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.