cube-js / cube

📊 Cube — The Semantic Layer for Building Data Applications
https://cube.dev
Other
17.85k stars 1.77k forks source link

Schema not updating in production mode #7877

Open ka-weihe opened 7 months ago

ka-weihe commented 7 months ago

When adding a new cube to the schema directory, we have that Cube will automatically update the schema in development mode, but in production mode the new Cube is only picked up on restarts. Is this a bug or a feature?

seatunneltrailuser commented 7 months ago

Yes, +1. Facing the same issue. We ran an instance with Dev mode, and another instance with non-development mode,. The Models created thru the UI (from the Dev Mode instance), is not getting listed with the API in the non-development mode, even though the same folders are mounted within the container (/cube/conf).

Any suggestion to refresh/reload automatically or via any API will greatly help us. Currently we are managing with restarting the non-development instance whenever a new model is created.

igorlukanin commented 6 months ago

Hi @ka-weihe @seatunneltrailuser 👋

Is this a bug or a feature?

This is definitely a feature or, better, intended behavior.

In production mode, Cube would not check if the data model files have been updated due to performance reasons. If you'd like to instruct Cube to reload data model files, please use repository_factory and schema_version.

igorlukanin commented 5 months ago

@ka-weihe @seatunneltrailuser Did my advice above help?