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

Fix loading of SymlinkNodes from the Store. #17549

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented Nov 15, 2022

When loading Directory protos from the Store, we were not loading their SymlinkNodes, which caused a mismatching digest when loading Snapshots which contain symlinks.

Fixes #17542.

@stuhood stuhood added the category:bugfix Bug fixes for released features label Nov 15, 2022
@@ -613,6 +613,19 @@ impl Store {
Some((path, file_node.digest.as_ref().unwrap().try_into().unwrap())),
)
}));
path_stats.extend(directory.symlinks.iter().map(move |link_node| {
Copy link
Member

Choose a reason for hiding this comment

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

I doubt we're adding more node types, but this is why I prefer match, so when we add new types it's obvious what needs to be updated

Copy link
Member Author

@stuhood stuhood Nov 15, 2022

Choose a reason for hiding this comment

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

Agreed. But this is a standard protobuf from REAPI, and it's not defined in terms of an enum.

@stuhood stuhood enabled auto-merge (squash) November 15, 2022 02:14
@stuhood stuhood merged commit 0a3d096 into pantsbuild:main Nov 15, 2022
@stuhood stuhood deleted the stuhood/roundtrip-symlinks branch November 15, 2022 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

experimental_shell_command can trigger consistent cache misses
3 participants