-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add package_cache_async
flag.
#1452
Add package_cache_async
flag.
#1452
Conversation
Thanks @ttrently ! Can you follow the instructions at https://github.com/AcademySoftwareFoundation/rez/pull/1452/checks?check_run_id=11526898738 to fix the DCO check please? |
cf3c234
to
f32b20a
Compare
A welcome addition. I want to add it should be implemented as a flag on For example:
|
Adds a `package_cachy_async` flag which allows users to run caching synchronously (blocking) or asynchronously from the config. Signed-off-by: ttrently <[email protected]>
Change _async to default True instead of False to mimic previous behavior. Signed-off-by: ttrently <[email protected]>
Renamed `add_variants_async` to `add_variants` as this method can now run with an `_async` flag. Signed-off-by: ttrently <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ttrently ! I think it could be a good idea to have a CLI flag, but I'm not sure what it should be named and to which commands it should apply. Any opinions?
@@ -269,6 +269,9 @@ | |||
# Enable package caching during a package build. | |||
package_cache_during_build = False | |||
|
|||
# Enable package caching to run asynchronously during a resolve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this hard to read. How about "set to false to always cache package payloads synchronously"?
Also, the linter is complaining: https://github.com/AcademySoftwareFoundation/rez/actions/runs/4245498949/jobs/7387520293#step:5:1 |
Fixes #1379.
Adds a
package_cachy_async
flag which allows users to run caching synchronously (blocking) or asynchronously from the config.This setting is set to
True
by default in the rezconfig so that behavior should act as normal. Setting this to false will block the resolve until all packages have been cached successfully.