Add possibility to install global environments#221
Conversation
pavelzw
left a comment
There was a problem hiding this comment.
could you write some documentation please?
|
Alright, so I took the option of having two separate caches. one for the global environment(s), one for project environment(s). Let me know if you are happy with this direction, or if you'd rather keep a single cache |
cf8555a to
a6201e7
Compare
a6201e7 to
12fbb6b
Compare
|
Sorry @pavelzw , I had missed your comment.
done. I'll update the pixi documention if / once merged |
5379e7c to
2a8128d
Compare
2a8128d to
c8b6bb6
Compare
pavelzw
left a comment
There was a problem hiding this comment.
sorry for the late reply @olivier-lacroix. i have a comment about the caching that we should discuss before i review the whole thing
src/options.ts
Outdated
| cache: parseOrUndefinedJSON('cache', z.boolean()), | ||
| cacheKey: parseOrUndefined('cache-key', z.string()), | ||
| projectCacheKey: parseOrUndefined('cache-key', z.string()), | ||
| globalCacheKey: parseOrUndefined('global-cache-key', z.string()), |
There was a problem hiding this comment.
thinking about this a bit more, i'm not sure a cache for pixi global install is a good idea...
pixi global install is inherently non-reproducible (prefix-dev/pixi#2292) and thus, having a cache for this will result in dependency drifting.
GitHub's cache will get evicted if it wasn't accessed for 7 days: https://docs.github.com/en/actions/reference/workflows-and-actions/dependency-caching#usage-limits-and-eviction-policy
This means that for medium-high-traffic repositories, the cache might never be evicted which will cause staleness and non-reproducibility.
the regular project cache doesn't have this issue because there, we use the lockfile (and some other things) for the hash.
with that in mind, i would prefer not to have a global-cache-key. also, pixi global install is usually fast enough that caching doesn't get you much anyway 😄
wdyt?
There was a problem hiding this comment.
Indeed. This being said, there will be cases where caching does give significant speed up. Gcloud, especially if some extra components are installed, is one such case.
what about a separate global-cache setting? Maybe a TTL option for that cache as well? And / or warnings about enabling that setting?
There was a problem hiding this comment.
However, I can pull out the cache part for now, and defer that to another PR / discussion
There was a problem hiding this comment.
Let's move that for now. This will also make the review smaller 😄
There was a problem hiding this comment.
I pulled the global cache out of this PR
575f020 to
680b283
Compare
680b283 to
cb48775
Compare
cb48775 to
f6e1490
Compare
|
@pavelzw this PR is ready for our review |
pavelzw
left a comment
There was a problem hiding this comment.
Mostly looks good, only small comments and then we can merge.
|
Thanks @pavelzw ! apologies, I was away and could not respond in time. |
If updating documentation:
closes #150