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(storage): move state to persistent storage #277

Merged
merged 23 commits into from
Feb 23, 2024
Merged

Conversation

gurinderu
Copy link
Contributor

No description provided.

Copy link

linear bot commented Feb 21, 2024

@gurinderu gurinderu changed the title feat(storage): move scripts to persistent storage feat(storage): move state to persistent storage Feb 21, 2024
@gurinderu gurinderu added the e2e Run e2e workflow label Feb 22, 2024
@gurinderu gurinderu enabled auto-merge (squash) February 23, 2024 15:07
@@ -55,6 +55,7 @@ jobs:
- snapshot
uses: fluencelabs/nox/.github/workflows/build.yml@master
with:
ref: feature/net-759
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess this changes nothing, right

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It uses a modified nox

@@ -92,6 +93,7 @@ jobs:

uses: fluencelabs/nox/.github/workflows/tests.yml@master
with:
ref: feature/net-759
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -212,17 +214,20 @@ mod tests {

/// after_each macro copy-pastes this function into every test
fn after_each() {
std::fs::remove_file(DB_FILE).ok();
// std::fs::remove_file(DB_FILE).ok();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

use marine_rs_sdk_test::marine_test;

use crate::schema::DB_FILE;
const DB_FILE: &str = "./tests_artifacts/spell.sqlite";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep or revert?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep

use marine_rs_sdk_test::marine_test;
use serde_json::json;

use crate::schema::DB_FILE;
const DB_FILE: &str = "./tests_artifacts/spell.sqlite";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -6,11 +6,10 @@ set -o pipefail

cd "$(dirname "$0")"

rm -f /tmp/spell.sqlite
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, it is not inside wasm runtime, and I don't see any interaction with the /tmp dir outside

@gurinderu gurinderu requested a review from kmd-fl February 23, 2024 15:16
src/spell/modules/spell/spell/src/auth/mod.rs Show resolved Hide resolved
@@ -319,37 +330,37 @@ mod tests {
let cp = || host_call_params();

type SPELL = marine_test_env::spell::ModuleInterface;
let set_str_ok = |spell: &mut SPELL, key: &str, value: &str| {
Copy link
Contributor

@kmd-fl kmd-fl Feb 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's ridiculous, why idea didn't do it for me, lol


use crate::schema::DB_FILE;
const DB_FILE: &str = "./tests_artifacts/spell.sqlite";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't import it? how does it work now?

Copy link
Contributor Author

@gurinderu gurinderu Feb 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crate::schema::DB_FILE is a file inside the wasm runtime, DB_FILE is a file in the current system

@gurinderu gurinderu merged commit ae9ac0d into main Feb 23, 2024
16 checks passed
@gurinderu gurinderu deleted the feature/net-759 branch February 23, 2024 15:33
folex pushed a commit that referenced this pull request Feb 23, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.7.4](spell-v0.7.3...spell-v0.7.4)
(2024-02-23)


### Features

* **storage:** move state to persistent storage
([#277](#277))
([ae9ac0d](ae9ac0d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants