builder-web: Added --cachedir CLI param for staging new vizs #102

Merged
rand merged 5 commits from 20220329_passing_separate_cache-dir into main 4 months ago
rand commented 5 months ago
Owner
There is no content yet.
rand added 2 commits 5 months ago
Poster
Owner

Intention is to pass a custom cache-dir when staging new vizs to test them - but still run up against the production data-dir

Intention is to pass a custom cache-dir when staging new vizs to test them - but still run up against the production data-dir
hannes reviewed 5 months ago
| `Linux -> "/var/lib/builder-web"
let default_cachedir =
default_datadir ^ "/_cache"
Poster
Owner

what if someone passes a datadir explicitly, but not a cache dir? then the cache dir will be default_datadir ^ /_cache, while I'd expect datadir ^ /_cache.

what if someone passes a datadir explicitly, but not a cache dir? then the cache dir will be `default_datadir ^ /_cache`, while I'd expect `datadir ^ /_cache`.
rand commented 5 months ago
Poster
Owner

Ah yes, good catch

Ah yes, good catch
rand marked this conversation as resolved
Owner

I don't quite understand the issue you're trying to solve... Is this related to what we talked about versioning and migration?

I don't quite understand the issue you're trying to solve... Is this related to what we talked about versioning and migration?
Poster
Owner

The scripts in packaging also need to be changed to optionally use this parameter

The scripts in `packaging` also need to be changed to optionally use this parameter
Poster
Owner

I don't quite understand the issue you're trying to solve... Is this related to what we talked about versioning and migration?

The issue is that we on shell.robur.io run a 'production' builder-web and a 'staging' builder-web - both running up against the same builds directory. This makes it possible to test a new version of builder-web with all the data.

The problem arises if one wants to test new visualizations @ staging and still use the same builds directory. Currently, if one changes the cache of vizs @ staging, one changes it for production too.

> I don't quite understand the issue you're trying to solve... Is this related to what we talked about versioning and migration? The issue is that we on shell.robur.io run a 'production' builder-web and a 'staging' builder-web - both running up against the same builds directory. This makes it possible to test a new version of builder-web with all the data. The problem arises if one wants to test new visualizations @ staging and still use the same builds directory. Currently, if one changes the cache of vizs @ staging, one changes it for production too.
rand added 1 commit 4 months ago
rand added 1 commit 4 months ago
hannes reviewed 4 months ago
let cachedir = match cachedir with
| Some c -> Fpath.v c
| None -> Fpath.(datadir / "_cache")
in
Poster
Owner

Option.value ~default:Fpath.(datadir / "_cache") cachedir

Option.value ~default:Fpath.(datadir / "_cache") cachedir
hannes marked this conversation as resolved
hannes reviewed 4 months ago
$ influx
$ port $ host
$ datadir $ cachedir $ configdir
) in
Poster
Owner

I find this indentation weird: I'd either fill until 80 chars or put a newline after/before each $.

I find this indentation weird: I'd either fill until 80 chars or put a newline after/before each `$`.
hannes marked this conversation as resolved
Owner

Great, looks good to me apart from minor nits. :)

Great, looks good to me apart from minor nits. :)
hannes added 1 commit 4 months ago
Owner

I added a commit addressing the minor nits. This is fine to merge!

I added a commit addressing the minor nits. This is fine to merge!
rand merged commit 2e601ac181 into main 4 months ago
hannes deleted branch 20220329_passing_separate_cache-dir 4 months ago
The pull request has been merged as 2e601ac181.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.