moby icon indicating copy to clipboard operation
moby copied to clipboard

Move `pkg/archive` out of main module/repository

Open dmcgowan opened this issue 1 year ago • 3 comments

Description

Summary

Move pkg/archive out of the main module into its own repository

Currently relevant dependencies

github.com/docker/docker/pkg/archive
  ├ github.com/docker/docker/pkg/idtools
  ├ github.com/docker/docker/pkg/ioutils
  ├ github.com/docker/docker/pkg/pools
  ├ github.com/docker/docker/pkg/system
  ├ github.com/moby/patternmatcher
  ├ github.com/moby/sys/sequential
  └ github.com/moby/sys/userns

github.com/docker/docker/pkg/idtools
  └ github.com/moby/sys/user

github.com/docker/docker/pkg/ioutils (nothing relevant)

github.com/docker/docker/pkg/pools
  └ github.com/docker/docker/pkg/ioutils

github.com/docker/docker/pkg/system (nothing relevant)

Proposal and steps

  • [x] Copy relevant pkg/system functionality #49072
  • [ ] Remove parts of pkg/system only used for archive, pkg/system is not suitable for standalone library since most of the functionality is considered temporary until officially supported. pkg/system should become internal.
  • [x] Copy relevant pkg/ioutils, only used for one simple thing #49073
  • [ ] Copy relevant parts of pkg/pool to archive or move pool
  • [ ] Move pkg/idtools under github.com/moby/sys #49087
  • [x] Remove uses of pkg/errors https://github.com/moby/moby/pull/49101
  • [ ] Move pkg/archive to a new repository under github/moby

dmcgowan avatar Dec 11 '24 19:12 dmcgowan

Related / prior ticket;

  • https://github.com/moby/moby/issues/21700
  • related (epic); https://github.com/moby/moby/issues/32989

thaJeztah avatar Dec 11 '24 20:12 thaJeztah

I think you could close those older issues.

Do the steps I outline sound reasonable to you? I'll open them one at a time to make sure it make sense along the way and I can turn this issue into check boxes.

dmcgowan avatar Dec 11 '24 22:12 dmcgowan

Also opened a PR to remove use of pkg/errors; most errors were already using stdlib, and only 2 or 3 locations used pkg/errors; https://github.com/moby/moby/pull/49101

thaJeztah avatar Dec 16 '24 11:12 thaJeztah

All the prerequisites for the move are complete. The current plan is to create the new repo as https://github.com/moby/archive. We could also consider a name better than "archive" or possibly making it a sub-repo of an image specific repo similar to moby/sys. It does not belong in moby/sys though. Let me know if anyone has any thoughts or opinions, I'm going to prepare the new repo.

dmcgowan avatar Apr 01 '25 00:04 dmcgowan