Skip to content

Commit 8a1dbb8

Browse files
authored
Merge branch 'master' into update-tokio-tungstenite-for-performance
2 parents 37d1e96 + 61b54ef commit 8a1dbb8

11 files changed

Lines changed: 164 additions & 78 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ jobs:
6161
if: runner.os == 'Windows'
6262
- name: Run smoketests
6363
# Note: clear_database and replication only work in private
64-
# zz_docker disabled temporarily until https://github.com/clockworklabs/SpacetimeDB/issues/2965
65-
run: python -m smoketests ${{ matrix.smoketest_args }} -x clear_database replication zz_docker
64+
run: python -m smoketests ${{ matrix.smoketest_args }} -x clear_database replication
6665
- name: Stop containers (Linux)
6766
if: always() && runner.os == 'Linux'
6867
run: docker compose down

Cargo.lock

Lines changed: 11 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ syntect = { version = "5.0.0", default-features = false, features = ["default-fa
257257
tabled = "0.14.0"
258258
tar = "0.4"
259259
tempdir = "0.3.7"
260-
tempfile = "3.8"
260+
tempfile = "3.20"
261261
termcolor = "1.2.0"
262262
thin-vec = "0.2.13"
263263
thiserror = "1.0.37"
@@ -293,7 +293,7 @@ windows-sys = "0.59"
293293
xdg = "2.5"
294294
tikv-jemallocator = { version = "0.6.0", features = ["profiling", "stats"] }
295295
tikv-jemalloc-ctl = { version = "0.6.0", features = ["stats"] }
296-
jemalloc_pprof = { version = "0.7", features = ["symbolize", "flamegraph"] }
296+
jemalloc_pprof = { version = "0.8", features = ["symbolize", "flamegraph"] }
297297
zstd-framed = { version = "0.1.1", features = ["tokio"] }
298298

299299
# Vendor the openssl we rely on, rather than depend on a

crates/core/src/db/relational_db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ pub mod tests_utils {
17081708
impl TempReplicaDir {
17091709
pub fn new() -> io::Result<Self> {
17101710
let dir = TempDir::with_prefix("stdb_test")?;
1711-
Ok(Self(ReplicaDir::from_path_unchecked(dir.into_path())))
1711+
Ok(Self(ReplicaDir::from_path_unchecked(dir.keep())))
17121712
}
17131713
}
17141714
impl Deref for TempReplicaDir {

crates/core/src/host/instance_env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ mod test {
527527
/// An `InstanceEnv` requires a `DatabaseLogger`
528528
fn temp_logger() -> Result<DatabaseLogger> {
529529
let temp = TempDir::new()?;
530-
let path = ModuleLogsDir::from_path_unchecked(temp.into_path());
530+
let path = ModuleLogsDir::from_path_unchecked(temp.keep());
531531
let path = path.today();
532532
Ok(DatabaseLogger::open(path))
533533
}

crates/paths/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl VersionBinDir {
8585
}
8686

8787
fn link_to(&self, path: &Path) -> anyhow::Result<()> {
88-
let rel_path = path.strip_prefix(self).unwrap_or(path);
88+
let rel_path = path.strip_prefix(self.0.parent().unwrap()).unwrap_or(path);
8989
#[cfg(unix)]
9090
{
9191
// remove the link if it already exists

crates/testing/src/sdk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn ensure_standalone_process() -> &'static SpacetimePaths {
2222
// TODO: This leaks the tempdir.
2323
// We need the tempdir to live for the duration of the process,
2424
// and all the options for post-`main` cleanup seem sketchy.
25-
.into_path();
25+
.keep();
2626
SpacetimePaths::from_root_dir(&RootDir(dir))
2727
});
2828

crates/update/src/cli/list.rs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use spacetimedb_paths::SpacetimePaths;
2+
use std::path::Path;
23

34
/// List installed SpacetimeDB versions.
45
#[derive(clap::Args)]
@@ -10,7 +11,31 @@ pub(super) struct List {
1011

1112
impl List {
1213
pub(super) fn exec(self, paths: &SpacetimePaths) -> anyhow::Result<()> {
13-
let current = paths.cli_bin_dir.current_version()?;
14+
// This `match` part is only here because at one point we had a bug where we were creating
15+
// symlinks that contained the _entire_ path, rather than just the relative path to the
16+
// version directory. It's not strictly necessary, it just fixes our determination of what
17+
// the current version is, for the output of this command.
18+
//
19+
// That symlink bug was fixed in `crates/paths/src/cli.rs` in
20+
// https://github.com/clockworklabs/SpacetimeDB/pull/2680, but this `match` means that this
21+
// output will still be correct for any users that already have one of the bugged symlinks.
22+
//
23+
// Once users upgrade to a version containing #2680, they will have the code that creates
24+
// the fixed symlinks. However, that code won't immediately run, since the upgrade will be
25+
// running from the previous binary they had. So once they upgrade to a version containing
26+
// #2680, _and then_ upgrade once more, their symlinks will be fixed. There's no real
27+
// timeline on when everyone will have done that, but hopefully that helps give a sense of
28+
// how long this code "should" exist for (but it doesn't do any harm afaik).
29+
let current = match paths.cli_bin_dir.current_version()? {
30+
None => None,
31+
Some(path_str) => {
32+
let file_name = Path::new(&path_str)
33+
.file_name()
34+
.and_then(|f| f.to_str())
35+
.ok_or(anyhow::anyhow!("Could not extract current version"))?;
36+
Some(file_name.to_string())
37+
}
38+
};
1439
let versions = if self.all {
1540
let client = super::reqwest_client()?;
1641
super::tokio_block_on(super::install::available_releases(&client))??

docker-compose.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
version: "3.6"
2-
31
services:
42
node:
3+
labels:
4+
app: spacetimedb
55
build:
66
context: ./
77
dockerfile: ./crates/standalone/Dockerfile
@@ -28,8 +28,6 @@ services:
2828
# Tracy
2929
- "8086:8086"
3030
entrypoint: cargo watch -i flamegraphs -i log.conf --why -C crates/standalone -x 'run start --data-dir=/stdb/data --jwt-pub-key-path=/etc/spacetimedb/id_ecdsa.pub --jwt-priv-key-path=/etc/spacetimedb/id_ecdsa'
31-
healthcheck:
32-
test: curl -f http://localhost/ping || exit 1
3331
privileged: true
3432
environment:
3533
SPACETIMEDB_FLAMEGRAPH_PATH: ../../../../flamegraphs/flamegraph.folded

0 commit comments

Comments
 (0)