Skip to content
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 support for synchronous mode in rez-pkg-cache #1834

Closed
Closed
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
6380581
Remove Python2-related __future__ imports (#1640)
Pixel-Minions Sep 26, 2024
ab1b958
Remove the note about Python 2.7 compatibility from the docs (#1644)
Pixel-Minions Sep 26, 2024
a2a7348
Add support for virtualenv in installer
Pixel-Minions Sep 26, 2024
06eaccf
Run workflows when install script is modified
Pixel-Minions Sep 26, 2024
bc6d5e4
Add support for virtualenv in installer (#1645)
Pixel-Minions Feb 16, 2024
d09c08d
Remove rez.vendor.enum (#1649)
Pixel-Minions Sep 26, 2024
296583c
Add clear information on how to contact project maintainers (#1659)
Pixel-Minions Sep 26, 2024
037879c
Improve install docs by mentioning how to actually download rez (#1660)
Pixel-Minions Sep 26, 2024
9ce3e02
Remove rez.backport (#1634)
Pixel-Minions Sep 26, 2024
887d506
Upload test coverage to Codecov (#1671)
Pixel-Minions Sep 26, 2024
61512b8
Remove Python 2 support for utils/json.py (#1673)
Pixel-Minions Sep 26, 2024
85aaa8d
Add development environment docs (#1633)
Pixel-Minions Sep 26, 2024
4724700
Remove rez.utils.py23 and cleanup more python 2.7 leftovers (#1678)
Pixel-Minions Sep 26, 2024
7ed5ce6
Improve explicitness of help doc of --command on rez-env
Pixel-Minions Sep 26, 2024
0f1ac79
Address notes
Pixel-Minions Sep 26, 2024
5411af6
update sonarcloud python property (#1686)
Pixel-Minions Sep 26, 2024
fecb35a
Tick off several completed boxes in onboarding document (#1691)
Pixel-Minions Sep 26, 2024
df4cf31
Add retry mechanism when renaming folders on Windows (#1666)
Pixel-Minions Sep 26, 2024
3bc7c5d
Add -e/--editable flag to install script to create an editable instal…
Pixel-Minions Sep 26, 2024
98c4ea0
Apply package orderers on variants (#1684)
Pixel-Minions Sep 26, 2024
ccd8241
Add releasing packages documentation (#1689)
Pixel-Minions Sep 26, 2024
af46f92
Improve clarify of early binding functions documentation (#1677)
Pixel-Minions Sep 26, 2024
d3f0dd3
Bump version to 3.1.0 (#1702)
Pixel-Minions Sep 26, 2024
fe5fc96
Fix typo in "Releasing packages" docs (#1704)
Pixel-Minions Sep 26, 2024
6c5c395
Remove unnecessary variable assignment in rez.deprecations (#1696)
Pixel-Minions Sep 26, 2024
007d24f
Convert all plugin rezconfig to rezconfig.py (#1692)
Pixel-Minions Sep 26, 2024
a5a4b82
Add plugin documentation page (#1703)
Pixel-Minions Sep 26, 2024
4cd6fe9
Make gh-rez external link dynamic in the documentation (#1707)
Pixel-Minions Sep 26, 2024
89416b8
Add symlink locking for filesystems that do not support hardlinks (#1…
Pixel-Minions Sep 26, 2024
2c00fb0
Fix error caused by weakly referenced package not specifying version …
Pixel-Minions Sep 26, 2024
46089ac
Release 3.1.1 (#1719)
Pixel-Minions Sep 26, 2024
e7de86d
seed adopters list (#1720)
Pixel-Minions Sep 26, 2024
8407a07
updates to contributing.md for support, legal, versioning (#1721)
Pixel-Minions Sep 26, 2024
2038980
updates to release.md for release cadence and versioning used (#1722)
Pixel-Minions Sep 26, 2024
fadd2ba
fix adopters list formatting (#1726)
Pixel-Minions Sep 26, 2024
507850e
Run OpenSSF Scorecard in GitHub Actions workflow (#1730)
Pixel-Minions Sep 26, 2024
548aa01
Bump github/codeql-action from 3.25.1 to 3.25.3 (#1738)
Pixel-Minions Sep 26, 2024
bb7872b
Add date to vendored pika (#1743)
Pixel-Minions Sep 26, 2024
898a922
Add argcomplete vendored version to vendor README.md (#1742)
Pixel-Minions Sep 26, 2024
6448462
Fix CI for Python 3.7 on macOS by only running these tests on macos-1…
Pixel-Minions Sep 26, 2024
b30e478
Add more logic in the shell detection code to handle a case where the…
Pixel-Minions Sep 26, 2024
c011fa1
Fix formatting sonarcloud compliance issue (#1697)
Pixel-Minions Sep 26, 2024
ea1bc92
Upload test coverage even if tests fail (#1751)
Pixel-Minions Sep 26, 2024
7eddca3
Add new default_build_process setting to set the default build proces…
Pixel-Minions Sep 26, 2024
c1fc73e
Migrate plugin type settings to plugin rez configs so we can more eas…
Pixel-Minions Sep 26, 2024
d613670
Bump ossf/scorecard-action from 2.3.1 to 2.3.3 (#1752)
Pixel-Minions Sep 26, 2024
9662448
Bump github/codeql-action from 3.25.3 to 3.25.10 (#1770)
Pixel-Minions Sep 26, 2024
b6d2d73
Fix output so the %s is formatted with the exepath as intended (#1775)
Pixel-Minions Sep 26, 2024
19ae9d6
Don't expand tilde in REZ_USED_IMPLICIT_PACKAGES and REZ_USED_REQUEST…
Pixel-Minions Sep 26, 2024
eb7fce5
Add ability to cache package payloads synchronously (#1679)
Pixel-Minions Sep 26, 2024
431f0ef
Fix incorrect string operations on bytes output of subprocess causing…
Pixel-Minions Sep 26, 2024
6d985f1
Pin GH actions to commit hash as recommended by scorecard (#1781)
Pixel-Minions Sep 26, 2024
c2ec1b2
Restrict permissions in GHA workflows (#1782)
Pixel-Minions Sep 26, 2024
2aa7575
Bump actions/checkout from 4.1.1 to 4.1.7 (#1785)
Pixel-Minions Sep 26, 2024
24abaf8
Bump actions/upload-artifact from 4.3.2 to 4.3.3 (#1784)
Pixel-Minions Sep 26, 2024
c79f86e
Bump github/codeql-action from 3.25.10 to 3.25.11 (#1783)
Pixel-Minions Sep 26, 2024
a6576c6
Bump actions/upload-artifact from 4.3.3 to 4.3.4 (#1790)
Pixel-Minions Sep 26, 2024
1482bfd
Bump actions/download-artifact from 4.1.7 to 4.1.8 (#1789)
Pixel-Minions Sep 26, 2024
b2f8347
Bump github/codeql-action from 3.25.11 to 3.25.12 (#1795)
Pixel-Minions Sep 26, 2024
d49bde0
Bump actions/setup-python from 5.1.0 to 5.1.1 (#1794)
Pixel-Minions Sep 26, 2024
12d0c66
Fix TypeError when running get_rpaths on rez.utils.elf module (#1798)
Pixel-Minions Sep 26, 2024
4d23f59
Bump github/codeql-action from 3.25.12 to 3.26.5 (#1816)
Pixel-Minions Sep 26, 2024
98b9051
Bump actions/upload-artifact from 4.3.4 to 4.3.6 (#1814)
Pixel-Minions Sep 26, 2024
e2289c2
Bump ossf/scorecard-action from 2.3.3 to 2.4.0 (#1805)
Pixel-Minions Sep 26, 2024
1a0ee1f
Bump github/codeql-action from 3.26.5 to 3.26.7 (#1827)
Pixel-Minions Sep 26, 2024
52c2f79
Bump actions/setup-python from 5.1.1 to 5.2.0 (#1820)
Pixel-Minions Sep 26, 2024
907cd19
Bump actions/upload-artifact from 4.3.6 to 4.4.0 (#1819)
Pixel-Minions Sep 26, 2024
0d73bfa
Update sphinx requirement from <8.0.0,>=7.0.0 to >=7.0.0,<9.0.0 in /d…
Pixel-Minions Sep 26, 2024
8113ffd
Make Powershell correctly return exit codes for aliases (#1778)
Pixel-Minions Sep 26, 2024
591a164
Fix `package_cache_async` missing from `ResolvedContext` dict round-t…
Pixel-Minions Sep 26, 2024
25ab47a
Add support for synchronous and asynchronous package caching modes
Pixel-Minions Sep 26, 2024
29bf0b5
Merge https://github.com/Pixel-Minions/rez into enhancements
Pixel-Minions Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/rez/cli/pkg-cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ def setup_parser(parser, completions=False):
group.add_argument(
"--daemon", action="store_true", help=SUPPRESS
)
parser.add_argument(
"--pkg-cache-mode",
choices=["sync", "async"],
default=None,
help="If provided, override the rezconfig's package_cache_async key. "
"If 'sync', the process will block until packages are cached. "
"If 'async', the process will not block while packages are cached."
)
parser.add_argument(
"-c", "--columns", nargs='+', choices=column_choices,
default=["status", "package", "variant_uri", "cache_path"],
Expand Down Expand Up @@ -70,7 +78,15 @@ def add_variant(pkgcache, uri, opts):
print("No such variant: %s" % uri, file=sys.stderr)
sys.exit(1)

destpath, status = pkgcache.add_variant(variant, force=opts.force)
if opts.pkg_cache_mode is not None:
cache_mode = True if opts.pkg_cache_mode == "sync" else False
destpath, status = pkgcache.add_variant(
variant, force=opts.force,
wait_for_copying=cache_mode
)
# If no mode is specified, use the default behavior.
else:
destpath, status = pkgcache.add_variant(variant, force=opts.force)

if status == PackageCache.VARIANT_FOUND:
print_info("Already exists: %s", destpath)
Expand Down
Loading