ENT-14056: Moved cache/config-files from .cfengine to .cache/.config#181
Open
SimonThalvorsen wants to merge 1 commit into
Open
ENT-14056: Moved cache/config-files from .cfengine to .cache/.config#181SimonThalvorsen wants to merge 1 commit into
SimonThalvorsen wants to merge 1 commit into
Conversation
3361734 to
88a9675
Compare
|
Thank you for submitting a pull request! Maybe @craigcomstock can review this? |
Contributor
Author
This was referenced Jun 1, 2026
Ticket: ENT-14056 Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
olehermanse
reviewed
Jun 1, 2026
| dirs_exist_ok=True, | ||
| ignore=shutil.ignore_patterns("json", "packages"), | ||
| ) | ||
| print("config-files has been moved to '%s'" % conf_dir) |
Member
There was a problem hiding this comment.
Suggested change
| print("config-files has been moved to '%s'" % conf_dir) | |
| print("Migration: config files have been moved to '%s'" % conf_dir) |
olehermanse
reviewed
Jun 1, 2026
| os.path.join(cache_dir, "packages"), | ||
| dirs_exist_ok=True, | ||
| ) | ||
| print("cache-files has been moved to '%s'" % cache_dir) |
Member
There was a problem hiding this comment.
Suggested change
| print("cache-files has been moved to '%s'" % cache_dir) | |
| print("Migration: cache files have been moved to '%s'" % cache_dir) |
olehermanse
reviewed
Jun 1, 2026
Comment on lines
+377
to
+384
| choice = input("Remove directory %s ? [y/N]" % old_dir).strip().lower() or "n" | ||
| if choice in "yes": | ||
| shutil.rmtree(old_dir) | ||
| print("%s has been removed" % old_dir) | ||
| return | ||
| if choice in "no": | ||
| return | ||
| print("Unknown input.") |
Member
There was a problem hiding this comment.
We can't prompt for input like this. cf-remote could be running in a script or similar. I think this migration should be safe to run without prompts, if the copies are successful, the old dir should be removed to avoid confusion / duplication.
olehermanse
reviewed
Jun 1, 2026
Comment on lines
+345
to
+348
| override_dir = os.getenv("CF_REMOTE_DIR") | ||
| # Set manually by user, assume they want to keep it like that | ||
| if override_dir: | ||
| return |
Member
There was a problem hiding this comment.
It's debatable, but I think I would run the migration for the default paths even if a specific dir is specified. If they have something in the default location, they probably want that moved in case the old location will stop working in the future, for example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: ENT-14056