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

refactor import / export endpoints to use the same code path as auto … #4976

Merged
merged 2 commits into from
Jul 26, 2021

Conversation

cgardens
Copy link
Contributor

@cgardens cgardens commented Jul 25, 2021

…migration

What

@github-actions github-actions bot added the area/platform issues related to the platform label Jul 25, 2021
@cgardens cgardens force-pushed the cgardens/import_use_same_code_path branch from 16ac076 to 0ddc85e Compare July 25, 2021 23:51
@cgardens cgardens marked this pull request as ready for review July 26, 2021 00:25
@cgardens cgardens merged commit 7fbf15c into master Jul 26, 2021
@cgardens cgardens deleted the cgardens/import_use_same_code_path branch July 26, 2021 00:25
@@ -75,7 +76,7 @@ public static ConfigPersistence createWithValidation(final Path storageRoot) thr

public FileSystemConfigPersistence(final Path storageRoot) {
this.storageRoot = storageRoot;
this.configRoot = storageRoot.resolve(CONFIG_DIR);
this.configRoot = Exceptions.toRuntime(() -> Files.createDirectories(storageRoot.resolve(CONFIG_DIR)));
Copy link
Contributor

Choose a reason for hiding this comment

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

@cgardens, this is only needed for testing, right?

In production the config directory should not be created by this constructor. This is because when the server launches, it is possible that the config volume is not ready yet. It should wait for the config volume, instead of creating this directory itself. We have this logic in the createWithValidation method.

This is the PR with more details: #4835.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah. make sense. i'll revert this part out.

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 it here in this PR: #4987

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants