Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed May 2, 2024
2 parents 7397c9e + 9e7e3c2 commit 66e88f4
Show file tree
Hide file tree
Showing 20 changed files with 2,076 additions and 1,243 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/flake_update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "flake_update"

on:
workflow_dispatch:
schedule:
# At 7:00am on Monday
- cron: "0 7 * * 1"

jobs:
flake_update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install nix
uses: cachix/install-nix-action@v25
with:
install_url: https://releases.nixos.org/nix/nix-2.20.4/install

- name: Flake update
run: |
nix flake update
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore(nix): update flake.lock"
title: "Update flake.lock"
body: "This PR updates the flake.lock file."
branch: "update-flake-lock"
branch-suffix: "short-commit-hash"
base: "main"
62 changes: 45 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Test

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
push:
branches: [develop, main]

env:
CARGO_TERM_COLOR: always
Expand All @@ -16,50 +15,74 @@ concurrency:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v2
if: startsWith(matrix.os, 'ubuntu')
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'

- name: Install nix
uses: cachix/install-nix-action@v25
with:
install_url: https://releases.nixos.org/nix/nix-2.20.4/install

- name: Set up cachix
uses: cachix/cachix-action@v14
with:
name: holochain-ci

- name: Cache fixture
uses: actions/cache@v4
- name: Install nix packages
run: nix develop -c $SHELL -c "holochain --version"

- name: Restore fixture
uses: actions/cache/restore@v4
env:
cache-name: fixture
with:
path: fixture/zomes/foo/target
key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ hashFiles('fixture/zomes/foo/Cargo.lock') }}

- name: Cache client build
uses: actions/cache@v4
if: always()
- name: Build fixture
run: nix develop -c $SHELL -c "./build-fixture.sh"

- name: Save fixture to cache
uses: actions/cache/save@v4
env:
cache-name: fixture
with:
path: fixture/zomes/foo/target
key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ hashFiles('fixture/zomes/foo/Cargo.lock') }}

- name: Restore client build
uses: actions/cache/restore@v4
env:
cache-name: client
with:
path: target
key: ${{ matrix.os }}-cargo-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}

- name: Install nix packages
run: nix develop -c $SHELL -c "holochain --version"

- name: Build fixture
run: nix develop -c $SHELL -c "./build-fixture.sh"

- name: Clean up nix files to prevent insufficient disk space
run: nix-collect-garbage -d

- name: Build client
run: cargo build -p holochain_client

- name: Save client build to cache
uses: actions/cache/save@v4
env:
cache-name: client
with:
path: target
key: ${{ matrix.os }}-cargo-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}

- name: Lint
run: cargo clippy --all-features -- -D warnings

Expand All @@ -69,6 +92,11 @@ jobs:
- name: Run tests
run: cargo test

- name: Verify feature independence
run: |
cargo build --no-default-features
cargo build --no-default-features --features "lair_signing"
- name: Setup tmate session if build and test run failed
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
70 changes: 70 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,76 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
### Removed

## 2024-04-24: v0.5.0-dev.32
### Added
- New admin call `issue_app_auth_token` which allows you to issue an app auth token. This is now required when creating
an app websocket connection. See the example for `AppWebsocket::connect` for how to use this.
- Missing app interface function `list_wasm_host_functions` has been added.

### Changed
- **BREAKING**: The admin call `list_app_interfaces` now returns a `Vec<AppInterfaceInfo>` instead of a `Vec<u16>`. You can map the response to a `Vec<u16>` to get the previous result.
- **BREAKING**: The admin call `attach_app_interface` now takes an additional parameter of type `InstalledAppId` which allows you to restrict an app interface to a single app.
- **BREAKING**: The app call `app_info` no longer takes an `installed_app_id` parameter. The conductor uses the app that you have authenticated with.

### Fixed
### Removed
- **BREAKING**: The old `AppWebsocket` is gone, its functionality was merged into the `AppAgentWebsocket` which has been renamed to `AppWebsocket`.

