Title: fix: Auto-detect GCS/S3 registry store when registry is passed as string by jiwidi · Pull Request #6260 · feast-dev/feast · GitHub
Open Graph Title: fix: Auto-detect GCS/S3 registry store when registry is passed as string by jiwidi · Pull Request #6260 · feast-dev/feast
X Title: fix: Auto-detect GCS/S3 registry store when registry is passed as string by jiwidi · Pull Request #6260 · feast-dev/feast
Description: Problem When passing registry="gs://bucket/feast/registry.pb" as a string to RepoConfig, Feast always creates a file-based RegistryConfig (hardcoded at repo_config.py line ~402). This ignores the URI scheme and causes FileRegistryStore to be used, which cannot handle gs:// paths — pathlib.Path("gs://...") is not treated as absolute, leading to IsADirectoryError at runtime. The RegistryConfig docstring states: If registry_type is 'file', then can be a local path, or remote object storage path, e.g. a GCS URI But FileRegistryStore uses pathlib.Path which doesn't support GCS URIs. Meanwhile, Registry.__init__ already has correct scheme-based auto-detection via get_registry_store_class_from_scheme() and REGISTRY_STORE_CLASS_FOR_SCHEME = {"gs": "GCSRegistryStore", ...} — it just never gets a chance because the RegistryConfig is pre-wrapped as "file" type. Root Cause In RepoConfig.registry property, the elif isinstance(self.registry_config, str) branch hardcodes: self._registry = get_registry_config_from_type("file")(path=self.registry_config) This wraps the path in a file-type config regardless of the URI scheme. Reproduction from feast.repo_config import RepoConfig config = RepoConfig( project="test", provider="gcp", registry="gs://my-bucket/feast/registry.pb", online_store={"type": "redis", "connection_string": "localhost:6379"}, entity_key_serialization_version=3, ) # Before fix: config.registry.registry_store_type is implicitly "file" # -> FileRegistryStore -> Path("gs://...").is_absolute() == False # -> joins with repo_path -> IsADirectoryError # After fix: config.registry.registry_store_type is None # -> Registry.__init__ auto-detects GCSRegistryStore from scheme Fix In RepoConfig.registry property, when registry is a string, create a plain RegistryConfig(path=...) instead of hardcoding get_registry_config_from_type("file"). This preserves registry_store_type=None, letting the existing auto-detection in Registry.__init__ select the correct store class based on the URI scheme. Local file paths continue to work because registry_type defaults to "file" in RegistryConfig, and get_registry_store_class_from_scheme maps the file scheme (and schemeless paths) to FileRegistryStore. Tests Added test_registry_string_config.py with 11 tests covering: GCS/S3/local string registry → correct RegistryConfig with registry_store_type=None Dict registry (existing behavior preserved) REGISTRY_STORE_CLASS_FOR_SCHEME maps gs→GCS, s3→S3, file→File Unknown schemes raise pathlib.Path cannot handle cloud URIs (documenting the underlying issue)
Open Graph Description: Problem When passing registry="gs://bucket/feast/registry.pb" as a string to RepoConfig, Feast always creates a file-based RegistryConfig (hardcoded at repo_config.py line ~402). This ign...
X Description: Problem When passing registry="gs://bucket/feast/registry.pb" as a string to RepoConfig, Feast always creates a file-based RegistryConfig (hardcoded at repo_config.py line ~402). ...
Opengraph URL: https://github.com/feast-dev/feast/pull/6260
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:12ebba5c-98ae-822c-93ce-0482bc8e8f65 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8F8A:1FFDFF:1D250D0:27E81ED:6A4F2B3C |
| html-safe-nonce | 8187bac18150cf548b7fcca29e7a3f280518f89202d63cc6e2491ce81d5edbf2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjhBOjFGRkRGRjoxRDI1MEQwOjI3RTgxRUQ6NkE0RjJCM0MiLCJ2aXNpdG9yX2lkIjoiMTU2OTY4OTQwMDMyOTA1NTAzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c60eaaa147b60a2544de1fdce683bdad8a52b9b51dfe8965d5ca2e50bf8d85e2 |
| hovercard-subject-tag | pull_request:3517519863 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6260/files |
| twitter:image | https://avatars.githubusercontent.com/u/10882086?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10882086?s=400&v=4 |
| og:image:alt | Problem When passing registry="gs://bucket/feast/registry.pb" as a string to RepoConfig, Feast always creates a file-based RegistryConfig (hardcoded at repo_config.py line ~402). This ign... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width