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

Get ExecGraph hosts #178

Merged
merged 5 commits into from
Nov 23, 2021
Merged

Get ExecGraph hosts #178

merged 5 commits into from
Nov 23, 2021

Conversation

csegarragonz
Copy link
Collaborator

@csegarragonz csegarragonz commented Nov 22, 2021

Add utility function to get the distinct hosts in an execution graph.

Also bump the code version to re-build the containers as required in #177

@csegarragonz csegarragonz self-assigned this Nov 22, 2021
@csegarragonz csegarragonz marked this pull request as ready for review November 22, 2021 11:27
@csegarragonz csegarragonz changed the title Count ExecGraph hosts Get ExecGraph hosts Nov 22, 2021
@@ -72,6 +72,25 @@ TEST_CASE("Test execution graph", "[scheduler][exec-graph]")
checkExecGraphEquality(expected, actual);
}

TEST_CASE("Test execution graph node count", "[scheduler][exec-graph]")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is very nitpicky but the API is about getting the unique host names from the graph, not the count.

I'd have thought this test would be called Test get unique hosts from exec graph, then the assertion at the end would look like:

std::set<std::string> expected = {"foo", "bar", "baz"};
REQUIRE(hosts == expected);

Currently the test also doesn't cover duplicates, it's got 3 messages each executed on a different host. It would be good to add another message for a different function but executed on the same host as one of the others to be extra sure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All good points, thanks.

src/scheduler/ExecGraph.cpp Outdated Show resolved Hide resolved
src/scheduler/ExecGraph.cpp Outdated Show resolved Hide resolved
@csegarragonz csegarragonz merged commit 818a808 into master Nov 23, 2021
@csegarragonz csegarragonz deleted the count-graph-hosts branch November 23, 2021 09:01
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