-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Import docker util #585
Import docker util #585
Conversation
d865a71
to
07c1d4e
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.
Left a couple of questions
Gopkg.lock
Outdated
@@ -14,6 +14,12 @@ | |||
revision = "d80d0f562a71fa2380fbeccc93ba5a2e325606e4" | |||
|
|||
[[projects]] | |||
branch = "dd" | |||
name = "github.com/DataDog/gopsutil" |
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.
why using our fork?
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.
No idea, that's from Burito, let's keep it but TODO the import to look at that later
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.
It's only used in https://github.com/DataDog/datadog-agent/pull/585/files#diff-4cb70d936cc68773b962af0958609444R460, can we try to use the upstream? That method is supported and we can avoid adding a dependency
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.
seconded, if it's possible to use upstream that would be best.
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.
build and tests OK with upstream repo, changed it
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.
we have a long-running goal to get back in sync with upstream. We added a new AllProcesses
API to efficiently get all the processes without doing the same work several times. With the gopsutil API as-is it's super inefficient. But they seem generally open to supporting it upstream, we just have to get to it: shirou/gopsutil#413
|
||
// Copied from https://github.com/DataDog/datadog-process-agent/blob/e44b0de7b9eb7f05c96a2dbf91e763e931bf6174/util/docker/cgroup.go | ||
// FIXME: merge back these utils | ||
package docker |
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.
should we put this module as well behind the docker
build flag? (same for other modules in this package)
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.
The docker.go
file is behind that build flag because it imports the docker lib, but this file is mostly docker-agnostic, does not import external files and could eventually be used for rkt monitoring.
I'm ok adding the docker build flag to reduce compilation times in puppy, then eventually move it to its own util/cgroup
package
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.
Let's keep it like it is
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.
this is great
Bumps [helm/chart-releaser-action](https://github.com/helm/chart-releaser-action) from 1.3.0 to 1.4.0. - [Release notes](https://github.com/helm/chart-releaser-action/releases) - [Commits](helm/chart-releaser-action@v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: helm/chart-releaser-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
What does this PR do?
Import and improve the docker class from util.
Motivation
The goal is to build a docker check upon it.