Skip to content

Conversation

@thaJeztah
Copy link

go.mod: remove toolchain directive

go.mod: update github.com/containerd/accelerated-container-image v1.2.x

Update the version of github.com/containerd/accelerated-container-image
to v1.2.0, which is the minimum version supporting containerd v2.

go.mod: update containerd dependency to stable v2.0.x

Updating to the v2.0.4 patch release as minimum, which includes
c8d@3d53430 to reduce some (indirect) dependencies, and c8d@f341477
to downgrade some unreleased versions of dependencies. The v2.0.4
release included a security fix for CVE-2024-40635, so updating to
that version to avoid potential security alerts. I did not update to
the latest version because this project is used as dependency for
other modules, and containerd v2.0.5 also updated the minimum Go version
to 1.23.

gofmt code

remove unused zdfsIsReady, pouchDirLock, blockEngine vars

These were added in the initial bc443fe
commit, but appear to be unused.

remove uses of deprecated io/ioutil

use filepath for joining file paths

On a Unix system, this doesn't make a big difference, but filepath.Join
is the preferred use for file paths (regardless if it's forward or backward
slashes). path.Join is still used for constructing URLs, which always use
forward slashes.

remove uses of github.com/pkg/errors in favor of stdlib

Use stdlib native error-wrapping so that we can remove the direct
dependency on github.com/pkg/errors.

update and fix tests

Update tests to use designated rfc6761 test domains; the tests didn't
require an actual domain to resolve; for such cases, it's generally
recommended to use rfc6761 designated domains.

Also:

  • fix TestParse: the test was only printing the result, but didn't
    test it to be correct.
  • use consts for fixed values
  • remove uses of testify: the tests currently only used a very minimal
    subset of its functionality, so replacing it with stdlib to reduce
    the dependency tree.
  • remove hard-coded temp-dir from test. Use t.TempDir() to provide
    the path and to clean up after the test if anything would fail.

replace direct uses of logrus for containerd/log

This allows consumers of this module to use the context-logger that's
defined through containerd's log package. If no logger is defined, it
uses logrus' standard logger.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Update the version of github.com/containerd/accelerated-container-image
to v1.2.0, which is the minimum version supporting containerd v2.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Updating to the v2.0.4 patch release as minimum, which includes
[c8d@3d53430] to reduce some (indirect) dependencies, and [c8d@f341477]
to downgrade some unreleased versions of dependencies. The v2.0.4
release included a security fix for [CVE-2024-40635], so updating to
that version to avoid potential security alerts. I did not update to
the latest version because this project is used as dependency for
other modules, and containerd v2.0.5 also updated the minimum Go version
to 1.23.

[c8d@3d53430]: containerd/containerd@3d53430
[c8d@f341477]: containerd/containerd@f341477
[CVE-2024-40635]: GHSA-265r-hfxg-fhmg

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
These were added in the initial bc443fe
commit, but appear to be unused.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
On a Unix system, this doesn't make a big difference, but filepath.Join
is the preferred use for file paths (regardless if it's forward or backward
slashes). path.Join is still used for constructing URLs, which always use
forward slashes.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Use stdlib native error-wrapping so that we can remove the direct
dependency on github.com/pkg/errors.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Update tests to use designated rfc6761 test domains; the tests didn't
require an actual domain to resolve; for such cases, it's generally
recommended to use [rfc6761] designated domains.

Also:

- fix TestParse: the test was only printing the result, but didn't
  test it to be correct.
- use consts for fixed values
- remove uses of testify: the tests currently only used a very minimal
  subset of its functionality, so replacing it with stdlib to reduce
  the dependency tree.
- remove hard-coded temp-dir from test. Use `t.TempDir()` to provide
  the path and to clean up after the test if anything would fail.

[rfc6761]: https://www.rfc-editor.org/rfc/rfc6761.html#section-6.2

Signed-off-by: Sebastiaan van Stijn <[email protected]>
This allows consumers of this module to use the context-logger that's
defined through containerd's log package. If no logger is defined, it
uses logrus' standard logger.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Author

@BigVan @WaberZhuang PTAL

@thaJeztah
Copy link
Author

@BigVan @WaberZhuang PTAL 🫶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant