Skip to content
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

[WIP] archive: LCOW refactor (rebased) #41294

Closed
wants to merge 2 commits into from

Conversation

thaJeztah
Copy link
Member

rebase of #39386, relates to #39533. Just rebased to see where/how this failed, as CI logs were gone

Big refactor with containerfs to remove duplicate code from LCOW
Deletes lot of dead code in the process.

TODO: fix tests that relied on those functions/types.

@thaJeztah thaJeztah added status/2-code-review area/lcow Issues and PR's related to the experimental LCOW feature kind/refactor PR's that refactor, or clean-up code labels Jul 29, 2020
@AkihiroSuda
Copy link
Member

relates to #39533.

What's the goal of this PR? IIUC we are going to remove LCOW codes after this refactoring?

@thaJeztah
Copy link
Member Author

I was mostly curious how much work was left to get this finished, as it removed quite some code (so less to maintain?). As to removing LCOW; that mostly depends on how much bandwidth we have to work on that. I opened #40766 some time back to allow disabling the functionality, after which if could be possible to start working on removing it.

ISTR there were still some uses of LCOW by Microsoft, but if they want the functionality to remain, I guess some help would be needed to maintain the code.

@thaJeztah
Copy link
Member Author

These are the failures;

[2020-07-29T14:21:29.522Z] WARN [runner] Can't run linter unused: buildssa: analysis skipped: errors in package:

/go/src/github.com/docker/docker/integration/plugin/authz/authz_plugin_test.go:397:26: CopyInfoSourcePath not declared by package archive
/go/src/github.com/docker/docker/integration/plugin/authz/authz_plugin_test.go:399:29: TarResource not declared by package archive
/go/src/github.com/docker/docker/integration/plugin/authz/authz_plugin_test.go:403:42: PrepareArchiveCopy not declared by package archive
/go/src/github.com/docker/docker/integration/plugin/authz/authz_plugin_test.go:403:90: CopyInfo not declared by package archive]
[2020-07-29T14:25:47.506Z] === Failed
[2020-07-29T14:25:47.506Z] === FAIL: pkg/chrootarchive TestChrootTarUntarWithSymlink (0.36s)
[2020-07-29T14:25:47.506Z] panic: runtime error: invalid memory address or nil pointer dereference [recovered]
[2020-07-29T14:25:47.506Z] 	panic: runtime error: invalid memory address or nil pointer dereference
[2020-07-29T14:25:47.506Z] [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x239484]
[2020-07-29T14:25:47.506Z]
[2020-07-29T14:25:47.506Z] goroutine 22 [running]:
[2020-07-29T14:25:47.506Z] testing.tRunner.func1(0xc0000a4500)
[2020-07-29T14:25:47.506Z] 	/usr/local/go/src/testing/testing.go:874 +0x41a
[2020-07-29T14:25:47.506Z] panic(0x30dc40, 0x5b6140)
[2020-07-29T14:25:47.506Z] 	/usr/local/go/src/runtime/panic.go:679 +0x1d4
[2020-07-29T14:25:47.506Z] github.com/docker/docker/pkg/archive.(*Archiver).TarUntar(0xc00005a380, 0xc000018380, 0x36, 0xc000018a40, 0x37, 0x0, 0x0)
[2020-07-29T14:25:47.506Z] 	/go/src/github.com/docker/docker/pkg/archive/archive.go:1085 +0x104
[2020-07-29T14:25:47.506Z] github.com/docker/docker/pkg/chrootarchive.TarUntar(...)
[2020-07-29T14:25:47.506Z] 	/go/src/github.com/docker/docker/pkg/chrootarchive/archive_test.go:29
[2020-07-29T14:25:47.506Z] github.com/docker/docker/pkg/chrootarchive.TestChrootTarUntarWithSymlink(0xc0000a4500)
[2020-07-29T14:25:47.506Z] 	/go/src/github.com/docker/docker/pkg/chrootarchive/archive_test.go:192 +0x3ce
[2020-07-29T14:25:47.506Z] testing.tRunner(0xc0000a4500, 0x379488)
[2020-07-29T14:25:47.506Z] 	/usr/local/go/src/testing/testing.go:909 +0xd6
[2020-07-29T14:25:47.506Z] created by testing.(*T).Run
[2020-07-29T14:25:47.506Z] 	/usr/local/go/src/testing/testing.go:960 +0x36c
[2020-07-29T14:25:47.506Z] FAIL	github.com/docker/docker/pkg/chrootarchive	0.363s
[2020-07-29T14:25:47.506Z]
[2020-07-29T14:25:47.506Z]
[2020-07-29T14:25:47.506Z] === Errors
[2020-07-29T14:25:47.506Z] pkg/archive/archive_test.go:36:5: defaultArchiver redeclared in this block
[2020-07-29T14:25:47.506Z] 	previous declaration at pkg/archive/archive.go:78
[2020-07-29T14:25:47.506Z] pkg/archive/archive_unix_test.go:125:15: undefined: TarResourceRebase
[2020-07-29T14:25:47.506Z] pkg/archive/archive_unix_test.go:130:13: undefined: RebaseArchiveEntries
[2020-07-29T14:25:47.506Z] pkg/archive/archive_unix_test.go:264:12: undefined: CopyInfo

@thaJeztah thaJeztah force-pushed the archive_refactor_lcow_rebase branch 2 times, most recently from 3d52ef5 to 6963ca3 Compare July 26, 2021 07:01
Tibor Vass added 2 commits August 7, 2021 18:41
Deletes lot of dead code in the process.

TODO: fix tests that relied on those functions/types.

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
@thaJeztah thaJeztah force-pushed the archive_refactor_lcow_rebase branch from 6963ca3 to aacd97d Compare August 7, 2021 16:42
@thaJeztah thaJeztah closed this Dec 6, 2022
@thaJeztah thaJeztah deleted the archive_refactor_lcow_rebase branch December 6, 2022 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/lcow Issues and PR's related to the experimental LCOW feature kind/refactor PR's that refactor, or clean-up code status/2-code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants