-
Notifications
You must be signed in to change notification settings - Fork 658
Update Docker dependencies #4957
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
base: dev
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ import ( | |
| "github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/response" | ||
| v2 "github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/v2" | ||
|
|
||
| "github.com/docker/docker/api/types" | ||
| "github.com/moby/moby/api/types/container" | ||
| ) | ||
|
|
||
| const ( | ||
|
|
@@ -139,6 +139,6 @@ type NetworkInterfaceProperties struct { | |
|
|
||
| // StatsResponse is the v4 Stats response for a container. | ||
| type StatsResponse struct { | ||
| *types.StatsJSON | ||
| *container.StatsResponse | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we're going from
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oof, I just looked through the agent directory, it has an absolute ton of Much regret.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apologies for the delay, yes it'll take quite a lot of effort to migrate over. There's also the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For reference, this is my branch off of these changes -> https://github.com/mye956/amazon-ecs-agent/tree/4957
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Feel free to use Thanks for the review feedback and getting these dependencies updated.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good, thanks again for opening this PR. I'll reference both this PR and the github issue you've opened if I do. |
||
| Network_rate_stats *stats.NetworkStatsPerSec `json:"network_rate_stats,omitempty"` | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| This is a copy of https://github.com/moby/moby/tree/master/pkg/meminfo |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| //go:build linux || freebsd | ||
|
|
||
| package meminfo | ||
|
|
||
| import ( | ||
| "strings" | ||
| "testing" | ||
| ) | ||
|
|
||
| // TestMemInfo tests parseMemInfo with a static meminfo string | ||
| func TestMemInfo(t *testing.T) { | ||
| const input = ` | ||
| MemTotal: 1 kB | ||
| MemFree: 2 kB | ||
| MemAvailable: 3 kB | ||
| SwapTotal: 4 kB | ||
| SwapFree: 5 kB | ||
| Malformed1: | ||
| Malformed2: 1 | ||
| Malformed3: 2 MB | ||
| Malformed4: X kB | ||
| ` | ||
|
|
||
| const KiB = 1024 | ||
|
|
||
| meminfo, err := parseMemInfo(strings.NewReader(input)) | ||
| if err != nil { | ||
| t.Fatal(err) | ||
| } | ||
| if meminfo.MemTotal != 1*KiB { | ||
| t.Fatalf("Unexpected MemTotal: %d", meminfo.MemTotal) | ||
| } | ||
| if meminfo.MemFree != 3*KiB { | ||
| t.Fatalf("Unexpected MemFree: %d", meminfo.MemFree) | ||
| } | ||
| if meminfo.SwapTotal != 4*KiB { | ||
| t.Fatalf("Unexpected SwapTotal: %d", meminfo.SwapTotal) | ||
| } | ||
| if meminfo.SwapFree != 5*KiB { | ||
| t.Fatalf("Unexpected SwapFree: %d", meminfo.SwapFree) | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.