-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Copy the api/types/time package to internal client/daemon packages #50722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy the api/types/time package to internal client/daemon packages #50722
Conversation
536025a
to
9004cab
Compare
Git gets a bit confused because it tries to keep history, but has to decide "did it move to Perhaps we should have 2 commits in this PR; one that moves it to either daemon or client, and a second commit that creates a copy for the other. (not sure which one is best to use for the "move" - ideally we'd pick the one where it's most likely to "stay", so that that one can be used to preserve history) |
Thinking of that; perhaps the (hope I make sense!) |
Yep makes sense. Ironically I had that at first but ended up squashing as I thought there would be a broken commit. Although now I realize client is a module pointing to a point in time of API so it should be fine if I do the daemon first as you said. |
Yeah, I don't think there's a "best" option, and of course there's still git history. But I suspect the move to daemon will preserve that history best because it's a literal move. |
eb6d49d
to
4f1e1be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR copies the api/types/time
package into internal packages for both the client and daemon components. The purpose is to remove the external dependency on the shared API types package by creating internal copies of timestamp utility functions.
Key changes:
- Created internal timestamp packages for both client and daemon with identical functionality
- Updated all import references from
github.com/moby/moby/api/types/time
to the new internal package paths - Changed package names from
time
totimestamp
to avoid naming conflicts
Reviewed Changes
Copilot reviewed 19 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
daemon/internal/timestamp/timestamp.go |
New internal timestamp utilities package for daemon |
daemon/internal/timestamp/timestamp_test.go |
Test file for daemon timestamp package |
client/internal/timestamp/timestamp.go |
New internal timestamp utilities package for client |
client/internal/timestamp/timestamp_test.go |
Test file for client timestamp package |
Multiple daemon files | Updated imports to use new internal timestamp package |
Multiple client files | Updated imports to use new internal timestamp package |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
This change copies the daemon/internal/timestamp package (previously api/types/time) to an internal client package and updates the client usage for GetTimestamp functionality. Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
4f1e1be
to
aa80ad2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
- What I did
1/2 for #50718
This change copies the api/types/time package into internal packages for the client and daemon. The package does not define any types but provided some utilities for format-handling of timestamps.
- How I did it
- How to verify it
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)