Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Import cgroup2 support & use generics to improve pparser's interface #7

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

dfinkel
Copy link
Collaborator

@dfinkel dfinkel commented Dec 6, 2024

  • Make pparser.LineKVFileParser generic and typesafe
    Improve type-safety by pulling in the recent changes making
    LineKVFileParser generic. This guarantees that the index that has been
    generated for one type cannot be used with another.

    This also lets us eliminate a runtime check that was verifying that the
    correct type was passed. (since that's now enforced at compile-time)

  • cgresolver: cgroup2 & cgroup1 resolution support
    Add a subpackage for resolving the relevant cgroup for a process, and
    finding a usable cgroup mount for that subsystem.

    In particular, this provides the ability to remove the rather
    problematic docker libcgroup implementation from our dependency-set.

  • cgrouplimits: add cgroup2 support
    Replace runc/libcontainer with the new cgresolver package, and implement
    support for parsing the cgroup2 quota/usage files. (to its credit,
    cgroup2 does have a standardized format)

  • Add an unexported .eq method to CPUTime
    This helper simplifies a couple test-conditions.

  • actions: update to go 1.22/1.23
    Also, bump actions/setup-go and actions/checkout to the latest
    available.

Improve type-safety by pulling in the recent changes making
LineKVFileParser generic. This guarantees that the index that has been
generated for one type cannot be used with another.

This also lets us eliminate a runtime check that was verifying that the
correct type was passed. (since that's now enforced at compile-time)
Add a subpackage for resolving the relevant cgroup for a process, and
finding a usable cgroup mount for that subsystem.

In particular, this provides the ability to remove the rather
problematic docker libcgroup implementation from our dependency-set.
Replace runc/libcontainer with the new cgresolver package, and implement
support for parsing the cgroup2 quota/usage files. (to its credit,
cgroup2 does have a standardized format)
This helper simplifies a couple test-conditions.
Also, bump actions/setup-go and actions/checkout to the latest
available.

Also bump staticcheck.
@dfinkel dfinkel force-pushed the import_cgroup2_and_type_changes_2024-12-06 branch from 9918cc8 to 869f771 Compare December 6, 2024 16:00
@dfinkel dfinkel merged commit ef52e45 into master Dec 6, 2024
6 checks passed
@dfinkel dfinkel deleted the import_cgroup2_and_type_changes_2024-12-06 branch December 6, 2024 16:52
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants