-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[vcpkg] Add experimental $X_VCPKG_ASSET_SOURCES for source caching #13639
Merged
ras0219-msft
merged 11 commits into
microsoft:master
from
ras0219:dev/roschuma/azblob-src
Jun 4, 2021
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
621e62b
[vcpkg] Add experimental $VCPKG_X_READWRITE_MIRROR_URL_TEMPLATE for s…
ras0219 be666c3
[vcpkg] Use prerelease version for testing
ras0219 b414f6f
[docs] Add assetcaching.md
ras0219 de2f73b
Merge branch 'master' into dev/roschuma/azblob-src
ras0219 807d975
Revert bootstrap changes
ras0219 bae9719
[vcpkg_download_distfile] Deprecate SILENT_EXIT
ras0219 00c1465
cmake_parse_arguments() always defines option arguments
ras0219 7d5a228
Adjust CI baseline
ras0219 b549700
[vcpkg_download_distfile] Address CR comments, restore ARIA2
ras0219 a6ead44
[CI] Add source caching to Linux and OSX CI passes
ras0219 2e9c73c
[ci.baseline.txt] Skip chartdir on more platforms
ras0219 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Asset Caching | ||
|
||
**The latest version of this documentation is available on [GitHub](https://github.com/Microsoft/vcpkg/tree/master/docs/users/assetcaching.md).** | ||
|
||
**Experimental feature: this may change or be removed at any time** | ||
|
||
Vcpkg can utilize mirrors to cache downloaded assets, ensuring continued operation even if the original source changes | ||
or disappears. | ||
|
||
In-tool help is available via `vcpkg help assetcaching`. | ||
|
||
## Configuration | ||
|
||
Asset caching can be configured by setting the environment variable `X_VCPKG_ASSET_SOURCES` to a semicolon-delimited | ||
list of source strings. Characters can be escaped using backtick (\`). | ||
|
||
### Valid source strings | ||
|
||
The `<rw>` optional parameter for certain strings controls how they will be accessed. It can be specified as `read`, | ||
`write`, or `readwrite` and defaults to `read`. | ||
|
||
#### `clear` | ||
|
||
Syntax: `clear` | ||
|
||
Removes all previous sources | ||
|
||
#### `x-azurl` | ||
|
||
Syntax: `x-azurl,<url>[,<sas>[,<rw>]]` | ||
|
||
Adds an Azure Blob Storage source, optionally using Shared Access Signature validation. URL should include the container | ||
path and be terminated with a trailing `/`. SAS, if defined, should be prefixed with a `?`. Non-Azure servers will also | ||
work if they respond to GET and PUT requests of the form: `<url><sha512><sas>`. | ||
|
||
See also the [binary caching documentation for Azure Blob Storage](binarycaching.md#azure-blob-storage-experimental) for | ||
more information on how to set up an `x-azurl` source. | ||
|
||
#### `x-block-origin` | ||
|
||
Syntax: `x-block-origin` | ||
|
||
Disables use of the original URLs in case the mirror does not have the file available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@ras0219-msft This change introduced the use of the
x-download
vcpkg tool command which was not availabe in version 2021-01-13-d67989bce1043b98092ac45996a8230a059a2d7e of the tool. This already created a lot of issues, e.g. #18676. IMO this change needs to be complemented by use ofvcpkg_minimum_required(VERSION 2021-05-05)
either here where the new command is used, or globally in
ports.cmake
where the minimum is 2021-01-13 at the moment.(I don't want to send a PR blindly because it will rebuild the world.)
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.
while you are very kind in principle, experience has already demonstrated many times that already merged PRs are rarely seen by vcpkg team.
i’d open a new issue at minimum, or send a PR anyway at best.
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.
@cenit Not really, I think we should force the user to update vcpkg and download vcpkg binary using bootstrap.
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.
There were probably more than 10 issues related to
x-download
, and none was taken as a reason to demand a change.I would send a PR if it could be discussed before having another world rebuild blocking the CI pipeline. The script audits are heavy enough.
So as a start, I prefer to have another comment close to the offending change, adressing author, assignees and reviewers which normally remain subscribed. An issue or PR can follow.