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

feat: remove upgrade post-process #311

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/observatory/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mod guards;
mod reports;
mod store;
mod types;
mod upgrade;

use crate::console::assert_mission_control_center;
use crate::constants::CRON_INTERVAL_NS;
Expand All @@ -19,7 +18,6 @@ use crate::store::{
};
use crate::types::interface::{ListStatuses, ListStatusesArgs, SetCronTab};
use crate::types::state::{Archive, ArchiveStatuses, CronTab, StableState, State};
use crate::upgrade::types::upgrade::UpgradeStableState;
use ic_cdk::storage::{stable_restore, stable_save};
use ic_cdk::{caller, trap};
use ic_cdk_macros::{export_candid, init, post_upgrade, pre_upgrade, query, update};
Expand Down Expand Up @@ -58,9 +56,7 @@ fn pre_upgrade() {

#[post_upgrade]
fn post_upgrade() {
let (upgrade_stable,): (UpgradeStableState,) = stable_restore().unwrap();

let stable = StableState::from(&upgrade_stable);
let (stable,): (StableState,) = stable_restore().unwrap();

STATE.with(|state| *state.borrow_mut() = State { stable });

Expand Down
43 changes: 0 additions & 43 deletions src/observatory/src/upgrade/impls.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/observatory/src/upgrade/mod.rs

This file was deleted.

39 changes: 0 additions & 39 deletions src/observatory/src/upgrade/types.rs

This file was deleted.