diff --git a/pkg/client/context.go b/pkg/client/context.go
index 11ba8c0e37..f3e6c69d7f 100644
--- a/pkg/client/context.go
+++ b/pkg/client/context.go
@@ -72,8 +72,6 @@ func DeleteContext(name string) error {
return err
}
- // remove any context that might be loaded
- // TODO: Check if the context we are removing is the active one rather than doing it all the time
cfg := dConfig.LoadDefaultConfigFile(nil)
cfg.CurrentContext = ""
if err := cfg.Save(); err != nil {
diff --git a/pkg/config/app_test.go b/pkg/config/app_test.go
index 9f8defa190..113d130b36 100644
--- a/pkg/config/app_test.go
+++ b/pkg/config/app_test.go
@@ -26,7 +26,6 @@ func TestReadAppEnvFile(t *testing.T) {
}
func TestGetApp(t *testing.T) {
- // TODO: Test failures as well as successes
app, err := GetApp(expectedAppFiles, appName)
if err != nil {
t.Fatal(err)
diff --git a/pkg/secret/secret.go b/pkg/secret/secret.go
index 59a9be790c..1dead68a1c 100644
--- a/pkg/secret/secret.go
+++ b/pkg/secret/secret.go
@@ -74,7 +74,6 @@ func ReadSecretEnvVars(appEnv config.AppEnv) map[string]string {
return secretEnvVars
}
-// TODO: should probably go in the config/app package?
func ParseSecretEnvVarName(secretEnvVar string) string {
withoutPrefix := strings.TrimPrefix(secretEnvVar, "SECRET_")
withoutSuffix := strings.TrimSuffix(withoutPrefix, "_VERSION")
@@ -83,7 +82,6 @@ func ParseSecretEnvVarName(secretEnvVar string) string {
return name
}
-// TODO: should probably go in the config/app package?
func ParseGeneratedSecretName(secret string, appEnv config.App) string {
name := fmt.Sprintf("%s_", appEnv.StackName())
withoutAppName := strings.TrimPrefix(secret, name)
@@ -93,7 +91,6 @@ func ParseGeneratedSecretName(secret string, appEnv config.App) string {
return parsed
}
-// TODO: should probably go in the config/app package?
func ParseSecretEnvVarValue(secret string) (secretValue, error) {
values := strings.Split(secret, "#")
if len(values) == 0 {
diff --git a/pkg/upstream/commandconn/commandconn.go b/pkg/upstream/commandconn/commandconn.go
index 7df44f6ead..31074183cf 100644
--- a/pkg/upstream/commandconn/commandconn.go
+++ b/pkg/upstream/commandconn/commandconn.go
@@ -188,14 +188,14 @@ func ignorableCloseError(err error) bool {
func (c *commandConn) CloseRead() error {
// NOTE: maybe already closed here
if err := c.stdout.Close(); err != nil && !ignorableCloseError(err) {
- // TODO: muted because https://github.com/docker/compose/issues/8544
+ // muted because https://github.com/docker/compose/issues/8544
// logrus.Warnf("commandConn.CloseRead: %v", err)
}
c.stdioClosedMu.Lock()
c.stdoutClosed = true
c.stdioClosedMu.Unlock()
if err := c.killIfStdioClosed(); err != nil {
- // TODO: muted because https://github.com/docker/compose/issues/8544
+ // muted because https://github.com/docker/compose/issues/8544
// logrus.Warnf("commandConn.CloseRead: %v", err)
}
return nil
@@ -212,14 +212,14 @@ func (c *commandConn) Read(p []byte) (int, error) {
func (c *commandConn) CloseWrite() error {
// NOTE: maybe already closed here
if err := c.stdin.Close(); err != nil && !ignorableCloseError(err) {
- // TODO: muted because https://github.com/docker/compose/issues/8544
+ // muted because https://github.com/docker/compose/issues/8544
// logrus.Warnf("commandConn.CloseWrite: %v", err)
}
c.stdioClosedMu.Lock()
c.stdinClosed = true
c.stdioClosedMu.Unlock()
if err := c.killIfStdioClosed(); err != nil {
- // TODO: muted because https://github.com/docker/compose/issues/8544
+ // muted because https://github.com/docker/compose/issues/8544
// logrus.Warnf("commandConn.CloseWrite: %v", err)
}
return nil
@@ -239,7 +239,7 @@ func (c *commandConn) Close() error {
logrus.Warnf("commandConn.Close: CloseRead: %v", err)
}
if err = c.CloseWrite(); err != nil {
- // TODO: muted because https://github.com/docker/compose/issues/8544
+ // muted because https://github.com/docker/compose/issues/8544
// logrus.Warnf("commandConn.Close: CloseWrite: %v", err)
}
return err
diff --git a/pkg/upstream/container/hijack.go b/pkg/upstream/container/hijack.go
index fac5e99bc5..3f3cd42f26 100644
--- a/pkg/upstream/container/hijack.go
+++ b/pkg/upstream/container/hijack.go
@@ -16,7 +16,6 @@ import (
)
// The default escape key sequence: ctrl-p, ctrl-q
-// TODO: This could be moved to `pkg/term`.
var defaultEscapeKeys = []byte{16, 17}
// A hijackedIOStreamer handles copying input to and output from streams to the
diff --git a/pkg/upstream/convert/service.go b/pkg/upstream/convert/service.go
index 2424e60d5a..d2cca33af7 100644
--- a/pkg/upstream/convert/service.go
+++ b/pkg/upstream/convert/service.go
@@ -399,7 +399,6 @@ func convertServiceNetworks(
return nets, nil
}
-// TODO: fix secrets API so that SecretAPIClient is not required here
func convertServiceSecrets(
client client.SecretAPIClient,
namespace Namespace,
@@ -442,8 +441,6 @@ func convertServiceSecrets(
// required by the serivce. Unlike convertServiceSecrets, this takes the whole
// ServiceConfig, because some Configs may be needed as a result of other
// fields (like CredentialSpecs).
-//
-// TODO: fix configs API so that ConfigsAPIClient is not required here
func convertServiceConfigObjs(
client client.ConfigAPIClient,
namespace Namespace,
@@ -626,7 +623,6 @@ func convertHealthcheck(healthcheck *composetypes.HealthCheckConfig) (*container
}
func convertRestartPolicy(restart string, source *composetypes.RestartPolicy) (*swarm.RestartPolicy, error) {
- // TODO: log if restart is being ignored
if source == nil {
policy, err := opts.ParseRestartPolicy(restart)
if err != nil {
diff --git a/pkg/upstream/stack/stack.go b/pkg/upstream/stack/stack.go
index 53a408da0b..3c97909fc0 100644
--- a/pkg/upstream/stack/stack.go
+++ b/pkg/upstream/stack/stack.go
@@ -404,7 +404,6 @@ func deployServices(
// Stack deploy does not have a `--force` option. Preserve existing
// ForceUpdate value so that tasks are not re-deployed if not updated.
- // TODO move this to API client?
serviceSpec.TaskTemplate.ForceUpdate = service.Spec.TaskTemplate.ForceUpdate
response, err := cl.ServiceUpdate(ctx, service.ID, service.Version, serviceSpec, updateOpts)