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

use the github asset url information #8

Closed
wants to merge 3 commits into from
Closed

Conversation

ahornby
Copy link
Contributor

@ahornby ahornby commented Jun 24, 2023

use the github asset url information

Use the github asset url information so we only download things it claims to have

Test Plan:

cargo test

local run and check the download and cache still work, notice the fetching message on first run

# Download
$ USE_BUCK2_VERSION=2023-07-15 cargo run -- --version
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/buckle --version`
buckle: fetching buck2-x86_64-unknown-linux-gnu.zst 2023-07-15
buck2 22862e81827fad189f124d677c623d7ec1772cc6 <local>

# see its cached
$ USE_BUCK2_VERSION=2023-07-15 cargo run -- --version
Sat 22 Jul 19:23:14 BST 2023
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/buckle --version`
buck2 22862e81827fad189f124d677c623d7ec1772cc6 <local>
Sat 22 Jul 19:23:14 BST 2023 [Exit: 0] alex@fridge:~/loca

Stack created with Sapling. Best reviewed with ReviewStack.

the use of the status code was included in a45d2c8, but the test was missed out so rebasing

tested with: cargo test
using temp BUCKLE_CACKE stops tests taking the happy path where the user already has buck2 downloaded

also check downloaded buck2 binary and prelude_hash are as expected

tested with: cargo test
Use the github asset url information so we only download things it claims to have

Test Plan:

cargo test

local run and check the download and cache still work, notice the fetching message on first run

```
# Download
$ USE_BUCK2_VERSION=2023-07-15 cargo run -- --version
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/buckle --version`
buckle: fetching buck2-x86_64-unknown-linux-gnu.zst 2023-07-15
buck2 22862e81827fad189f124d677c623d7ec1772cc6 <local>

# see its cached
$ USE_BUCK2_VERSION=2023-07-15 cargo run -- --version
Sat 22 Jul 19:23:14 BST 2023
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/buckle --version`
buck2 22862e81827fad189f124d677c623d7ec1772cc6 <local>
Sat 22 Jul 19:23:14 BST 2023 [Exit: 0] alex@fridge:~/loca
```
@ahornby
Copy link
Contributor Author

ahornby commented Apr 16, 2024

closing, looks like OSS dotslash covers the usecases I was interested in

@ahornby ahornby closed this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant