Skip to content

storage: include directories in artifact tarball#543

Merged
hiddeco merged 1 commit into
fluxcd:mainfrom
bigkevmcd:include-directories
Jan 20, 2022
Merged

storage: include directories in artifact tarball#543
hiddeco merged 1 commit into
fluxcd:mainfrom
bigkevmcd:include-directories

Conversation

@bigkevmcd

Copy link
Copy Markdown
Contributor

This changes the behaviour of archive generation to include directories.

The existing code skips anything that isn't a regular file, which means that symlinks and directories are excluded.

We want to be able to scan archives looking for specific directories, and having to split filenames and walk back trees can be buggy.

@hiddeco hiddeco added area/storage Storage related issues and pull requests enhancement New feature or request labels Jan 14, 2022
@hiddeco hiddeco changed the title Include directories storage: include directories in artifact tarbal Jan 14, 2022
@bigkevmcd bigkevmcd changed the title storage: include directories in artifact tarbal storage: include directories in artifact tarball Jan 14, 2022
@hiddeco

hiddeco commented Jan 14, 2022

Copy link
Copy Markdown
Member

Can you please rebase your PR on main instead of merging it in?

Comment thread controllers/storage_test.go

@hiddeco hiddeco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks @bigkevmcd 🙇

This avoids skipping the directories when generating the archive
tarball.

This makes it easier to scan directory trees.

Signed-off-by: Kevin McDermott <kevin@weave.works>

Ensure that directories are included.

This avoids skipping the directories when generating the archive
tarball.

This makes it easier to scan directory trees.

Signed-off-by: Kevin McDermott <kevin@weave.works>
@hiddeco hiddeco merged commit d1ab4d7 into fluxcd:main Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/storage Storage related issues and pull requests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants