Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 cmd/workspace/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (cmd *BuildCmd) cleanupTempWorkspace(
ctx context.Context, c client.BaseWorkspaceClient,
) {
if err := c.Delete(ctx, client.DeleteOptions{Force: true}); err != nil {
log.Errorf("Error deleting workspace: %v", err)
log.Errorf("error deleting workspace: %v", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/workspace/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func (cmd *ExecCmd) execInContainer(ctx context.Context, opts execOpts, args []s
execArgs = append(execArgs, args...)

redacted := strings.Join(redactExecArgs(execArgs), " ")
log.Debugf("Executing in container: %s %s", opts.dockerCmd, redacted)
log.Debugf("executing in container: %s %s", opts.dockerCmd, redacted)

helper := &docker.DockerHelper{DockerCommand: opts.dockerCmd, Environment: opts.dockerEnv}
return helper.Run(ctx, execArgs, docker.Streams{
Expand Down
8 changes: 4 additions & 4 deletions cmd/workspace/gpg_tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (t *gpgTunnel) run(ctx context.Context, sshClient *ssh.Client) {
// returns.
func (t *gpgTunnel) ensure(ctx context.Context, sshClient *ssh.Client) bool {
if gpg.IsGpgTunnelRunning(ctx, t.cmd.User, sshClient) {
log.Debugf("GPG tunnel is running, skipping setup")
log.Debugf("gpg tunnel is running, skipping setup")
t.failureReported = false
return true
}
Expand All @@ -124,17 +124,17 @@ func (t *gpgTunnel) ensure(ctx context.Context, sshClient *ssh.Client) bool {
}
if gpg.IsGpgTunnelRunning(ctx, t.cmd.User, sshClient) {
log.Debugf(
"GPG tunnel setup failed but tunnel is live (won by a concurrent terminal): %v",
"gpg tunnel setup failed but tunnel is live (won by a concurrent terminal): %v",
err,
)
t.failureReported = false
return true
}
if ctx.Err() != nil {
log.Debugf("GPG tunnel setup aborted by context cancellation: %v", err)
log.Debugf("gpg tunnel setup aborted by context cancellation: %v", err)
return false
}
log.Warnf("GPG agent forwarding failed (continuing without it): %v", err)
log.Warnf("gpg agent forwarding failed (continuing without it): %v", err)
if t.failureReported {
return false
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/workspace/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (cmd *ImportCmd) importMachine(

// if machine already exists we skip
if cmd.MachineReuse && provider.MachineExists(devsyConfig.DefaultContext, cmd.MachineID) {
log.Infof("Reusing existing machine %s", cmd.MachineID)
log.Infof("reusing existing machine %s", cmd.MachineID)
return nil
}

Expand Down Expand Up @@ -254,7 +254,7 @@ func (cmd *ImportCmd) importProvider(
) error {
// if provider already exists we skip
if cmd.ProviderReuse && provider.ProviderExists(devsyConfig.DefaultContext, cmd.ProviderID) {
log.Infof("Reusing existing provider %s", cmd.ProviderID)
log.Infof("reusing existing provider %s", cmd.ProviderID)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/workspace/port_forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (cmd *SSHCmd) forwardTimeout() (time.Duration, error) {
return 0, fmt.Errorf("parse forward ports timeout: %w", err)
}

log.Infof("Using port forwarding timeout of %s", cmd.ForwardPortsTimeout)
log.Infof("using port forwarding timeout of %s", cmd.ForwardPortsTimeout)
return timeout, nil
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/workspace/set_ide.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ func (cmd *SetIDECmd) Run(_ context.Context, workspaceName, ideName string) erro
return fmt.Errorf("refresh ide options: %w", err)
}

log.Infof("set IDE for workspace %q to %q", workspace.ID, workspace.IDE.Name)
log.Infof("set ide for workspace %q to %q", workspace.ID, workspace.IDE.Name)
return nil
}
16 changes: 8 additions & 8 deletions cmd/workspace/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (cmd *SSHCmd) addPrivateKeysToAgentIfEnabled(ctx context.Context, devsyConf
"adding ssh keys to agent, disable via 'devsy context set -o SSH_ADD_PRIVATE_KEYS=false'",
)
if err := devssh.AddPrivateKeysToAgent(ctx); err != nil {
log.Debugf("Error adding private keys to ssh-agent: %v", err)
log.Debugf("error adding private keys to ssh-agent: %v", err)
}
}

Expand Down Expand Up @@ -343,7 +343,7 @@ func (cmd *SSHCmd) startServicesDaemon(
},
)
if err != nil {
log.Errorf("Error starting services: %v", err)
log.Errorf("error starting services: %v", err)
}
}()
}
Expand All @@ -353,7 +353,7 @@ func (cmd *SSHCmd) startProxyTunnel(
devsyConfig *config.Config,
client client2.ProxyClient,
) error {
log.Debugf("Start proxy tunnel")
log.Debugf("start proxy tunnel")
return tunnel.NewTunnel(
ctx,
func(ctx context.Context, stdin io.Reader, stdout io.Writer) error {
Expand Down Expand Up @@ -439,7 +439,7 @@ func (cmd *SSHCmd) startTunnel(

workdir := resolveWorkdir(cmd.WorkDir, workspaceClient)

log.Debugf("Run outer container tunnel")
log.Debugf("run outer container tunnel")
command := cmd.buildSSHServerCommand(workdir)

envVars, err := cmd.retrieveEnVars()
Expand Down Expand Up @@ -567,7 +567,7 @@ func (cmd *SSHCmd) buildSSHServerCommand(workdir string) string {
workdir,
}
if cmd.ReuseSSHAuthSock != "" {
log.Debug("Reusing SSH_AUTH_SOCK")
log.Debug("reusing SSH_AUTH_SOCK")
commandArgs = append(
commandArgs,
names.Flag(names.ReuseSSHAuthSock),
Expand Down Expand Up @@ -611,7 +611,7 @@ func resolveMergedWorkspaceFolder(

result, err := provider.LoadWorkspaceResult(workspaceConfig.Context, workspaceConfig.ID)
if err != nil {
log.Warnf("Error loading workspace result for workdir resolution: %v", err)
log.Warnf("error loading workspace result for workdir resolution: %v", err)
return ""
}
if result == nil || result.MergedConfig == nil {
Expand Down Expand Up @@ -653,7 +653,7 @@ func (cmd *SSHCmd) startServices(
},
)
if err != nil {
log.Debugf("Error running credential server: %v", err)
log.Debugf("error running credential server: %v", err)
}
}
}
Expand All @@ -673,7 +673,7 @@ func startSSHKeepAlive(
case <-ticker.C:
_, _, err := client.SendRequest("keepalive@openssh.com", true, nil)
if err != nil {
log.Errorf("Failed to send keepalive: %v", err)
log.Errorf("failed to send keepalive: %v", err)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/workspace/up/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (cmd *UpCmd) configureWorkspace(
return err
}

log.Info("SSH configuration completed in workspace")
log.Info("ssh configuration completed in workspace")
}

// Dotfiles are now installed in-container during the lifecycle
Expand Down
4 changes: 2 additions & 2 deletions cmd/workspace/up/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (cmd *UpCmd) startTunnel(
client client2.BaseWorkspaceClient,
wctx *workspaceContext,
) (int, func(), error) {
log.Info("Starting SSH tunnel for workspace")
log.Info("starting ssh tunnel for workspace")

dialer := &tunnel.WorkspaceDialer{
Context: client.Context(),
Expand All @@ -37,7 +37,7 @@ func (cmd *UpCmd) startTunnel(
return 0, nil, fmt.Errorf("create local tunnel: %w", err)
}

log.Infof("SSH tunnel listening on port %d", localTunnel.Port())
log.Infof("ssh tunnel listening on port %d", localTunnel.Port())

cleanup := func() {
_ = localTunnel.Close()
Expand Down
10 changes: 5 additions & 5 deletions cmd/workspace/up/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func (cmd *UpCmd) finalizeUp(ctx context.Context, args *finalizeUpArgs) error {
defer cleanup()
}
if err := cmd.reconfigureSSHWithTunnel(args.devsyConfig, args.client, args.wctx); err != nil {
log.Warnf("Failed to reconfigure SSH with tunnel port: %v", err)
log.Warnf("failed to reconfigure ssh with tunnel port: %v", err)
}

ideURL, err := cmd.openIDE(ctx, args.devsyConfig, args.client, args.wctx)
Expand All @@ -351,7 +351,7 @@ func (cmd *UpCmd) finalizeUp(ctx context.Context, args *finalizeUpArgs) error {
}
if args.wctx.tunnelPort > 0 {
log.Infof(
"SSH tunnel active on port %d, waiting for shutdown signal",
"ssh tunnel active on port %d, waiting for shutdown signal",
args.wctx.tunnelPort,
)
<-ctx.Done()
Expand All @@ -374,7 +374,7 @@ func (cmd *UpCmd) maybeStartTunnel(
}
tunnelPort, tunnelCleanup, err := cmd.startTunnel(ctx, devsyConfig, client, wctx)
if err != nil {
log.Warnf("Failed to start SSH tunnel, falling back to ProxyCommand: %v", err)
log.Warnf("failed to start ssh tunnel, falling back to ProxyCommand: %v", err)
return nil
}
wctx.tunnelPort = tunnelPort
Expand Down Expand Up @@ -503,10 +503,10 @@ func (cmd *UpCmd) prepareWorkspace(client client2.BaseWorkspaceClient) {

if !cmd.Platform.Enabled && ide.ReusesAuthSock(targetIDE) {
cmd.SSHAuthSockID = util.RandStringBytes(10)
log.Debug("Reusing SSH_AUTH_SOCK", cmd.SSHAuthSockID)
log.Debug("reusing SSH_AUTH_SOCK", cmd.SSHAuthSockID)
} else if cmd.Platform.Enabled && ide.ReusesAuthSock(targetIDE) {
log.Debug(
"Reusing SSH_AUTH_SOCK is not supported with platform mode, consider launching the IDE from the platform UI",
"reusing SSH_AUTH_SOCK is not supported with platform mode, consider launching the IDE from the platform UI",
)
}
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/workspace/up/up_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func (cmd *UpCmd) prepareClient(
return nil, err
}
if cmd.Platform.Enabled {
log.Debug("Running in platform mode")
log.Debug("Using error output stream")
log.Debug("running in platform mode")
log.Debug("using error output stream")
config.MergeContextOptions(devsyConfig.Current(), os.Environ())
}
if err := cmd.prepareSecrets(devsyConfig); err != nil {
Expand Down
Loading