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

Support native StoreKey in FilesystemStore #1489

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

KGrewal1
Copy link
Contributor

@KGrewal1 KGrewal1 commented Nov 21, 2024

Description

Please include a summary of the changes and the related issue. Please also
include relevant motivation and context.

Fixes # 1108

/claim #1108

Design Document

https://hackmd.io/@HPxqrI77Q02izyGstTHbdg/ByS50OhGJx

Type of change

Please delete options that aren't relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Passes all of current test suite

Checklist

  • [] Updated documentation if needed
  • Tests added/amended
  • bazel test //... passes locally
  • PR is contained in a single commit, using git amend see some docs

This change is Reviewable

@CLAassistant
Copy link

CLAassistant commented Nov 21, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

algora-pbc bot commented Nov 21, 2024

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe.

@KGrewal1
Copy link
Contributor Author

Unsure what is happening with the local runner on CI, seems to be a Tekton issue

Copy link
Collaborator

@MarcusSorealheis MarcusSorealheis left a comment

Choose a reason for hiding this comment

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

BTW, with the exception of the missing performance data, your design document is basically done. Thanks for the hardwork there. Now we just need to cover all the important areas of the code, in addition to including the perf data in the document.

nativelink-store/src/filesystem_store.rs Show resolved Hide resolved
nativelink-store/src/filesystem_store.rs Show resolved Hide resolved
nativelink-store/src/filesystem_store.rs Outdated Show resolved Hide resolved
@KGrewal1
Copy link
Contributor Author

As of PR #1536

cargo t -p nativelink-store                                                                                                                                                                                                                                                                                                 (base) 
warning: /home/kirpal/Documents/rust/nativelink/Cargo.toml: unused manifest key: workspace.cargo-features-manager
   Compiling serde_json v1.0.133
   Compiling h2 v0.4.7
   Compiling aws-smithy-http v0.60.11
   Compiling h2 v0.3.26
   Compiling aws-credential-types v1.2.1
   Compiling cbor-diag v0.1.12
   Compiling fred v10.0.1
   Compiling nativelink-config v0.5.3 (/home/kirpal/Documents/rust/nativelink/nativelink-config)
   Compiling opentelemetry v0.27.1
   Compiling aws-types v1.3.3
error[E0432]: unresolved import `thiserror`
  --> /home/kirpal/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opentelemetry-0.27.1/src/propagation/mod.rs:23:5
   |
23 | use thiserror::Error;
   |     ^^^^^^^^^ use of undeclared crate or module `thiserror`

   Compiling aws-sigv4 v1.2.6
   Compiling aws-smithy-checksums v0.60.13
error: cannot find attribute `error` in this scope
  --> /home/kirpal/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opentelemetry-0.27.1/src/propagation/mod.rs:67:3
   |
67 | #[error("Cannot {} from {}, {}", ops, message, propagator_name)]
   |   ^^^^^

For more information about this error, try `rustc --explain E0432`.
error: could not compile `opentelemetry` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

running on the previous commit (PR #1535 ) works so assume this broke with dependency upgrade

@KGrewal1
Copy link
Contributor Author

KGrewal1 commented Dec 13, 2024

Have a working (locally at least) version using the specified rename function to move old cache files from their previous location to under DigestFolder - specified function was chosen instead of async wrapper as felt it was choice of least suprise (would be odd if a rename function was specified but that part of the code used a different function)

@aaronmondal
Copy link
Member

aaronmondal commented Dec 13, 2024

assume this broke with dependency upgrade

I can reproduce with cargo. Working on finding a fix. In the meantime, the Bazel test still works.

bazel test ...

@KGrewal1
Copy link
Contributor Author

KGrewal1 commented Dec 13, 2024

assume this broke with dependency upgrade

I can reproduce with cargo. Working on finding a fix. In the meantime, the Bazel test still works.

bazel test ...

Thanks - managed to get a working version of the rename with no deadlock now (the advantage of cargo test was so I could have had more fine grained control of which tests to run / no-capture to see debug output, compared to bazel test //...)

allada
allada previously requested changes Dec 13, 2024
Copy link
Member

@allada allada left a comment

Choose a reason for hiding this comment

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

Thanks! :lgtm:

Reviewed 1 of 1 files at r13, all commit messages.
Reviewable status: 2 of 2 LGTMs obtained, and all files reviewed, and pending CI: Bazel Dev / macos-13, and 1 discussions need to be resolved


a discussion (no related file):
@aaronmondal, can you please double check this.

Copy link
Contributor Author

@KGrewal1 KGrewal1 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 2 LGTMs obtained, and all files reviewed, and 1 discussions need to be resolved


nativelink-store/src/filesystem_store.rs line 538 at r7 (raw file):

Previously, KGrewal1 (Kirpal Grewal) wrote…

I have removed this as the tests were working locally but failing in CI - corresponding test was oldest_entry_evicted_with_access_times_loaded_from_disk() that ensured that on startup only the newest file stayed in cache

Edit: think an old edit got stuck in reviewable

Copy link
Collaborator

@MarcusSorealheis MarcusSorealheis left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 2 of 2 LGTMs obtained, and all files reviewed, and 1 discussions need to be resolved

remove sort precondition

remove core panic import
Copy link
Member

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 2 files at r10, 1 of 1 files at r13, 1 of 1 files at r14, all commit messages.
Reviewable status: 2 of 2 LGTMs obtained, and all files reviewed, and pending CI: Analyze (javascript-typescript), Cargo Dev / ubuntu-22.04, Coverage, asan / ubuntu-22.04, pre-commit-checks, ubuntu-20.04 / stable, ubuntu-22.04, and 2 discussions need to be resolved


-- commits line 4 at r13:
nit: Looks like a leftover comment

Copy link
Member

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

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

@KGrewal1 Great work ❤️

Reviewable status: 2 of 2 LGTMs obtained, and all files reviewed, and pending CI: Bazel Dev / macos-13, Bazel Dev / macos-14, Bazel Dev / ubuntu-24.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Coverage, Installation / macos-13, Installation / macos-14, Installation / ubuntu-22.04, NativeLink.com Cloud / Remote Cache / macos-14, NativeLink.com Cloud / Remote Cache / ubuntu-24.04, Publish image, Publish nativelink-worker-init, Publish nativelink-worker-lre-cc, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (22.04), integration-tests (22.04), macos-13, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, windows-2022 / stable, and 2 discussions need to be resolved

@MarcusSorealheis MarcusSorealheis dismissed allada’s stale review December 13, 2024 21:49

Aaron double checked the work. We are now waiting for the CI to complete. Thanks everyone here.

@aaronmondal aaronmondal enabled auto-merge (squash) December 13, 2024 22:08
Copy link
Member

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 2 of 2 LGTMs obtained, and all files reviewed

@aaronmondal aaronmondal merged commit 679f068 into TraceMachina:main Dec 13, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants