From badf76e172b10548f3a77a65c04ed7aaa4a78ce9 Mon Sep 17 00:00:00 2001
From: Matthew Heon <matthew.heon@pm.me>
Date: Wed, 25 May 2022 14:08:08 -0400
Subject: Remove more FIXMEs

Mostly, just removing the comments. These either have been done,
or are no longer a good idea.

No code changes. [NO NEW TESTS NEEDED] as such.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
---
 libpod/plugin/volume_api.go | 7 +------
 libpod/pod_api.go           | 9 +++++----
 libpod/runtime.go           | 3 ---
 3 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/libpod/plugin/volume_api.go b/libpod/plugin/volume_api.go
index a6d66a034..2818e70c1 100644
--- a/libpod/plugin/volume_api.go
+++ b/libpod/plugin/volume_api.go
@@ -22,9 +22,6 @@ import (
 
 var json = jsoniter.ConfigCompatibleWithStandardLibrary
 
-// TODO: We should add syntax for specifying plugins to containers.conf, and
-// support for loading based on that.
-
 // Copied from docker/go-plugins-helpers/volume/api.go - not exported, so we
 // need to do this to get at them.
 // These are well-established paths that should not change unless the plugin API
@@ -185,8 +182,7 @@ func (p *VolumePlugin) getURI() string {
 }
 
 // Verify the plugin is still available.
-// TODO: Do we want to ping with an HTTP request? There's no ping endpoint so
-// we'd need to hit Activate or Capabilities?
+// Does not actually ping the API, just verifies that the socket still exists.
 func (p *VolumePlugin) verifyReachable() error {
 	if _, err := os.Stat(p.SocketPath); err != nil {
 		if os.IsNotExist(err) {
@@ -307,7 +303,6 @@ func (p *VolumePlugin) ListVolumes() ([]*volume.Volume, error) {
 		return nil, err
 	}
 
-	// TODO: Can probably unify response reading under a helper
 	volumeRespBytes, err := ioutil.ReadAll(resp.Body)
 	if err != nil {
 		return nil, errors.Wrapf(err, "error reading response body from volume plugin %s", p.Name)
diff --git a/libpod/pod_api.go b/libpod/pod_api.go
index eede896a9..1c1e15984 100644
--- a/libpod/pod_api.go
+++ b/libpod/pod_api.go
@@ -152,8 +152,8 @@ func (p *Pod) stopWithTimeout(ctx context.Context, cleanup bool, timeout int) (m
 		return nil, err
 	}
 
-	// TODO: There may be cases where it makes sense to order stops based on
-	// dependencies. Should we bother with this?
+	// Stopping pods is not ordered by dependency. We haven't seen any case
+	// where this would actually matter.
 
 	ctrErrChan := make(map[string]<-chan error)
 
@@ -162,8 +162,9 @@ func (p *Pod) stopWithTimeout(ctx context.Context, cleanup bool, timeout int) (m
 		c := ctr
 		logrus.Debugf("Adding parallel job to stop container %s", c.ID())
 		retChan := parallel.Enqueue(ctx, func() error {
-			// TODO: Might be better to batch stop and cleanup
-			// together?
+			// Can't batch these without forcing Stop() to hold the
+			// lock for the full duration of the timeout.
+			// We probably don't want to do that.
 			if timeout > -1 {
 				if err := c.StopWithTimeout(uint(timeout)); err != nil {
 					return err
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 00fa2fe88..e268c2d17 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -412,7 +412,6 @@ func makeRuntime(runtime *Runtime) (retErr error) {
 		return err
 	}
 	runtime.eventer = eventer
-	// TODO: events for libimage
 
 	// Set up containers/image
 	if runtime.imageContext == nil {
@@ -517,8 +516,6 @@ func makeRuntime(runtime *Runtime) (retErr error) {
 	}
 	// Acquire the lock and hold it until we return
 	// This ensures that no two processes will be in runtime.refresh at once
-	// TODO: we can't close the FD in this lock, so we should keep it around
-	// and use it to lock important operations
 	aliveLock.Lock()
 	doRefresh := false
 	defer func() {
-- 
cgit v1.2.3-54-g00ecf