Skip to content

Comments

remove pkg/aaparser, and inline remaining functionality in profiles/apparmor#47005

Merged
AkihiroSuda merged 2 commits intomoby:masterfrom
thaJeztah:remove_pkg_aaparser
Jan 2, 2024
Merged

remove pkg/aaparser, and inline remaining functionality in profiles/apparmor#47005
AkihiroSuda merged 2 commits intomoby:masterfrom
thaJeztah:remove_pkg_aaparser

Conversation

@thaJeztah
Copy link
Member

relates to

pkg/aaparser: remove deprecated GetVersion utility

Commit e3e7156 (included in v24.0.0 through
bfffb09) deprecated GetVersion, as it was no
longer used.

This patch removes the deprecated utility, and inlines the remaining code into
the LoadProfile function.

pkg/aaparser: remove, and integrate into profiles/apparmor

This package provided utilities to obtain the apparmor_parser version, as well
as loading a profile.

Commit e3e7156 (included in v24.0.0 through
bfffb09) deprecated GetVersion, as it was no
longer used, which made LoadProfile the only utility remaining in this package.

LoadProfile appears to have no external consumers, and the only use in our code
is "profiles/apparmor"; https://grep.app/search?q=github.com/docker/docker/pkg/aaparser

This patch moves the remaining code (LoadProfile) to profiles/apparmor as a
non-exported function, and deletes the package.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Commit e3e7156 (included in v24.0.0 through
bfffb09) deprecated GetVersion, as it was no
longer used.

This patch removes the deprecated utility, and inlines the remaining code into
the LoadProfile function.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added this to the 25.0.0 milestone Jan 2, 2024
@thaJeztah thaJeztah mentioned this pull request Jan 2, 2024
79 tasks
@thaJeztah
Copy link
Member Author

thaJeztah commented Jan 2, 2024

Hmmm... some hiccup with Docker Hub?

=== FAIL: client TestIntegration (1.00s)
time="2024-01-02T13:26:29Z" level=info msg="trying next host - response was http.StatusNotFound" host="localhost:41125"
    run.go:266: copied docker.io/amd64/alpine:latest@sha256:25fad2a32ad1f6f510e528448ae1ec69a28ef81916a004d3629874104f8a7f70 to local mirror localhost:41125/library/alpine:latest
time="2024-01-02T13:26:29Z" level=info msg="trying next host - response was http.StatusNotFound" host="localhost:41125"
    run.go:266: copied docker.io/tonistiigi/test:nolayers to local mirror localhost:41125/tonistiigi/test:nolayers
    run.go:161: 
        	Error Trace:	/src/util/testutil/integration/run.go:161
        	            				/src/client/client_test.go:220
        	            				/src/client/client_test.go:90
        	Error:      	Received unexpected error:
        	            	unexpected status from HEAD request to https://registry-1.docker.io/v2/cpuguy83/buildkit-foreign/manifests/latest: 502 Bad Gateway
        	Test:       	TestIntegration

Or maybe it's the mirroring that went whoops?

@thaJeztah thaJeztah self-assigned this Jan 2, 2024
This package provided utilities to obtain the apparmor_parser version, as well
as loading a profile.

Commit e3e7156 (included in v24.0.0 through
bfffb09) deprecated GetVersion, as it was no
longer used, which made LoadProfile the only utility remaining in this package.

LoadProfile appears to have no external consumers, and the only use in our code
is "profiles/apparmor".

This patch moves the remaining code (LoadProfile) to profiles/apparmor as a
non-exported function, and deletes the package.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the remove_pkg_aaparser branch from 4f59213 to 6fae583 Compare January 2, 2024 14:16
@thaJeztah
Copy link
Member Author

Hm... I think Docker Hub may not be entirely happy;

--------------------
  26 |     
  27 |     # cross compilation helper
  28 | >>> FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
  29 |     
  30 |     # dummy stage to make sure the image is built for deps that don't support some
--------------------
ERROR: failed to solve: tonistiigi/xx:1.2.1: unexpected status from HEAD request to https://registry-1.docker.io/v2/tonistiigi/xx/manifests/1.2.1: 502 Bad Gateway
Error: buildx bake failed with: ERROR: failed to solve: tonistiigi/xx:1.2.1: unexpected status from HEAD request to https://registry-1.docker.io/v2/tonistiigi/xx/manifests/1.2.1: 502 Bad Gateway

@thaJeztah thaJeztah requested a review from neersighted January 2, 2024 17:00
@AkihiroSuda AkihiroSuda merged commit b7ba061 into moby:master Jan 2, 2024
@thaJeztah thaJeztah deleted the remove_pkg_aaparser branch January 2, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants