This repository was archived by the owner on May 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
Retire support for storage v6 #1924
Open
alstar555
wants to merge
11
commits into
master
Choose a base branch
from
rm-storage-v6_1683
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
589b401
Retired storage v6
alstar555 eb646f2
Retire support for v1 as well
alstar555 ab1804a
Fixing test fails
alstar555 5f20539
Fixing tests
alstar555 b75960a
Fixing NoneType test errors
alstar555 efee965
Fixing test fails
alstar555 22c0ec4
Use None with set notation
alstar555 107e7e6
Added version file check to valid_p method
alstar555 2cf62f4
Created a STORAGE_MIN_VERSION variable
alstar555 3234bf7
Syntax typo
alstar555 08dd1a0
Merge remote-tracking branch 'origin/rm-storage-v6_1683' into rm-stor…
alstar555 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1175,7 +1175,7 @@ def init(self): | |
if (v_found == STORAGE_VERSION): | ||
ch.VERBOSE("found storage dir v%d: %s" % (STORAGE_VERSION, self.root)) | ||
self.lock() | ||
elif (v_found in {None, 6}): # initialize/upgrade | ||
elif (v_found is None): # initialize/upgrade | ||
ch.INFO("%s storage directory: v%d %s" | ||
% (op, STORAGE_VERSION, self.root)) | ||
self.root.mkdir() | ||
|
@@ -1188,16 +1188,6 @@ def init(self): | |
self.build_large.mkdir() | ||
self.unpack_base.mkdir() | ||
self.upload_cache.mkdir() | ||
if (v_found is not None): # upgrade | ||
if (v_found == 6): | ||
# Charliecloud 0.32 had a bug where symlinks to fat manifests | ||
# that were really skinny were erroneously absolute, making the | ||
# storage directory immovable (PR #1657). Remove all symlinks | ||
# in dlcache; they’ll be re-created later. | ||
for entry in self.download_cache.iterdir(): | ||
if (entry.is_symlink()): | ||
ch.DEBUG("deleting bad v6 symlink: %s" % entry) | ||
entry.unlink() | ||
self.version_file.file_write("%d\n" % STORAGE_VERSION) | ||
else: # can’t upgrade | ||
ch.FATAL("incompatible storage directory v%d: %s" | ||
|
@@ -1294,10 +1284,8 @@ def validate_strict(self): | |
% (msg_prefix, img), ch.BUG_REPORT_PLZ) | ||
|
||
def version_read(self): | ||
# While support for storage v1 was dropped some time ago, let’s at least | ||
# retain the ability to recognize it. | ||
if (not os.path.isfile(self.version_file)): | ||
return 1 | ||
ch.FATAL('Expected file "%s" not found' % self.version_file) | ||
|
||
text = self.version_file.file_read_all() | ||
try: | ||
return int(text) | ||
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.