Skip to content

Commit 26b66d4

Browse files
authored
fix(agents): set sbx id in envrionment when initializing agent (#699)
1 parent 269fbd9 commit 26b66d4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cmd/lk/agent.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,6 @@ func initAgent(ctx context.Context, cmd *cli.Command) error {
402402
if appName == "" {
403403
appName = project.Name
404404
}
405-
// We set agent name in env for use in template tasks
406-
os.Setenv("LIVEKIT_AGENT_NAME", appName)
407405

408406
// TODO: (@rektdeckard) figure out why AccessKeyProvider does not immediately
409407
// have access to newly-created API keys, then remove this sleep
@@ -416,6 +414,11 @@ func initAgent(ctx context.Context, cmd *cli.Command) error {
416414
token,
417415
serverURL,
418416
)
417+
418+
// We set agent name and sandbox ID in env for use in template tasks
419+
os.Setenv("LIVEKIT_AGENT_NAME", appName)
420+
os.Setenv("LIVEKIT_SANDBOX_ID", sandboxID)
421+
419422
return err
420423
}); err != nil {
421424
return fmt.Errorf("failed to create sandbox: %w", err)

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
package livekitcli
1616

1717
const (
18-
Version = "2.6.1"
18+
Version = "2.6.2"
1919
)

0 commit comments

Comments
 (0)