fast-nail-55400
08/24/2021, 5:37 PMDigest
? I am trying to use syntax like the following to do so:
sources_digest = await Get(Digest, DigestSubset(sources_digest, PathGlobs(["!__sources__/go.sum", "**"])))
fast-nail-55400
08/24/2021, 5:38 PMMergeDigests
about conflicting files laterhundreds-father-404
08/24/2021, 5:39 PMfast-nail-55400
08/24/2021, 5:42 PM__sources_/go.sum
is still in the digestfast-nail-55400
08/24/2021, 5:45 PMGlobExpansionConjunction.all_match
?fast-nail-55400
08/24/2021, 5:49 PMfast-nail-55400
08/24/2021, 5:49 PMhundreds-father-404
08/24/2021, 6:01 PMDigestSubset
code is broken in Rustfast-nail-55400
08/24/2021, 6:12 PM["!**/go.sum", "__sources__/**"]
works but just **
for the second glob didn’t work since go.sum was included in that casehundreds-father-404
08/24/2021, 6:17 PM["!__sources/go.sum", __sources__/**"]
?fast-nail-55400
08/24/2021, 6:19 PMfast-nail-55400
08/24/2021, 6:20 PMhundreds-father-404
08/24/2021, 6:21 PM**
but not __sources__/**
, interestingfast-nail-55400
08/24/2021, 6:21 PMhundreds-father-404
08/24/2021, 6:22 PMfast-nail-55400
08/24/2021, 6:22 PMhundreds-father-404
08/24/2021, 6:25 PMcurved-television-6568
08/24/2021, 8:47 PM$ git diff
diff --git a/src/rust/engine/fs/store/src/snapshot_ops_tests.rs b/src/rust/engine/fs/store/src/snapshot_ops_tests.rs
index f63575f8f..7361d6487 100644
--- a/src/rust/engine/fs/store/src/snapshot_ops_tests.rs
+++ b/src/rust/engine/fs/store/src/snapshot_ops_tests.rs
@@ -95,7 +95,7 @@ async fn subset_single_files() {
async fn subset_recursive_wildcard() {
let (store, tempdir, posix_fs, digester) = setup();
- let (merged_digest, _, _) = get_duplicate_rolands(
+ let (merged_digest, snapshot1, _) = get_duplicate_rolands(
store.clone(),
store.clone(),
tempdir.path(),
@@ -120,6 +120,15 @@ async fn subset_recursive_wildcard() {
.await
.unwrap();
assert_eq!(merged_digest, subset_roland2);
+
+ // ** should not include explicitly excluded files
+ let subset_params3 = make_subset_params(&["!subdir/roland2", "**"]);
+ let subset_roland3 = store
+ .clone()
+ .subset(merged_digest, subset_params3)
+ .await
+ .unwrap();
+ assert_eq!(subset_roland3, snapshot1.digest);
}
It fails, at least 😛
$ ./cargo test -p store subset
Compiling store v0.1.0 (/Users/aadt/src/github/kaos/pants/src/rust/engine/fs/store)
Finished test [unoptimized + debuginfo] target(s) in 8.02s
Running unittests (target/debug/deps/store-7c3fe3b7432a3083)
running 3 tests
test snapshot_ops_tests::subset_tracking_load_counts ... ok
test snapshot_ops_tests::subset_single_files ... ok
test snapshot_ops_tests::subset_recursive_wildcard ... FAILED
failures:
---- snapshot_ops_tests::subset_recursive_wildcard stdout ----
thread 'snapshot_ops_tests::subset_recursive_wildcard' panicked at 'assertion failed: `(left == right)`
left: `Digest { hash: Fingerprint<5ef2cabce63f0f081e2f6408900977366d5ae425510afe8e90b5f2a4d0f488fa>, size_bytes: 81 }`,
right: `Digest { hash: Fingerprint<eba4e5b1d239770d5a452a829ba4949cec691e7ff2e2805fd1e9123fe349fe62>, size_bytes: 80 }`', fs/store/src/snapshot_ops_tests.rs:131:3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
snapshot_ops_tests::subset_recursive_wildcard
test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured; 108 filtered out; finished in 0.12s
curved-television-6568
08/24/2021, 8:47 PMcurved-television-6568
08/24/2021, 8:48 PMcurved-television-6568
08/25/2021, 11:28 AMfast-nail-55400
08/26/2021, 2:43 PM