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

[RSDK-8294] Use Global Connection to App in Internal Cloud Service and Local Robot #4782

Merged
merged 37 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c6a7cb3
only acquire connection if connection is nil but cloud config is defined
bashar-515 Feb 13, 2025
4484f8d
use nil conns in functions that call New() and newWithResources()
bashar-515 Feb 13, 2025
fe83e57
pass conn in local robot
bashar-515 Feb 13, 2025
da298d8
pass nil as connection in RobotFromConfigPath()
bashar-515 Feb 13, 2025
cfde0c8
create global app connection in example server
bashar-515 Feb 13, 2025
7ff0029
pass nil connection in tests
bashar-515 Feb 13, 2025
2ec5c6a
add comment
bashar-515 Feb 13, 2025
b08f684
provide global app connection to cloud service
bashar-515 Feb 13, 2025
090edd1
update service tests
bashar-515 Feb 13, 2025
73038c8
only close connection if not nil
bashar-515 Feb 13, 2025
82ffad8
pass nil connection
bashar-515 Feb 13, 2025
81c7e45
lint
bashar-515 Feb 13, 2025
73facf7
change connection expectations
bashar-515 Feb 14, 2025
ec1aecc
pass actual connection in test
bashar-515 Feb 14, 2025
bcaea48
remove TODO comments
bashar-515 Feb 14, 2025
0f75a6e
pass nil connection
bashar-515 Feb 14, 2025
ed75da4
no longer close connection
bashar-515 Feb 14, 2025
1201c72
no longer track shared connection
bashar-515 Feb 14, 2025
c44a5a8
expect no managed error
bashar-515 Feb 14, 2025
6c57c86
handle app connection internally
bashar-515 Feb 14, 2025
ad4b3e1
lint
bashar-515 Feb 14, 2025
b8df4aa
fix bug
bashar-515 Feb 14, 2025
f2b1c6f
update service tests
bashar-515 Feb 14, 2025
13e8ee3
only close connection if it is not nil
bashar-515 Feb 14, 2025
2e2cd6e
manage app connection
bashar-515 Feb 14, 2025
9124464
create auth connection
bashar-515 Feb 14, 2025
d94aa1b
make changes to cloudmanaged test
bashar-515 Feb 14, 2025
f45cf7c
lint
bashar-515 Feb 18, 2025
fe7ea97
early return on error
bashar-515 Feb 18, 2025
827e743
check conn2 instead of conn1
bashar-515 Feb 18, 2025
2aae7df
clean up echoclient tests
bashar-515 Feb 18, 2025
6ad3d96
lint
bashar-515 Feb 18, 2025
0d38c61
document behavior of AcquireConnection()
bashar-515 Feb 18, 2025
c3e8c39
remove TODO comment
bashar-515 Feb 18, 2025
3377d59
check for ErrNotConnected
bashar-515 Feb 18, 2025
26c9c6b
lint
bashar-515 Feb 18, 2025
962b21a
modify auth tests
bashar-515 Feb 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func setupWithRunningPart(
Model: resource.DefaultServiceModel,
},
},
}, logging.NewInMemoryLogger(t))
}, nil, logging.NewInMemoryLogger(t))
test.That(t, err, test.ShouldBeNil)

