-
Notifications
You must be signed in to change notification settings - Fork 111
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
[RSDK-507] Dependencies in service config #1518
[RSDK-507] Dependencies in service config #1518
Conversation
gonna switch myself out for @maximpertsov |
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.
Spoke with Kurt regarding some SLAM changes which would store camera components instead of the camera stream as was done previously. He is reverting some of those changes until SLAM has had a chance to discuss internally and will make required changes ourselves should we decide to go down that route.
Will re-review once new push is submitted.
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.
looks good - just one small question about a change in the order of some guard clauses
default: | ||
return nil, rdkutils.NewResourceNotFoundError(name) | ||
deps[camera.Named(sensor)] = cam |
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.
just to verify, should we still be adding a camera to deps here? it looks like this threw an error before
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.
NIT: oh i see, there's a new case
for a sensor that is supposed to be missing (gibberish
) - I think it's clearer to just to not add the camera to deps in the default case instead of having a specific case for not adding. i'll defer to slam team on this though since it's their test
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.
We will discuss it internally with the team but for now, don't want to hold back Kurt's PR since it is correctly updating the code with the current way we are testing.
Thanks for bring it to my attention though Maxim!
@@ -527,7 +529,7 @@ func TestGeneralNew(t *testing.T) { | |||
// Create slam service | |||
logger := golog.NewTestLogger(t) | |||
_, err := createSLAMService(t, attrCfg, logger, false, false) | |||
test.That(t, fmt.Sprint(err), test.ShouldContainSubstring, "error with slam service slam process:") | |||
test.That(t, fmt.Sprint(err), test.ShouldContainSubstring, "runtime slam service error: invalid slam algorithm \"test\"") |
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.
[q] is this error change due to a change in error logging from the switch to dependencies as i don't see it reflected in the slam code
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.
Yeah I think there was a bug in this test. The original test didnt have a valid camera so it skipped the runtimeServiceValidation check because of this line: https://github.com/viamrobotics/rdk/blob/main/services/slam/builtin/builtin.go#L195. So I added a valid camera and the test get caught because of the invalid algo now
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.
LGTM, one quick question but otherwise, change over looks smooth!
Note: merge base coverage results not available, comparing against closest 38fa524~1=(3aa621d) instead
|
Add implicit depends on to all services