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

feat: add simplified locations config #280

Closed
wants to merge 12 commits into from
Closed

feat: add simplified locations config #280

wants to merge 12 commits into from

Conversation

mmalenic
Copy link
Member

@mmalenic mmalenic commented Dec 17, 2024

Closes #228

Kind of big but I think it's necessary - happy to split this into a few smaller PRs if easier. For now, I'm leaving the deploy directory alone. I'll do that when merging #270.

Features

  • add locations concept to config, and a simple way to writing location lists that includes file://, s3:// or http(s)://.
    • The first part of the location determines the storage, and everything in the path after determines the prefix which matches on ids. For example, s3://bucket/prefix says to find files in bucket when the request also contains the prefix - /reads/prefix/<id>.
    • Locations can be specified as either a single location, or a list of locations with [].
    • The regex-style of specifying locations is still available. Config that is considered "advanced" is separated into a module, which is reflected in the docs.
    • Most config options available before are still available, except use_data_server and data_server_path_prefix. use_data_server = false has been replaced with data_server = "None".
  • Config doesn't use flatten anymore and unknown config options are no longer allowed.

Refactor

  • Local config has been renamed to File.
  • File config only inherits scheme and authority values from the data_server now. It does not inherit the local_path.
  • Data server doesn't use data prefix anymore, which makes the mapping between the initial request and URL tickets clearer.

Fixes

  • Config file parsing properly errors when the path can't be found, instead of using default values.
  • Paths are joined with Pathbuf rather than string formating, so config values like file://data/path and file://data/path/ are equivalent.

Docs

  • Re-worked docs to include simplified locations first, with "advanced" config included later.

Build

  • Removed clippy from pre-commit as it can be quite slow.

@mmalenic mmalenic self-assigned this Dec 17, 2024
@mmalenic
Copy link
Member Author

Closing in favour of #284, #285, #286 and #287

@mmalenic mmalenic closed this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(config): reject unknown config options outright
1 participant