Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos
Commits
2dcbe51a
Commit
2dcbe51a
authored
Mar 06, 2025
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "WIP: theia: resiliency of a non ascii only filename"
This reverts commit 03a82809aebbddc7e80a9e4775ff0190eab8fe62.
parent
77ff2b8d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
17 deletions
+3
-17
software/theia/buildout.hash.cfg
software/theia/buildout.hash.cfg
+2
-2
software/theia/test/test_resiliency.py
software/theia/test/test_resiliency.py
+0
-10
software/theia/theia_common.py
software/theia/theia_common.py
+0
-3
software/theia/theia_import.py
software/theia/theia_import.py
+1
-2
No files found.
software/theia/buildout.hash.cfg
View file @
2dcbe51a
...
...
@@ -39,7 +39,7 @@ md5sum = 3572b3fa458505ae25ebcea9b1ed3267
[theia-common]
_update_hash_filename_ = theia_common.py
md5sum =
11a441d364147d4ed95cb7193e161a8e
md5sum =
6a25c6a7f1beb27232a3c9acd8a76500
[theia-export]
_update_hash_filename_ = theia_export.py
...
...
@@ -47,7 +47,7 @@ md5sum = bc58b7191243bce2bbc95696abce9ef8
[theia-import]
_update_hash_filename_ = theia_import.py
md5sum =
6c820e9c76fea5cff5636f6eb9b095fa
md5sum =
43720e0bf8487ae6bd7e7c462ea5c9f6
[slapos.css.in]
_update_hash_filename_ = slapos.css.in
...
...
software/theia/test/test_resiliency.py
View file @
2dcbe51a
...
...
@@ -50,7 +50,6 @@ from test import TheiaTestCase, ResilientTheiaMixin, theia_software_release_url
dummy_software_url
=
os
.
path
.
abspath
(
os
.
path
.
join
(
'resilience_dummy'
,
'software.cfg'
))
non_ascii_only_filename
=
' 🙊
\
t
nonascii
\
n
$
\
r
é '
class
WorkaroundSnapshotConflict
(
TheiaTestCase
):
...
...
@@ -422,11 +421,6 @@ class TestTheiaResilienceImportAndExport(ResilienceMixin, ExportAndImportMixin,
# Check that dummy instance was properly deployed
self
.
initial_log
=
self
.
checkLog
(
os
.
path
.
join
(
dummy_root
,
'log.log'
))
# Create a non ascii filename, to ensure signature correctly handles it
self
.
writeFile
(
os
.
path
.
join
(
self
.
getPartitionPath
(
'export'
,
'srv'
,
'project'
),
non_ascii_only_filename
),
'This file should be included in resilient backup'
)
# Create ~/include and ~/include/included
self
.
writeFile
(
os
.
path
.
join
(
dummy_root
,
'include'
,
'included'
),
'This file should be included in resilient backup'
)
...
...
@@ -468,10 +462,6 @@ class TestTheiaResilienceImportAndExport(ResilienceMixin, ExportAndImportMixin,
# Check that the dummy instance is not yet started
self
.
checkLog
(
os
.
path
.
join
(
dummy_root
,
'log.log'
),
self
.
initial_log
,
newline
=
None
)
# Check that the non ascii filename has been correctly propagated
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
self
.
getPartitionPath
(
'import'
,
'srv'
,
'project'
),
non_ascii_only_filename
)))
# Check that ~/srv/.backup_identity_script was detected and called
signature
=
self
.
getPartitionPath
(
'import'
,
'srv'
,
'backup'
,
'theia'
,
'slappart0.backup.signature.custom'
)
...
...
software/theia/theia_common.py
View file @
2dcbe51a
...
...
@@ -7,7 +7,6 @@ import re
import
shutil
import
subprocess
as
sp
import
sqlite3
from
base64
import
urlsafe_b64encode
import
six
import
zc.buildout.configparser
...
...
@@ -114,7 +113,6 @@ def fast_hashwalk(root_dir):
filepath
=
os
.
path
.
join
(
dirpath
,
f
)
if
os
.
path
.
isfile
(
filepath
):
displaypath
=
os
.
path
.
relpath
(
filepath
,
start
=
root_dir
)
displaypath
=
urlsafe_b64encode
(
displaypath
.
encode
()).
decode
()
yield
'%s %s'
%
(
sha256sum
(
filepath
),
displaypath
)
...
...
@@ -126,7 +124,6 @@ def exclude_hashwalk(root_dir, instance_dir):
filepath
=
os
.
path
.
join
(
dirpath
,
f
)
if
os
.
path
.
isfile
(
filepath
):
displaypath
=
os
.
path
.
relpath
(
filepath
,
start
=
root_dir
)
displaypath
=
urlsafe_b64encode
(
displaypath
.
encode
()).
decode
()
yield
'%s %s'
%
(
sha256sum
(
filepath
),
displaypath
)
if
dirpath
==
instance_dir
:
remaining_dirs
=
[]
...
...
software/theia/theia_import.py
View file @
2dcbe51a
...
...
@@ -6,7 +6,6 @@ import sys
import
subprocess
as
sp
import
time
import
traceback
from
base64
import
urlsafe_b64decode
import
requests
from
requests.exceptions
import
RequestException
...
...
@@ -120,7 +119,7 @@ class TheiaImport(object):
except
ValueError
:
yield
'Could not parse: %s'
%
line
continue
filepath
=
os
.
path
.
join
(
root_dir
,
urlsafe_b64decode
(
relpath
).
decode
()
)
filepath
=
os
.
path
.
join
(
root_dir
,
relpath
)
try
:
signature
=
sha256sum
(
filepath
)
except
IOError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment