Skip to content

Commit d9f2c98

Browse files
Marcin Nowak-Liebiediewbitdivineericswanson-dfinitydfinity-botgithub-actions
authored
chore: release 0.15.2 beta.2 (#3449)
* feat: Read install arg from file (#3431) # Description This PR adds support for providing install arguments from a file. This is motivated by these issues: * It is impossible to pass a large canister init arg as the length of shell arguments is limited by the terminal (which in turn may be limited by the operating system). * For shorter arguments, it is more convenient to write `--argument-file somefile.hex` than `--argument "$(cat somefile.hex)"`. * The `dfx canister call` method supports `--argument-file` for similar reasons. It would be nice to be consistent. * fix: output .env file is now relative to project root, not cwd (#3435) dfx.json can specify `output_env_file` (the default for new projects is `".env"`), and some commands accept `--output-env-file .env` on the command line. If `dfx deploy`, `dfx build`, or `dfx canister install` were executed in a subdirectory of a project, they would create/read this file in that subdirectory, rather than the same directory as dfx.json (the project root). With this change, the location of the env file is taken to be relative to the project root, and furthermore must be contained within the project directory. Also fixed three places that could output "No such file or directory (OS error 2)" without telling which path wasn't found. Fixes: https://dfinity.atlassian.net/browse/SDK-1028 * fix: dfx extension install will no longer create a corrupt cache directory (#3436) Running `dfx extension install <extension>` immediately after installing a new dfx version, or after `dfx cache delete`, would result in a cache directory that contained only an `extensions` subdirectory. Later, dfx would see that the cache directory exists and therefore not install it. Then, commands like `dfx start` or `dfx build` would fail due to missing files. Fixes: https://dfinity.atlassian.net/browse/SDK-1240 * ci: add workflow to update bitcoin canister sources (#3438) * chore: Update Bitcoin Canister to release/2023-10-13 (#3439) Co-authored-by: github-actions <[email protected]> * chore: update Motoko version to 0.10.2 (#3441) ## Suggested [CHANGELOG.md](https://github.com/dfinity/sdk/edit/chore-update-motoko-0.10.2/CHANGELOG.md) changes ``` ## Dependencies ### Motoko Updated Motoko to [0.10.2](https://github.com/dfinity/motoko/releases/tag/0.10.2) * fix: deleting project canister by id will clean up canister id store. (#3442) `dfx canister delete <by id>` would leave entries (canister name -> canister id) in the canister id store. A subsequent `dfx deploy` would then fail because it would try to install to the deleted canister rather than creating a new one. Fixes https://dfinity.atlassian.net/browse/SDK-1143 * chore: Update to new ic-agent version (#3445) * Update to new ic-agent version * . * fix some tests, add env var for disabling query cert * per command * fix other tests * 0.30.2 * chore: Release 0.15.2-beta.2 Signed-off-by: Marcin Nowak-Liebiediew <[email protected]> --------- Signed-off-by: Marcin Nowak-Liebiediew <[email protected]> Co-authored-by: Max <[email protected]> Co-authored-by: Eric Swanson <[email protected]> Co-authored-by: DFINITY bot <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Adam Spofford <[email protected]>
1 parent 8230fe1 commit d9f2c98

37 files changed

+445
-96
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Check Bitcoin Canister Release Update
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 * * *' # Runs at UTC midnight every day
7+
8+
jobs:
9+
check-update:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout dfx repository
14+
uses: actions/checkout@v4
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
18+
- name: Fetch Bitcoin Canister latest release tag
19+
env:
20+
GH_TOKEN: "${{ secrets.NIV_UPDATER_TOKEN }}"
21+
run: |
22+
LATEST_TAG=$(gh release view --repo dfinity/bitcoin-canister --json tagName -q .tagName)
23+
echo "Latest tag is $LATEST_TAG"
24+
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
25+
26+
- name: Check if the latest release tag has been updated
27+
run: |
28+
URL_ENCODED_CURRENT_TAG=$(jq -r '.["ic-btc-canister"].version' nix/sources.json)
29+
CURRENT_TAG=$(python -c "import sys, urllib.parse as ul; print(ul.unquote_plus(sys.argv[1]))" "$URL_ENCODED_CURRENT_TAG")
30+
echo "Current tag is $CURRENT_TAG"
31+
if [[ "$CURRENT_TAG" == "$LATEST_TAG" ]]; then
32+
echo "No update is required."
33+
exit 1
34+
else
35+
echo "An update is required."
36+
fi
37+
38+
39+
- name: install Nix
40+
uses: cachix/install-nix-action@v21
41+
with:
42+
nix_path: nixpkgs=channel:nixos-unstable
43+
44+
- name: install niv (dependency manager for Nix projects)
45+
run: nix-env -i niv -f '<nixpkgs>'
46+
47+
- name: install packages from nix/sources.json
48+
run: niv update
49+
50+
- name: update sources
51+
run: |
52+
URL_ENCODED_LATEST_TAG=$(echo -n "$LATEST_TAG" | python -c 'import sys, urllib.parse; print(urllib.parse.quote(sys.stdin.read().strip(), safe=""))')
53+
niv update ic-btc-canister -a version=$URL_ENCODED_LATEST_TAG
54+
./scripts/write-dfx-asset-sources.sh
55+
56+
- name: Update dfx to use the latest Bitcoin Canister version
57+
env:
58+
GH_TOKEN: "${{ secrets.NIV_UPDATER_TOKEN }}"
59+
run: |
60+
git config user.name github-actions
61+
git config user.email [email protected]
62+
git checkout -b bot/update-bitcoin-canister/$LATEST_TAG
63+
git add .
64+
git commit -m "Update Bitcoin Canister to $LATEST_TAG"
65+
git push --set-upstream origin bot/update-bitcoin-canister/$LATEST_TAG
66+
PR_TITLE="chore: Update Bitcoin Canister Version to $LATEST_TAG"
67+
PR_BODY="This PR updates the Bitcoin Canister version to the latest tag: $LATEST_TAG"
68+
gh pr create --title "$PR_TITLE" --body "$PR_BODY" --base master --head $(git branch --show-current)
69+

.github/workflows/e2e.yml

+4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ jobs:
9797
path: /usr/local/bin
9898
- name: Setup dfx binary
9999
run: chmod +x /usr/local/bin/dfx
100+
- name: Disable query verification in ic-ref
101+
if: ${{ matrix.backend == 'ic-ref' }}
102+
run: |
103+
echo DFX_DISABLE_QUERY_VERIFICATION=1 >> $GITHUB_ENV
100104
- name: start and deploy
101105
run: |
102106
pwd

CHANGELOG.md

+30-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22

33
# UNRELEASED
44

5+
=== fix: `dfx canister delete <canister id>` removes the related entry from the canister id store
6+
7+
Previously, deleting a canister in the project by id rather than by name
8+
would leave the canister id in the canister id store. This would cause
9+
`dfx deploy` to fail.
10+
11+
=== fix: dfx extension install can no longer create a corrupt cache directory
12+
13+
Running `dfx cache delete && dfx extension install nns` would previously
14+
create a cache directory containing only an `extensions` subdirectory.
15+
dfx only looks for the existence of a cache version subdirectory to
16+
determine whether it has been installed. The end result was that later
17+
commands would fail when the cache did not contain expected files.
18+
19+
=== fix: output_env_file is now considered relative to project root
20+
21+
The .env file location, whether specified as `output_env_file` in dfx.json
22+
or `--output-env-file <file>` on the commandline, is now considered relative
23+
to the project root, rather than relative to the current working directory.
24+
25+
=== feat: Read dfx canister install argument from a file
26+
27+
Enables passing large arguments that cannot be passed directly in the command line using the `--argument-file` flag. For example `dfx canister install --argument-file ./my/argument/file.txt my_canister_name`.
28+
29+
530
### feat: change `list_permitted` and `list_authorized` to an update call.
631

732
This requires the `list_authorized` and `list_permitted` methods to be called as an update and disables the ability to
@@ -24,7 +49,7 @@ Added the following subcommands:
2449

2550
### Motoko
2651

27-
Updated Motoko to [0.10.1](https://github.com/dfinity/motoko/releases/tag/0.10.1)
52+
Updated Motoko to [0.10.2](https://github.com/dfinity/motoko/releases/tag/0.10.2)
2853

2954
### Frontend canister
3055

@@ -51,6 +76,10 @@ This incorporates the following executed proposals:
5176
- [124858](https://dashboard.internetcomputer.org/proposal/124858)
5277
- [124857](https://dashboard.internetcomputer.org/proposal/124857)
5378

79+
### Bitcoin canister
80+
81+
Updated Bitcoin canister to [release/2023-10-13](https://github.com/dfinity/bitcoin-canister/releases/tag/release%2F2023-10-13)
82+
5483
# 0.15.1
5584

5685
### feat: Added support for reserved_cycles and reserved_cycles_limit

Cargo.lock

+80-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)