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

[test-utils] run clickhouse in its own cwd #4755

Merged

Conversation

sunshowers
Copy link
Contributor

ClickHouse likes to dump a file called preprocessed_configs/config.xml in its
cwd. By default the cwd is the source tree, so sometimes if a test fails this
file gets left behind.

Fix this by moving the cwd to <temp_dir>/cwd.

I also made a couple other changes in the PR:

  1. Switched to Utf8TempDir etc, simplifying path handling code which already
    assumed UTF-8 paths anyway.
  2. Moved the datastore into its own directory, <temp_dir>/datastore. I
    figured this would minimize possible collisions between the datastore and the
    cwd.

Fixes #4080.

Fixes #4634.

Created using spr 1.3.5
Copy link
Collaborator

@smklein smklein left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for the cleanup! Happy to no longer be accidentally committing this file

test-utils/src/dev/clickhouse.rs Outdated Show resolved Hide resolved
Created using spr 1.3.5
Created using spr 1.3.5
Created using spr 1.3.5
@sunshowers sunshowers enabled auto-merge (squash) January 6, 2024 00:42
@sunshowers sunshowers merged commit f65ffd8 into main Jan 6, 2024
20 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/test-utils-run-clickhouse-in-its-own-cwd branch January 6, 2024 03:07
@sunshowers
Copy link
Contributor Author

Following up, it appears that this may have caused #4779. It's really strange, though -- still investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants