Skip to content

Add remote_provider = "..." option, replacing scheme-look-ups - #20240

Merged
huonw merged 6 commits into
mainfrom
huonw/19902-separate-provider
Jan 15, 2024
Merged

Add remote_provider = "..." option, replacing scheme-look-ups#20240
huonw merged 6 commits into
mainfrom
huonw/19902-separate-provider

Conversation

@huonw

@huonw huonw commented Nov 24, 2023

Copy link
Copy Markdown
Contributor

This replaces the over-complicated address URI scheme-based look-up from #19827 for deciding on which provider to use with just a normal option [GLOBAL].remote_provider. This defaults to reapi, to preserve the current (stable) behaviour.

That is, now, one can set:

[GLOBAL]
remote_provider = "experimental-file"
remote_store_address = "file:///..."

Or similar.

Another item in #19694

The commits are somewhat usefully broken up for review.

@huonw
huonw force-pushed the huonw/19902-separate-provider branch from 9b71329 to a9c19a8 Compare December 29, 2023 07:08
@huonw
huonw force-pushed the huonw/19902-separate-provider branch from a9c19a8 to 5479720 Compare December 30, 2023 05:02
// of truth.
#[derive(Clone, Copy, Debug, strum_macros::EnumString)]
#[strum(serialize_all = "kebab-case")]
pub enum RemoteProvider {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This enum is duplicated in both Rust and Python, but I think that happens elsewhere too (e.g. CacheContentBehavior), so it seems tolerable.

@huonw
huonw marked this pull request as ready for review December 30, 2023 06:51
@huonw
huonw requested review from stuhood and tgolsson December 30, 2023 06:51

@tgolsson tgolsson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, much cleaner and easy to read now.

@huonw
huonw enabled auto-merge (squash) January 15, 2024 21:30
@huonw
huonw merged commit c39fbd6 into main Jan 15, 2024
@huonw
huonw deleted the huonw/19902-separate-provider branch January 15, 2024 22:09
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.

2 participants