Skip to content

Commit

Permalink
Fix GroupIndex upgrade (#6890)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Nov 25, 2024
1 parent b509a4c commit 9be88cf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 24 deletions.
26 changes: 5 additions & 21 deletions backend/canisters/group_index/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

### Changed

- Make `ChannelId` comparisons use their 32bit representation ([#6885](https://github.com/open-chat-labs/open-chat/pull/6885))

## [[2.0.1465](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1465-group_index)] - 2024-11-21

### Added

- Add an error log with http endpoint ([#6608](https://github.com/open-chat-labs/open-chat/pull/6608))

### Changed

- Simplify `inspect_message` ([#6847](https://github.com/open-chat-labs/open-chat/pull/6847))

### Fixed

- Wire up `freeze_community` in `inspect_message` ([#6764](https://github.com/open-chat-labs/open-chat/pull/6764))

## [[2.0.1389](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1389-group_index)] - 2024-10-15

### Added

- Add support for expiring access gates ([#6401](https://github.com/open-chat-labs/open-chat/pull/6401))
- Add an error log with http endpoint ([#6608](https://github.com/open-chat-labs/open-chat/pull/6608))

### 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))
- Simplify `inspect_message` ([#6847](https://github.com/open-chat-labs/open-chat/pull/6847))
- Make `ChannelId` comparisons use their 32bit representation ([#6885](https://github.com/open-chat-labs/open-chat/pull/6885))

### Fixed

- Fix GroupIndex upgrade ([#6580](https://github.com/open-chat-labs/open-chat/pull/6580))
- Fix GroupIndex upgrade ([#6890](https://github.com/open-chat-labs/open-chat/pull/6890))
- Wire up `freeze_community` in `inspect_message` ([#6764](https://github.com/open-chat-labs/open-chat/pull/6764))

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

Expand Down
1 change: 1 addition & 0 deletions backend/canisters/group_index/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ struct Data {
pub canisters_requiring_upgrade: CanistersRequiringUpgrade,
pub test_mode: bool,
pub total_cycles_spent_on_canisters: Cycles,
#[serde(skip_deserializing)]
pub cached_hot_groups: CachedHotGroups,
pub cached_metrics: CachedMetrics,
pub local_index_map: LocalGroupIndexMap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ fn post_upgrade(args: Args) {
let memory = get_upgrades_memory();
let reader = get_reader(&memory);

let (data, errors, logs, traces): (Data, Vec<LogEntry>, Vec<LogEntry>, Vec<LogEntry>) =
msgpack::deserialize(reader).unwrap();
let (data, logs, traces): (Data, Vec<LogEntry>, Vec<LogEntry>) = msgpack::deserialize(reader).unwrap();

canister_logger::init_with_logs(data.test_mode, errors, logs, traces);
canister_logger::init_with_logs(data.test_mode, Vec::new(), logs, traces);

let env = init_env(data.rng_seed);
init_cycles_dispenser_client(data.cycles_dispenser_canister_id, data.test_mode);
Expand Down
1 change: 1 addition & 0 deletions backend/libraries/types/src/gated_groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub struct AccessGateConfig {
}

#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq)]
#[serde(from = "AccessGate")]
pub struct AccessGateConfigInternal {
pub gate: AccessGate,
pub expiry: Option<Milliseconds>,
Expand Down

0 comments on commit 9be88cf

Please sign in to comment.