## 2024-03-27: v0.5.0-dev.31
### Changed
- **BREAKING**: The underlying package `holochain_websocket` changed. All websockets in this client follow the new `connect` function and take a socket address that implements `ToSocketAddr` instead of a URL `String`. Examples for the new parameter are `"localhost:30000"` and `([127.0.0.1], 30000)`. See trait [`ToSocketAddr`](https://doc.rust-lang.org/std/net/trait.ToSocketAddrs.html#tymethod.to_socket_addrs).
- **BREAKING**: The `attach_app_interface` method of the `AdminWebsocket` now takes an additional parameter of type `AllowedOrigins` which specifies what origins are allowed to connect to the created app interface.

## 2024-03-11: v0.5.0-dev.30
### Changed
- **BREAKING**: The underlying package `holochain_websocket` changed. All websockets in this client follow the new `connect` function and take a socket address that implements `ToSocketAddr` instead of a URL `String`. Examples for the new parameter are `"localhost:30000"` and `([127.0.0.1], 30000)`. See trait [`ToSocketAddr`](https://doc.rust-lang.org/std/net/trait.ToSocketAddrs.html#tymethod.to_socket_addrs).

## 2024-03-04: v0.5.0-dev.29
### Removed
- **BREAKING**: The utilities crate, it is now replaced by signing built into the client. Please see the updated tests for examples of how to use this.
- **BREAKING**: `sign_zome_call_with_client` which was used internally but also exposed in the public interface. You probably don't need to call this but if you wish to for some reason then use one of the two new `*Signer` types, and convert them to a `Arc<Box<dyn AgentSigner>>`, then use the `sign` method to compute a signature. The logic to prepare the data to be signed is no longer public so you would have to set this up yourself following the `sign_zome_call` function in the `signer` module.

### Added
- Capability to create zome call signing credentials with the `AdminWebsocket` using `authorize_signing_credentials`.
- `ClientAgentSigner` type which can store (in memory) signing credentials created with `authorize_signing_credentials`.
- `LairAgentSigner` which is analagous to the `ClientAgentSigner` but is a wrapper around a Lair client instead so that private keys are stored in Lair.
- `from_existing` method to the `AppAgentWebsocket` which allows it to wrap an existing `AppWebsocket` instead of having to open a new connection. This is useful if you already have an `AppWebsocket` but otherwise you should just use the `connect` method of the `AppAgentWebsocket` rather than two steps.

### Changed
- **BREAKING**: `AppAgentWebsocket::connect` now takes an `Arc<Box<dyn AgentSigner>>` instead of a `LairClient`. The `Arc<Box<dyn AgentSigner>>` can be created from a `.into()` on either a `ClientAgentSigner` or a `LairAgentSigner`. Use the latter to restore the previous behaviour.
- **BREAKING**: `AppAgentWebsocket::call_zome` used to take a `RoleName` as its first parameter. This is now a `ZomeCallTarget`. There is a `.into()` which restores the previous behaviour. Now you can also pass a `CloneCellId` or a `CellId`, also using a `.into()`. Using `CellId` is stronly recommended for now. Please see the doc comments on `ZomeCallTarget` if you intend to use the other options.

## 2024-02-29: v0.5.0-dev.28
### Added
- Export `AdminWebsocket::EnableAppResponse` to be available downstream.

## 2024-02-01: v0.5.0-dev.27
### Added
- Added the `update_coordinators` call in the `AdminWebsocket`.

## 2024-01-26: v0.5.0-dev.26
### Added
- `AppAgentWebsocket` as an app websocket tied to a specific app and agent. Recommended for most applications.
- `on_signal`: event handler for reacting to app signals; implemented on `AppWebsocket` and `AppAgentWebsocket`.
### Changed
- Bump deps to holochain-0.3.0-beta-dev.26

## 2023-11-23: v0.5.0-dev.25
### Changed
- Bump deps to holochain-0.3.0-beta-dev.25

## 2023-11-15: v0.5.0-dev.24
### Changed
- Bump deps to holochain-0.3.0-beta-dev.24

## 2023-11-02: v0.5.0-dev.23
### Changed
- Bump deps to holochain-0.3.0-beta-dev.23

## 2023-10-20: v0.5.0-dev.0
### Changed
- Bump deps to holochain-0.3.0-beta-dev.22

## 2024-04-17: v0.4.11
### Changed
- Remove expectation of an IPv4 address and allow for IPv4 and IPv6.
Expand Down
Loading

0 comments on commit 66e88f4

Please sign in to comment.