Skip to content

serialization: skip ignored files before checking for symlinks#550

Merged
mihaimaruseac merged 1 commit intosigstore:mainfrom
spencerschrock:symlink-fix
Oct 14, 2025
Merged

serialization: skip ignored files before checking for symlinks#550
mihaimaruseac merged 1 commit intosigstore:mainfrom
spencerschrock:symlink-fix

Conversation

@spencerschrock
Copy link
Copy Markdown
Contributor

Summary

Ignored files aren't serialized, so they shouldn't raise a ValueError if allow_symlinks wasn't set.

Fixes #549

Checklist
  • All commits are signed-off, using DCO
  • All new code has docstrings and type annotations
  • All new code is covered by tests. Aim for at least 90% coverage. CI is configured to highlight lines not covered by tests.
  • Public facing changes are paired with documentation changes
  • Release note has been added to CHANGELOG.md if needed

@spencerschrock spencerschrock marked this pull request as ready for review October 14, 2025 19:02
@spencerschrock spencerschrock requested review from a team as code owners October 14, 2025 19:02
Comment on lines +114 to +119
if serialization.should_ignore(path, ignore_paths):
continue
serialization.check_file_or_directory(
path, allow_symlinks=self._allow_symlinks
)
if path.is_file() and not serialization.should_ignore(
path, ignore_paths
):
if path.is_file():
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had initially had this as a draft to see if we could use it to test the benchmark harness, but that doesn't support ignore paths

@spencerschrock spencerschrock marked this pull request as draft October 14, 2025 19:06
@spencerschrock spencerschrock marked this pull request as ready for review October 14, 2025 19:16
mihaimaruseac
mihaimaruseac previously approved these changes Oct 14, 2025
Comment thread CHANGELOG.md Outdated
Ignored files aren't serialized, so they shouldn't raise a ValueError if
allow_symlinks wasn't set.

Signed-off-by: Spencer Schrock <sschrock@google.com>
@mihaimaruseac mihaimaruseac enabled auto-merge (squash) October 14, 2025 20:21
@mihaimaruseac mihaimaruseac merged commit 29ad412 into sigstore:main Oct 14, 2025
51 checks passed
@spencerschrock spencerschrock deleted the symlink-fix branch October 14, 2025 20:27
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.

Symlink needs to be allowed for ignored paths

2 participants