container: update confusing GoDoc for Container and State#48726
Merged
thaJeztah merged 1 commit intomoby:masterfrom Oct 25, 2024
Merged
container: update confusing GoDoc for Container and State#48726thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah merged 1 commit intomoby:masterfrom
Conversation
Member
Author
|
@laurazard @vvoland PTAL 🤗 |
thaJeztah
commented
Oct 25, 2024
| Root string `json:"-"` // Path to the "home" of the container, including metadata. | ||
| BaseFS string `json:"-"` // Path to the graphdriver mountpoint | ||
| RWLayer layer.RWLayer `json:"-"` | ||
| // We embed [State] here for so that Container supports states directly, |
Member
Author
There was a problem hiding this comment.
Ah, dang; typo here ("for so that"🙃
vvoland
approved these changes
Oct 25, 2024
This comment was added in f49c3f2, following 517ba44, which embedded the State, which caused the JSON presentation to change. Referring to a very old (and now removed) API version made this confusing; while it was added to preserve the pre-v1.11 API format, it still applies to current API versions (i.e., we cannot change this unless an explicit API change). This patch; - removes the confusing comment - touches up the comment describing the reason for embedding the State - also mentions the State's sync.Mutex, which acts as a lock not only for the state itself, but for the container as a whole (which was the motivation for 517ba44). - Update GoDoc for the State struct to clarify the purpose of the Mutex. Signed-off-by: Sebastiaan van Stijn <[email protected]>
ffb78d7 to
8e0bf25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
relates to:
json.Marshaling the container st... #7914container: update confusing GoDoc for Container and State
This comment was added in f49c3f2, following 517ba44, which embedded the State, which caused the JSON presentation to change.
Referring to a very old (and now removed) API version made this confusing; while it was added to preserve the pre-v1.11 API format, it still applies to current API versions (i.e., we cannot change this unless an explicit API change).
This patch;
- A picture of a cute animal (not mandatory but encouraged)