lumen icon indicating copy to clipboard operation
lumen copied to clipboard

Ensure schema cache gets cleaned up and generally re-envision caching

Open philippjfr opened this issue 2 years ago • 2 comments

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.

philippjfr avatar Sep 13 '21 15:09 philippjfr

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 avatar Sep 20 '21 12:09 maximlt

@maximlt the problem you are seeing should be fixed by #305

hoxbro avatar Sep 01 '22 12:09 hoxbro

Cannot reproduce these issues anymore.

philippjfr avatar Dec 05 '22 19:12 philippjfr

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.

github-actions[bot] avatar Jul 11 '23 06:07 github-actions[bot]