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

Disable xattrs by default #1133

Merged
merged 1 commit into from
Mar 30, 2024
Merged

Conversation

sondavidb
Copy link
Contributor

@sondavidb sondavidb commented Mar 23, 2024

Issue #, if available:
Followup to #1021

Description of changes:
#1021 introduced a check to not call GetXAttrs() and related calls, as well as building an index with these annotations. This behavior was opt-out by default. As it generally increases performance, this PR changes this to be default behavior.

This also removes the need for the Optimizations structure in the CLI, thus it was removed.

Testing performed:
make test. Additionally made some indexes and confirmed the flag created/didn't create the annotations based on expectation.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sondavidb sondavidb requested a review from a team as a code owner March 23, 2024 00:26
fs/layer/layer.go Outdated Show resolved Hide resolved
fs/layer/layer.go Outdated Show resolved Hide resolved
@sondavidb sondavidb force-pushed the disable-xattrs branch 2 times, most recently from b8da58b to 85f2e91 Compare March 25, 2024 21:37
Copy link
Contributor

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, thanks for carrying this forward. Let's add some more for the documentation of XAttrs in CLI and configuration.

cmd/soci/commands/create.go Outdated Show resolved Hide resolved
config/fs.go Outdated Show resolved Hide resolved
soci/soci_index.go Outdated Show resolved Hide resolved
fs/layer/layer.go Outdated Show resolved Hide resolved
soci/soci_index.go Outdated Show resolved Hide resolved
soci/soci_index.go Outdated Show resolved Hide resolved
@sondavidb sondavidb force-pushed the disable-xattrs branch 2 times, most recently from c239579 to f66d57b Compare March 25, 2024 22:54
soci/soci_index.go Outdated Show resolved Hide resolved
@sondavidb sondavidb force-pushed the disable-xattrs branch 3 times, most recently from 69fcf67 to 1d2ca38 Compare March 26, 2024 17:25
austinvazquez
austinvazquez previously approved these changes Mar 26, 2024
Copy link
Contributor

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, happy with how this turned out. Great work.

config/config.toml Outdated Show resolved Hide resolved
cmd/soci/commands/create.go Outdated Show resolved Hide resolved
soci/soci_index.go Outdated Show resolved Hide resolved
docs/cli-usage.md Outdated Show resolved Hide resolved
henry118
henry118 previously approved these changes Mar 28, 2024
Copy link
Member

@henry118 henry118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

cmd/soci/commands/create.go Outdated Show resolved Hide resolved
docs/cli-usage.md Outdated Show resolved Hide resolved
config/fs.go Outdated Show resolved Hide resolved
Change --optimizations xattr to be default behavior, and add a new flag
to disable this annotation when creating a SOCI index.

This change also eliminated the need for the optimizations structure in
the CLI.

Signed-off-by: David Son <davbson@amazon.com>
@sondavidb
Copy link
Contributor Author

sondavidb commented Mar 29, 2024

After some discussion, we decided to remove the TOML variable to ignore this at runtime. Instead, should users wish to force xattrs to be enabled, they must recreate a new SOCI index with the flag disabled. This is done for clarity on the developer side, and users are very unlikely to want to turn off this behavior anyway.

@austinvazquez austinvazquez merged commit 2a70d12 into awslabs:main Mar 30, 2024
7 checks passed
@sondavidb sondavidb deleted the disable-xattrs branch April 3, 2024 20:13
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.

4 participants