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

Document source of truth for rctx.download* cache key #22716

Closed
Closed
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,10 @@ private StructImpl completeDownload(PendingDownload pendingDownload)
This must match the SHA-256 hash of the file downloaded. It is a security \
risk to omit the SHA-256 as remote files can change. At best omitting this \
field will make your build non-hermetic. It is optional to make development \
easier but should be set before shipping.
easier but should be set before shipping. \
If provided, the repository cache will first be checked for a file with the \
given hash; a download will only be attempted if the file was not found in \
the cache. After a successful download, the file will be added to the cache.
"""),
@Param(
name = "executable",
Expand All @@ -660,7 +663,8 @@ private StructImpl completeDownload(PendingDownload pendingDownload)
doc =
"""
If set, restrict cache hits to those cases where the file was added to the cache \
with the same canonical id.
with the same canonical id. By default caching uses the checksum \
(<code>sha256</code> or <code>integrity</code>).
"""),
@Param(
name = "auth",
Expand All @@ -683,7 +687,10 @@ private StructImpl completeDownload(PendingDownload pendingDownload)
This must match the checksum of the file downloaded. It is a security \
risk to omit the checksum as remote files can change. At best omitting this \
field will make your build non-hermetic. It is optional to make development \
easier but should be set before shipping.
easier but should be set before shipping. \
If provided, the repository cache will first be checked for a file with the \
given checksum; a download will only be attempted if the file was not found in \
the cache. After a successful download, the file will be added to the cache.
"""),
@Param(
name = "block",
Expand Down Expand Up @@ -879,7 +886,8 @@ public Object download(
doc =
"""
If set, restrict cache hits to those cases where the file was added to the cache \
with the same canonical id.
with the same canonical id. By default caching uses the checksum"
(<code>sha256</code> or <code>integrity</code>).
"""),
@Param(
name = "auth",
Expand All @@ -902,7 +910,10 @@ public Object download(
This must match the checksum of the file downloaded. It is a security \
risk to omit the checksum as remote files can change. At best omitting this \
field will make your build non-hermetic. It is optional to make development \
easier but should be set before shipping.
easier but should be set before shipping. \
If provided, the repository cache will first be checked for a file with the \
given checksum; a download will only be attempted if the file was not found in \
the cache. After a successful download, the file will be added to the cache. \
"""),
@Param(
name = "rename_files",
Expand Down
Loading