options, _, addr := robottestutils.CreateBaseOptionsAndListener(t)
Expand Down
4 changes: 2 additions & 2 deletions components/camera/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ func setupRealRobot(
t.Helper()

ctx := context.Background()
robot, err := robotimpl.RobotFromConfig(ctx, robotConfig, logger)
robot, err := robotimpl.RobotFromConfig(ctx, robotConfig, nil, logger)
test.That(t, err, test.ShouldBeNil)

// We initialize with a stream config such that the stream server is capable of creating video stream and
Expand All @@ -652,7 +652,7 @@ func setupRealRobotWithOptions(
t.Helper()

ctx := context.Background()
robot, err := robotimpl.RobotFromConfig(ctx, robotConfig, logger)
robot, err := robotimpl.RobotFromConfig(ctx, robotConfig, nil, logger)
test.That(t, err, test.ShouldBeNil)

// We initialize with a stream config such that the stream server is capable of creating video stream and
Expand Down
14 changes: 13 additions & 1 deletion examples/customresources/demos/remoteserver/server.go
Copy link
Member

Choose a reason for hiding this comment

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

Off-topic, but any context on the purpose of this example @cheukt ? Still necessary to keep around ?

Copy link
Member

@cheukt cheukt Feb 14, 2025

Choose a reason for hiding this comment

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

we can probably remove, we want users using modules directly

Copy link
Member Author

Choose a reason for hiding this comment

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

what exactly should I remove?

Copy link
Member

Choose a reason for hiding this comment

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

don't have to remove in this ticket, made a ticket here

Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
"errors"

goutils "go.viam.com/utils"
"go.viam.com/utils/rpc"

"go.viam.com/rdk/config"
_ "go.viam.com/rdk/examples/customresources/models/mygizmo"
"go.viam.com/rdk/grpc"
"go.viam.com/rdk/logging"
robotimpl "go.viam.com/rdk/robot/impl"
"go.viam.com/rdk/robot/web"
Expand Down Expand Up @@ -40,7 +42,17 @@ func mainWithArgs(ctx context.Context, args []string, logger logging.Logger) (er
return err
}

myRobot, err := robotimpl.RobotFromConfig(ctx, cfg, logger)
var appConn rpc.ClientConn
if cfg.Cloud != nil && cfg.Cloud.AppAddress != "" {
appConn, err = grpc.NewAppConn(ctx, cfg.Cloud.AppAddress, cfg.Cloud.Secret, cfg.Cloud.ID, logger)
if err != nil {
return nil
}

defer goutils.UncheckedErrorFunc(appConn.Close)
}

myRobot, err := robotimpl.RobotFromConfig(ctx, cfg, appConn, logger)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions examples/customresources/demos/remoteserver/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestGizmo(t *testing.T) {

cfgServer, err := config.Read(ctx, utils.ResolveFile("./examples/customresources/demos/remoteserver/remote.json"), logger, nil)
test.That(t, err, test.ShouldBeNil)
remoteB, err := robotimpl.New(ctx, cfgServer, logger.Sublogger("remoteB"))
remoteB, err := robotimpl.New(ctx, cfgServer, nil, logger.Sublogger("remoteB"))
test.That(t, err, test.ShouldBeNil)
options := weboptions.New()
options.Network.BindAddress = remoteAddrB
Expand Down Expand Up @@ -116,7 +116,7 @@ func TestGizmo(t *testing.T) {
},
},
}
mainPart, err := robotimpl.New(ctx, mainPartConfig, logger.Sublogger("mainPart.client"))
mainPart, err := robotimpl.New(ctx, mainPartConfig, nil, logger.Sublogger("mainPart.client"))
defer func() {
test.That(t, mainPart.Close(context.Background()), test.ShouldBeNil)
}()
Expand Down
2 changes: 1 addition & 1 deletion module/concurrent_reconfigure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func setupTestRobotWithModules(
},
},
}
rob, err := robotimpl.New(ctx, cfg, logger)
rob, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
t.Cleanup(func() {
test.That(t, rob.Close(ctx), test.ShouldBeNil)
Expand Down
2 changes: 1 addition & 1 deletion module/module_interceptors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func TestModuleClientTimeoutInterceptor(t *testing.T) {
Name: "helper1",
}},
}
r, err := robotimpl.New(ctx, cfg, logger)
r, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
defer func() {
test.That(t, r.Close(ctx), test.ShouldBeNil)
Expand Down
4 changes: 2 additions & 2 deletions module/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func TestModuleFunctions(t *testing.T) {
},
}}

myRobot, err := robotimpl.RobotFromConfig(ctx, cfg, logger)
myRobot, err := robotimpl.RobotFromConfig(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)

parentAddr, err := myRobot.ModuleAddress()
Expand Down Expand Up @@ -425,7 +425,7 @@ func TestAttributeConversion(t *testing.T) {
},
}}

myRobot, err := robotimpl.RobotFromConfig(ctx, cfg, logger)
myRobot, err := robotimpl.RobotFromConfig(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)

parentAddr, err := myRobot.ModuleAddress()
Expand Down
4 changes: 2 additions & 2 deletions module/version_reconfigure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestValidationFailureDuringReconfiguration(t *testing.T) {
},
}

robot, err := robotimpl.New(ctx, cfg, logger)
robot, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
defer robot.Close(ctx)

Expand Down Expand Up @@ -132,7 +132,7 @@ func TestVersionBumpWithNewImplicitDeps(t *testing.T) {
},
}

robot, err := robotimpl.New(ctx, cfg, logger)
robot, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
defer robot.Close(ctx)

