Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into activity-feed
Browse files Browse the repository at this point in the history
# Conflicts:
#	backend/canisters/user/CHANGELOG.md
  • Loading branch information
megrogan committed Oct 9, 2024
2 parents d986594 + 680eb0e commit 28d71cf
Show file tree
Hide file tree
Showing 95 changed files with 1,293 additions and 464 deletions.
13 changes: 13 additions & 0 deletions .github/runs-on.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
runners:
small:
cpu: 2
family: m7
image: ubuntu24-full-x64
medium:
cpu: 4
family: m7
image: ubuntu24-full-x64
large:
cpu: 16
family: m7
image: ubuntu24-full-x64
20 changes: 16 additions & 4 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ concurrency:
jobs:
fmt:
name: run fmt
runs-on: ubuntu-latest
runs-on:
- runs-on
- runner=small
- run-id=${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand All @@ -29,7 +32,10 @@ jobs:

clippy:
name: run clippy
runs-on: ubuntu-latest
runs-on:
- runs-on
- runner=medium
- run-id=${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand All @@ -52,7 +58,10 @@ jobs:

unit_tests:
name: run unit tests
runs-on: ubuntu-latest
runs-on:
- runs-on
- runner=medium
- run-id=${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand All @@ -71,7 +80,10 @@ jobs:

integration_tests:
name: run integration tests
runs-on: ubuntu-latest
runs-on:
- runs-on
- runner=large
- run-id=${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/build_caches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ name: Build caches
jobs:
build_all_debug:
name: Build all in debug mode
runs-on: ubuntu-latest
runs-on:
- runs-on
- runner=medium
- run-id=${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand All @@ -26,7 +29,10 @@ jobs:

build_canister_wasms:
name: Build canister wasms
runs-on: ubuntu-latest
runs-on:
- runs-on
- runner=large
- run-id=${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pre_release_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ name: Run pre-release tests
jobs:
run_tests:
name: Run pre-release tests
runs-on: ubuntu-latest
runs-on:
- runs-on
- runner=large
- run-id=${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- name: Wait for wasms to be built
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/push_canister_wasms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ name: Push canister wasms
jobs:
push_canister_wasms:
name: Push canister wasms
runs-on: ubuntu-latest
runs-on:
- runs-on
- runner=large
- run-id=${{ github.run_id }}
permissions:
id-token: write
contents: read
Expand Down
45 changes: 3 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ members = [
"backend/libraries/sha256",
"backend/libraries/stable_memory",
"backend/libraries/testing",
"backend/libraries/timer_job_queue",
"backend/libraries/timer_job_queues",
"backend/libraries/ts_export",
"backend/libraries/ts_export_macros",
"backend/libraries/types",
Expand Down
2 changes: 1 addition & 1 deletion backend/canisters/airdrop_bot/impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ serde_bytes = { workspace = true }
serde_json = { workspace = true }
stable_memory = { path = "../../../libraries/stable_memory" }
testing = { path = "../../../libraries/testing" }
timer_job_queue = { path = "../../../libraries/timer_job_queue" }
timer_job_queues = { path = "../../../libraries/timer_job_queues" }
tracing = { workspace = true }
types = { path = "../../../libraries/types" }
user_canister_c2c_client = { path = "../../user/c2c_client" }
Expand Down
2 changes: 1 addition & 1 deletion backend/canisters/airdrop_bot/impl/src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use candid::Deserialize;
use icrc_ledger_types::icrc1::transfer::{TransferArg, TransferError};
use rand::Rng;
use serde::Serialize;
use timer_job_queue::TimerJobItem;
use timer_job_queues::TimerJobItem;
use tracing::{error, info, trace};
use types::icrc1::{self, Account};
use types::{
Expand Down
2 changes: 1 addition & 1 deletion backend/canisters/airdrop_bot/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use model::airdrops::{Airdrops, AirdropsMetrics};
use serde::{Deserialize, Serialize};
use std::cell::RefCell;
use std::collections::HashSet;
use timer_job_queue::TimerJobQueue;
use timer_job_queues::TimerJobQueue;
use types::{BuildVersion, CanisterId, ChannelId, CommunityId, Cycles, Document, TimestampMillis, Timestamped};
use utils::env::Environment;

Expand Down
5 changes: 4 additions & 1 deletion backend/canisters/community/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

### Added

- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))

### Changed

- Mark prize messages as having ledger error if transfers fail ([#6500](https://github.com/open-chat-labs/open-chat/pull/6500))
- Make adding existing users to a new channel more efficient ([#6504](https://github.com/open-chat-labs/open-chat/pull/6504))
- Further refactoring of adding multiple users to public channels ([#6506](https://github.com/open-chat-labs/open-chat/pull/6506))
- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))

## [[2.0.1365](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1365-community)] - 2024-10-02

Expand Down
5 changes: 4 additions & 1 deletion backend/canisters/group/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

### Added

- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))

### Changed

- Mark prize messages as having ledger error if transfers fail ([#6500](https://github.com/open-chat-labs/open-chat/pull/6500))
- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))

## [[2.0.1366](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1366-group)] - 2024-10-02

Expand Down
5 changes: 4 additions & 1 deletion backend/canisters/group_index/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

### Added

- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))

### Changed

- Add `CanisterWasmBytes` to reduce duplication ([#6480](https://github.com/open-chat-labs/open-chat/pull/6480))
- Log error if chunked Group/Community upgrade fails ([#6483](https://github.com/open-chat-labs/open-chat/pull/6483))
- Clear wasm chunks once new wasm version has been set ([#6524](https://github.com/open-chat-labs/open-chat/pull/6524))
- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))

## [[2.0.1360](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1360-group_index)] - 2024-09-30

Expand Down
5 changes: 4 additions & 1 deletion backend/canisters/local_group_index/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

### Added

- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))

### Changed

- Clear wasm chunks once new wasm version has been set ([#6524](https://github.com/open-chat-labs/open-chat/pull/6524))
- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))

### Removed

Expand Down
9 changes: 8 additions & 1 deletion backend/canisters/local_user_index/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

### Added

- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))

### Changed

- Implement `GroupedTimerJobQueue` and use it for pushing user events ([#6528](https://github.com/open-chat-labs/open-chat/pull/6528))

## [[2.0.1372](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1372-local_user_index)] - 2024-10-07

### Changed

- Add `CanisterWasmBytes` to reduce duplication ([#6480](https://github.com/open-chat-labs/open-chat/pull/6480))
- Clear wasm chunks once new wasm version has been set ([#6524](https://github.com/open-chat-labs/open-chat/pull/6524))
- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))

### Removed

Expand Down
1 change: 1 addition & 0 deletions backend/canisters/local_user_index/impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ satoshi_dice_canister = { path = "../../../bots/examples/satoshi_dice/api" }
satoshi_dice_canister_c2c_client = { path = "../../../bots/examples/satoshi_dice/c2c_client" }
sha256 = { path = "../../../libraries/sha256" }
stable_memory = { path = "../../../libraries/stable_memory" }
timer_job_queues = { path = "../../../libraries/timer_job_queues" }
tracing = { workspace = true }
types = { path = "../../../libraries/types" }
user_canister = { path = "../../user/api" }
Expand Down
4 changes: 0 additions & 4 deletions backend/canisters/local_user_index/impl/src/jobs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
use crate::RuntimeState;

pub mod delete_users;
pub mod sync_events_to_user_canisters;
pub mod sync_events_to_user_index_canister;
pub mod topup_canister_pool;
pub mod upgrade_canisters;

pub(crate) fn start(state: &RuntimeState) {
delete_users::start_job_if_required(state, None);
sync_events_to_user_canisters::start_job_if_required(state);
sync_events_to_user_index_canister::start_job_if_required(state);
topup_canister_pool::start_job_if_required(state);
upgrade_canisters::start_job_if_required(state);
}
Loading

0 comments on commit 28d71cf

Please sign in to comment.