Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if self.cache_enabled: | ||
| try: | ||
| registry_proto = self._registry_store.get_registry_proto() | ||
| self.cached_registry_proto = registry_proto | ||
| self.cached_registry_proto_created = _utc_now() |
There was a problem hiding this comment.
Load registry before apply_project when cache is disabled
When cache_enabled is false, Registry.__init__ no longer loads the registry proto from the store, so cached_registry_proto stays as the empty default. apply_project (in registry.py, lines 1128–1146) mutates cached_registry_proto directly without calling _prepare_registry_for_changes, so if apply_project is invoked before any other write that loads the store, the subsequent commit() will overwrite the registry store with an almost-empty proto containing only the new project, dropping existing entities/feature views. This regression only occurs when cache_enabled is disabled and a registry already has data.
Useful? React with 👍 / 👎.
Motivation
Description
cache_enabledflag toRegistryConfigand default it toTrueso existing behavior remains unchanged while allowing disabling the cache via config.Registry,CachingRegistry,SqlRegistry,SnowflakeRegistry, andRemoteRegistry, add_should_use_cachehelpers, and short-circuit cache initialization and refresh logic when disabled.allow_cachetoself._allow_cache(allow_cache)inRemoteRegistryand return direct store results when caching is disabled.FeatureStorerefresh behavior and the transformation server async refresh to skip cache refresh whencache_enabledisFalse.Testing
make test-python-unitandmake test-python-integrationto validate behavior in their environments after enabling or disabling the flag.Codex Task