Expand Down
8 changes: 4 additions & 4 deletions robot/framesystem/framesystem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
func TestEmptyConfigFrameService(t *testing.T) {
logger := logging.NewTestLogger(t)
ctx := context.Background()
r, err := robotimpl.New(ctx, &config.Config{}, logger)
r, err := robotimpl.New(ctx, &config.Config{}, nil, logger)
test.That(t, err, test.ShouldBeNil)
fsCfg, err := r.FrameSystemConfig(ctx)
test.That(t, err, test.ShouldBeNil)
Expand Down Expand Up @@ -96,7 +96,7 @@ func TestNewFrameSystemFromConfigWithTransforms(t *testing.T) {
cfg, err := config.Read(context.Background(), rdkutils.ResolveFile("robot/impl/data/fake.json"), logger, nil)
test.That(t, err, test.ShouldBeNil)

r, err := robotimpl.New(context.Background(), cfg, logger)
r, err := robotimpl.New(context.Background(), cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
defer r.Close(context.Background())
fsCfg, err := r.FrameSystemConfig(ctx)
Expand Down Expand Up @@ -227,7 +227,7 @@ func TestNewFrameSystemFromBadConfig(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
cfg, err := config.Read(ctx, rdkutils.ResolveFile("robot/impl/data/fake_wrongconfig"+tc.num+".json"), logger, nil)
test.That(t, err, test.ShouldBeNil)
r, err := robotimpl.New(ctx, cfg, logger)
r, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
defer r.Close(ctx)
fsCfg, err := r.FrameSystemConfig(ctx)
Expand All @@ -242,7 +242,7 @@ func TestNewFrameSystemFromBadConfig(t *testing.T) {

cfg, err := config.Read(ctx, rdkutils.ResolveFile("robot/impl/data/fake.json"), logger, nil)
test.That(t, err, test.ShouldBeNil)
r, err := robotimpl.New(ctx, cfg, logger)
r, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
defer r.Close(ctx)

Expand Down
24 changes: 19 additions & 5 deletions robot/impl/local_robot.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ func newWithResources(
ctx context.Context,
cfg *config.Config,
resources map[resource.Name]resource.Resource,
conn rpc.ClientConn,
logger logging.Logger,
opts ...Option,
) (robot.LocalRobot, error) {
Expand Down Expand Up @@ -434,6 +435,12 @@ func newWithResources(
r.packageManager = packages.NewDeferredPackageManager(
ctx,
func(ctx context.Context) (packagespb.PackageServiceClient, error) {
if conn != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Spoke offline, but these few lines are probably unnecessary if AcquireConnection gets the global app connection.

return packagespb.NewPackageServiceClient(conn), err
}

// NOTE(bashar-515): this case where `conn` is nil, `cfg.Cloud` is non-nil, and `cfg.Cloud.AppAddress` is not the empty string
// is only encountered in tests. It is not an actual path expected to be taken in prod
_, cloudConn, err := r.cloudConnSvc.AcquireConnection(ctx)
return packagespb.NewPackageServiceClient(cloudConn), err
},
Expand Down Expand Up @@ -548,10 +555,11 @@ func newWithResources(
func New(
ctx context.Context,
cfg *config.Config,
conn rpc.ClientConn,
logger logging.Logger,
opts ...Option,
) (robot.LocalRobot, error) {
cheukt marked this conversation as resolved.
Show resolved Hide resolved
return newWithResources(ctx, cfg, nil, logger, opts...)
return newWithResources(ctx, cfg, nil, conn, logger, opts...)
}

// removeOrphanedResources is called by the module manager to remove resources
Expand Down Expand Up @@ -1002,16 +1010,22 @@ func RobotFromConfigPath(ctx context.Context, cfgPath string, logger logging.Log
logger.CError(ctx, "cannot read config")
return nil, err
}
return RobotFromConfig(ctx, cfg, logger, opts...)
return RobotFromConfig(ctx, cfg, nil, logger, opts...)
Copy link
Member Author

Choose a reason for hiding this comment

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

Again, the code paths that call RobotFromConfigPath() all use a config that lacks a cloud component, meaning a connection here is not necessary. To minimize the total number of lines of code changed in this PR, I'm just passing nil here (as opposed to forcing callers of RobotFromConfigPath() to do it themselves, although that might me the more desired/correct behavior).

Copy link
Member

Choose a reason for hiding this comment

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

it is possible that RobotFromConfigPath might be used with a cloud config - probably easier to just let users pass in a conn if they want

}

// RobotFromConfig is a helper to process a config and then create a robot based on it.
func RobotFromConfig(ctx context.Context, cfg *config.Config, logger logging.Logger, opts ...Option) (robot.LocalRobot, error) {
func RobotFromConfig(
ctx context.Context,
cfg *config.Config,
conn rpc.ClientConn,
logger logging.Logger,
opts ...Option,
) (robot.LocalRobot, error) {
processedCfg, err := config.ProcessConfig(cfg)
if err != nil {
return nil, err
}
return New(ctx, processedCfg, logger, opts...)
return New(ctx, processedCfg, conn, logger, opts...)
}

// RobotFromResources creates a new robot consisting of the given resources. Using RobotFromConfig is preferred
Expand All @@ -1022,7 +1036,7 @@ func RobotFromResources(
logger logging.Logger,
opts ...Option,
) (robot.LocalRobot, error) {
return newWithResources(ctx, &config.Config{}, resources, logger, opts...)
return newWithResources(ctx, &config.Config{}, resources, nil, logger, opts...)
Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's safe to pass a nil connection here because RobotFromResources() already hardcodes an empty config in its call to newWithResources(). Whenever a config does not have a "Cloud" component (e.g., when it's empty), a connection to App is never created. Additionally, RobotFromResources() is only called here,, the ensuing code path is not expected to ever use this conn.

}

// DiscoverComponents takes a list of discovery queries and returns corresponding
Expand Down
2 changes: 1 addition & 1 deletion robot/impl/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func setupLocalRobot(
var rOpts []Option
rOpts = append(rOpts, opts...)
rOpts = append(rOpts, WithViamHomeDir(t.TempDir()))
r, err := New(ctx, cfg, logger, rOpts...)
r, err := New(ctx, cfg, nil, logger, rOpts...)
test.That(t, err, test.ShouldBeNil)
t.Cleanup(func() {
test.That(t, r.Close(ctx), test.ShouldBeNil)
Expand Down
14 changes: 7 additions & 7 deletions robot/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func TestSessions(t *testing.T) {
test.That(t, err, test.ShouldBeNil)

ctx := context.Background()
r, err := robotimpl.New(ctx, cfg, logger.Sublogger("main"))
r, err := robotimpl.New(ctx, cfg, nil, logger.Sublogger("main"))
test.That(t, err, test.ShouldBeNil)

options, _, addr := robottestutils.CreateBaseOptionsAndListener(t)
Expand Down Expand Up @@ -376,7 +376,7 @@ func TestSessionsWithRemote(t *testing.T) {
test.That(t, err, test.ShouldBeNil)

ctx := context.Background()
remoteRobot, err := robotimpl.New(ctx, cfg, logger)
remoteRobot, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)

options, _, remoteAddr := robottestutils.CreateBaseOptionsAndListener(t)
Expand Down Expand Up @@ -408,7 +408,7 @@ func TestSessionsWithRemote(t *testing.T) {
cfg, err = config.FromReader(context.Background(), "", strings.NewReader(roboConfig), logger, nil)
test.That(t, err, test.ShouldBeNil)

r, err := robotimpl.New(ctx, cfg, logger.Sublogger("main"))
r, err := robotimpl.New(ctx, cfg, nil, logger.Sublogger("main"))
test.That(t, err, test.ShouldBeNil)

options, _, addr := robottestutils.CreateBaseOptionsAndListener(t)
Expand Down Expand Up @@ -482,7 +482,7 @@ func TestSessionsWithRemote(t *testing.T) {
dummyRemMotor1.stopCh = stopChs["remMotor1"].Chan
dummyRemMotor1.mu.Unlock()

r, err = robotimpl.New(ctx, cfg, logger)
r, err = robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)

options, _, addr = robottestutils.CreateBaseOptionsAndListener(t)
Expand Down Expand Up @@ -568,7 +568,7 @@ func TestSessionsMixedClients(t *testing.T) {
test.That(t, err, test.ShouldBeNil)

ctx := context.Background()
r, err := robotimpl.New(ctx, cfg, logger.Sublogger("main"))
r, err := robotimpl.New(ctx, cfg, nil, logger.Sublogger("main"))
test.That(t, err, test.ShouldBeNil)

options, _, addr := robottestutils.CreateBaseOptionsAndListener(t)
Expand Down Expand Up @@ -661,7 +661,7 @@ func TestSessionsMixedOwnersNoAuth(t *testing.T) {
test.That(t, err, test.ShouldBeNil)

ctx := context.Background()
r, err := robotimpl.New(ctx, cfg, logger.Sublogger("main"))
r, err := robotimpl.New(ctx, cfg, nil, logger.Sublogger("main"))
test.That(t, err, test.ShouldBeNil)

options, _, addr := robottestutils.CreateBaseOptionsAndListener(t)
Expand Down Expand Up @@ -768,7 +768,7 @@ func TestSessionsMixedOwnersImplicitAuth(t *testing.T) {
test.That(t, err, test.ShouldBeNil)

ctx := context.Background()
r, err := robotimpl.New(ctx, cfg, logger.Sublogger("main"))
r, err := robotimpl.New(ctx, cfg, nil, logger.Sublogger("main"))
test.That(t, err, test.ShouldBeNil)

options, _, addr := robottestutils.CreateBaseOptionsAndListener(t)
Expand Down
2 changes: 1 addition & 1 deletion robot/web/stream/stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func setupRealRobot(t *testing.T, robotConfig *config.Config, logger logging.Log
t.Helper()

ctx := context.Background()
robot, err := robotimpl.RobotFromConfig(ctx, robotConfig, logger)
robot, err := robotimpl.RobotFromConfig(ctx, robotConfig, nil, logger)
test.That(t, err, test.ShouldBeNil)

// We initialize with a stream config such that the stream server is capable of creating video stream and
Expand Down
2 changes: 1 addition & 1 deletion services/motion/builtin/builtin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func setupMotionServiceFromConfig(t *testing.T, configFilename string) (motion.S
logger := logging.NewTestLogger(t)
cfg, err := config.Read(ctx, configFilename, logger, nil)
test.That(t, err, test.ShouldBeNil)
myRobot, err := robotimpl.New(ctx, cfg, logger)
myRobot, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
svc, err := motion.FromRobot(myRobot, "builtin")
test.That(t, err, test.ShouldBeNil)
Expand Down
2 changes: 1 addition & 1 deletion services/motion/builtin/move_on_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestMoveOnMap(t *testing.T) {
t.Run("Timeout", func(t *testing.T) {
cfg, err := config.Read(ctx, "../data/real_wheeled_base.json", logger, nil)
test.That(t, err, test.ShouldBeNil)
myRobot, err := robotimpl.New(ctx, cfg, logger)
myRobot, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
defer func() {
test.That(t, myRobot.Close(context.Background()), test.ShouldBeNil)
Expand Down
4 changes: 2 additions & 2 deletions services/navigation/builtin/builtin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func setupNavigationServiceFromConfig(t *testing.T, configFilename string) (navi
cfg, err := config.Read(ctx, configFilename, logger, nil)
test.That(t, err, test.ShouldBeNil)
test.That(t, cfg.Ensure(false, logger), test.ShouldBeNil)
myRobot, err := robotimpl.New(ctx, cfg, logger)
myRobot, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
svc, err := navigation.FromRobot(myRobot, "test_navigation")
test.That(t, err, test.ShouldBeNil)
Expand Down Expand Up @@ -596,7 +596,7 @@ func TestNavSetUpFromFaultyConfig(t *testing.T) {
cfg, err := config.Read(ctx, tc.configPath, logger, nil)
test.That(t, err, test.ShouldBeNil)
test.That(t, cfg.Ensure(false, logger), test.ShouldBeNil)
myRobot, err := robotimpl.New(ctx, cfg, logger)
myRobot, err := robotimpl.New(ctx, cfg, nil, logger)
test.That(t, err, test.ShouldBeNil)
_, err = navigation.FromRobot(myRobot, "test_navigation")
test.That(t, err, test.ShouldNotBeNil)
Expand Down
2 changes: 1 addition & 1 deletion web/server/entrypoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func (s *robotServer) serveWeb(ctx context.Context, cfg *config.Config) (err err
// state of initializing until reconfigured with full config.
minimalProcessedConfig.Initial = true

myRobot, err := robotimpl.New(ctx, &minimalProcessedConfig, s.logger, robotOptions...)
myRobot, err := robotimpl.New(ctx, &minimalProcessedConfig, s.conn, s.logger, robotOptions...)
Copy link
Member Author

Choose a reason for hiding this comment

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

MAIN CODE PATH START

Copy link
Member

Choose a reason for hiding this comment

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

AHHHH

if err != nil {
cancel()
return err
Expand Down
Loading