From 682c4feee39b72eb34338e6148c580359a343afc Mon Sep 17 00:00:00 2001 From: Aaron Siddhartha Mondal Date: Sun, 17 Mar 2024 02:40:54 +0000 Subject: [PATCH] Unbreak CI (#769) Breakages were caused by a formatting issue and caching issues. --- .github/workflows/nix.yaml | 14 ++++++++------ .../src/completeness_checking_store.rs | 10 +++++----- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml index 0191d3eec..8f7b6fc94 100644 --- a/.github/workflows/nix.yaml +++ b/.github/workflows/nix.yaml @@ -34,12 +34,14 @@ jobs: uses: >- # Custom commit, last pinned at 2024-03-03. DeterminateSystems/magic-nix-cache-action@742d8701e54851d2136f71b61d31382a4f4d0788 - - name: Mount bazel cache - uses: >- # v4.0.1 - actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 - with: - path: "~/.cache/bazel" - key: ${{ runner.os }}-bazel-nix + # TODO(aaronmondal): Figure out why this cache breaks CI. + # See: https://github.com/TraceMachina/nativelink/issues/772 + # - name: Mount bazel cache + # uses: >- # v4.0.1 + # actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + # with: + # path: "~/.cache/bazel" + # key: ${{ runner.os }}-bazel-nix - name: Invoke Bazel build in Nix shell run: | diff --git a/nativelink-store/src/completeness_checking_store.rs b/nativelink-store/src/completeness_checking_store.rs index 687d7c4b0..35360319c 100644 --- a/nativelink-store/src/completeness_checking_store.rs +++ b/nativelink-store/src/completeness_checking_store.rs @@ -89,11 +89,11 @@ async fn check_output_directories( let tree = get_and_decode_digest::(cas_store, &tree_digest).await?; // TODO(allada) When `try_collect()` is stable we can use it instead. // https://github.com/rust-lang/rust/issues/94047 - let mut digest_iter = tree - .children - .into_iter() - .chain(tree.root) - .flat_map(|dir| dir.files.into_iter().filter_map(|f| f.digest.map(DigestInfo::try_from))); + let mut digest_iter = tree.children.into_iter().chain(tree.root).flat_map(|dir| { + dir.files + .into_iter() + .filter_map(|f| f.digest.map(DigestInfo::try_from)) + }); let mut digest_infos = Vec::with_capacity(digest_iter.size_hint().1.unwrap_or(0)); digest_iter