lumen
lumen copied to clipboard
Ensure schema cache gets cleaned up and generally re-envision caching
Currently aSource
can be given a cache_dir
in the yaml spec:
cache_dir: ./cache
this enables caching of the data and the computed JSON schema describing the data. Both are stored in the directory and then are used to reload the data (if either --dev
or --autoreload
are set). It seems in certain cases the data may be refreshed but the schema file is not, which can result in mismatches between the two which can make it appear like certain filter fields are not available (because filters are created from the schema).
It's not entirely clear to me under which condition this can happen, since generally the entire cache_dir
is deleted in one go so we'd have to some experimenting here.
When I run lumen serve examples/bikes/dashboard.yaml --show
for the first time in the repo I get these warnings:
WARNING:param.occupancy: Could not cache 'occupancy' to parquetfile. Error during saving process: [Errno 21] Failed to open local file '/Users/mliquet/work/dev/lumen/examples/bikes/cache/occupancy.parq'. Detail: [errno 21] Is a directory
2021-09-20 10:22:00,409 Could not cache 'occupancy' to parquetfile. Error during saving process: [Errno 21] Failed to open local file '/Users/mliquet/work/dev/lumen/examples/bikes/cache/occupancy.parq'. Detail: [errno 21] Is a directory
@maximlt the problem you are seeing should be fixed by #305
Cannot reproduce these issues anymore.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.