-
Notifications
You must be signed in to change notification settings - Fork 125
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
Make stores and schedulers lists of named specs #1496
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 LGTMs obtained, and 0 of 14 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, Local / 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, Web Platform Deployment / macos-14, Web Platform Deployment / ubuntu-24.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (22.04), integration-tests (22.04), macos-13, pre-commit-checks, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, windows-2022 / stable (waiting on @allada)
This is amazing but will obviously need a lot of testing. We also need to document a migration path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 LGTMs obtained, and 0 of 14 files reviewed, and pending CI: Remote / large-ubuntu-22.04, and 1 discussions need to be resolved
nativelink-config/src/cas_server.rs
line 728 at r1 (raw file):
/// List of stores available to use in this config. /// The keys can be used in other configs when needing to reference a store. pub stores: Vec<StoreConfig>,
Lets make this backwards compatible by making it a custom type that is a wrapper around Vec<StoreConfig>
, but has a custom decoder that will be able to translate either Vec<StoreConfig>
or Map<StoreRefName, StoreSpec>
and throw a runtime deprecation warning if the user needs to migrate.
a5dabb5
to
8056275
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to document a migration path.
Done. Using the old config scheme now prints a big warning message with an example of how to migrate.
Reviewable status: 0 of 1 LGTMs obtained, and 0 of 17 files reviewed, and pending CI: Coverage, Local / ubuntu-22.04, Publish image, Publish nativelink-worker-init, Web Platform Deployment / macos-14, Web Platform Deployment / ubuntu-24.04, docker-compose-compiles-nativelink (22.04), integration-tests (22.04), pre-commit-checks, ubuntu-20.04 / stable, ubuntu-22.04 / stable, vale, and 1 discussions need to be resolved (waiting on @allada)
nativelink-config/src/cas_server.rs
line 728 at r1 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
Lets make this backwards compatible by making it a custom type that is a wrapper around
Vec<StoreConfig>
, but has a custom decoder that will be able to translate eitherVec<StoreConfig>
orMap<StoreRefName, StoreSpec>
and throw a runtime deprecation warning if the user needs to migrate.
Done.
To migrate, change your config like this (similar for schedulers): ``` // Old: "stores": { "SOMESTORE": { "memory": {} } } // New: "stores": [ { "name": "SOMESTORE", "memory": {} } ] ``` For now this is not a breaking change, but a backwards compatible one. The backwards-compatibility code will be removed after the next release in a breaking change. Closes TraceMachina#834
8056275
to
d80dd7b
Compare
To migrate, change your config like this (similar for schedulers):
Closes #834
This change is