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

Separate the global location of files per OS & create a configuration trait to read them #171

Merged
merged 4 commits into from
Aug 22, 2023

Conversation

mamcx
Copy link
Contributor

@mamcx mamcx commented Aug 10, 2023

Description of Changes

Was hardcoded in the location of \stdb as the global database path.

Here instead it use an adequate location per-OS and a configuration trait to read the location of the files, also for test.

API

  • This is a breaking change to the module API
  • This is a breaking change to the ClientAPI
  • This is a breaking change to the SDK API
  • [x ] This is a breaking change to database global paths

If the API is breaking, please state below what will break

@kulakowski
Copy link
Contributor

John, I would love to get this in soon. Or some other solution. Right now eg. cargo bench --workspace fails on macos and so on when run out of the box.

@@ -15,6 +16,13 @@ cargo build -p spacetimedb-standalone
export STDB_PATH="${STDB_PATH:-$(mktemp -d)}"
mkdir -p "$STDB_PATH/logs"

function cleanup {
Copy link
Contributor

Choose a reason for hiding this comment

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

@gefjon was this related (i.e., cleaning up the same stuff) that you were talking about earlier today as an ever growing pile of stuff in the temp dir?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, this appears to be unrelated.

@kulakowski
Copy link
Contributor

Piotr, this is the PR that was just mentioned that we want to make sure is ok for cloud.

Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

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

Semantics look good; here are some minor stuff to fix.

crates/core/src/config.rs Outdated Show resolved Hide resolved
crates/core/src/config.rs Show resolved Hide resolved
crates/core/src/config.rs Outdated Show resolved Hide resolved
crates/core/src/config.rs Outdated Show resolved Hide resolved
crates/core/src/config.rs Outdated Show resolved Hide resolved
crates/testing/src/modules.rs Outdated Show resolved Hide resolved
crates/testing/tests/standalone_integration_test.rs Outdated Show resolved Hide resolved
crates/standalone/src/subcommands/start.rs Outdated Show resolved Hide resolved
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
@mamcx mamcx merged commit 68b9536 into master Aug 22, 2023
6 checks passed
@jdetter jdetter mentioned this pull request Aug 23, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants