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(migration-tool): Placeholder for the Oisy data migration tool #1778

Closed
wants to merge 5 commits into from
Closed
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
40 changes: 40 additions & 0 deletions .github/workflows/cli-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Backend Checks

on:
pull_request:
paths:
- # Scripts, GitHub actions that contain 'backend' in their path.
'**/*backend*'
- # The backend source code
'src/backend/**'
- 'src/shared/**'
- # Rust files such as Cargo.lock, Cargo.toml and rust-toolchain.toml
'**/Cargo*'
- '**/*rust*'
- # The dockerfile used in this CI run, and the scripts it COPY's.
'Dockerfile'
- 'docker/**'
workflow_dispatch:

jobs:

hello-world:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-backend-tests-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
- name: Print hello world
run: cargo run --bin oisy

may-merge:
needs: [ 'hello-world' ]
runs-on: ubuntu-20.04
steps:
- name: Cleared for merging
run: echo OK
4 changes: 4 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
members = [
"src/backend",
"src/oisy",
"src/shared"
]
resolver = "2"
Expand Down
7 changes: 7 additions & 0 deletions src/oisy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "oisy"
version = "0.1.0"
edition = "2021"
description = "CLI tool for managing Oisy"

[dependencies]
15 changes: 15 additions & 0 deletions src/oisy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# `oisy` CLI

This is a tool used to move state from one Oisy instance to another.

## How it works

This tool:

- Configures both source and destination canisters to stop receiving writes.
- Verifies that the destination is empty.
- Copies all the data from the source canister to the destination canister.
- Checks the data transfer.
- Enables writes on the destination canister.

Utilities are also provided to check the state of both canisters.
3 changes: 3 additions & 0 deletions src/oisy/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
Loading