Fix sslib new versions incompatibility bug - #159
kairoaraujo merged 9 commits into
Conversation
|
There seems to be a lint failure. I will work to fix it today. |
b30b6e3 to
b7d1dc7
Compare
Codecov ReportBase: 99.42% // Head: 99.05% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #159 +/- ##
==========================================
- Coverage 99.42% 99.05% -0.37%
==========================================
Files 12 12
Lines 522 530 +8
==========================================
+ Hits 519 525 +6
- Misses 3 5 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
| @@ -1,5 +1,5 @@ | |||
| -i https://pypi.org/simple | |||
| alembic==1.8.1 | |||
There was a problem hiding this comment.
When I updated the securesystemslib I noticed that tox -e requirements failed suddenly.
I thought it was somehow connected to the newer securesytemslib versions but in their requirements files, I don't see those dependencies...
There was a problem hiding this comment.
I merged #156
If you rebase it now, the changes only related to your PR will be clear.
b88a3a8 to
f8a3348
Compare
|
Rebased and it's ready for review. |
|
Can you please rebase again? |
f8a3348 to
b3281b8
Compare
|
@kairoaraujo I rebased. |
kairoaraujo
left a comment
There was a problem hiding this comment.
LGTM
nit: You can update the dependencies, sslib 0.26.0 was released, or let our workflow update after the merge.
$ pipenv update
$ make requirements$ git diff
diff --git a/Pipfile.lock b/Pipfile.lock
index 3b5333c..4855f21 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -567,11 +567,11 @@
},
"securesystemslib": {
"hashes": [
- "sha256:04bc11593edd68405939d3dfc318080bfb31f1ebb5d81c7911914b42dfd4bf2f",
- "sha256:10d5a066e70cb87704c9bf2cef1ef6d8a06fab5ef7602dd59c26d06251317a11"
+ "sha256:41c7b25c52dc0bafe774413b5738bbf4431f094e72a091e83d9921901972ae4c",
+ "sha256:a8fa49831d6a7e48f81050984ddfac3713af0c326f558727113533edb5ca8eac"
],
"index": "pypi",
- "version": "==0.25.0"
+ "version": "==0.26.0"
},
"setuptools": {
"hashes": [
@@ -1551,11 +1551,11 @@
},
"securesystemslib": {
"hashes": [
- "sha256:04bc11593edd68405939d3dfc318080bfb31f1ebb5d81c7911914b42dfd4bf2f",
- "sha256:10d5a066e70cb87704c9bf2cef1ef6d8a06fab5ef7602dd59c26d06251317a11"
+ "sha256:41c7b25c52dc0bafe774413b5738bbf4431f094e72a091e83d9921901972ae4c",
+ "sha256:a8fa49831d6a7e48f81050984ddfac3713af0c326f558727113533edb5ca8eac"
],
"index": "pypi",
- "version": "==0.25.0"
+ "version": "==0.26.0"
},
"setuptools": {
"hashes": [
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 4c49be2..c969b33 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -59,7 +59,7 @@ pytz==2022.7.1
pyyaml==6.0 ; python_version >= '3.6'
redis==4.4.2
requests==2.28.2 ; python_version >= '3.7' and python_version < '4'
-securesystemslib==0.25.0
+securesystemslib==0.26.0
setuptools==66.0.0 ; python_version >= '3.7'
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
snowballstemmer==2.2.0
diff --git a/requirements.txt b/requirements.txt
index f7b9136..a7a7973 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -27,7 +27,7 @@ pynacl==1.5.0
pytz==2022.7.1
redis==4.4.2
requests==2.28.2 ; python_version >= '3.7' and python_version < '4'
-securesystemslib==0.25.0
+securesystemslib==0.26.0
setuptools==66.0.0 ; python_version >= '3.7'
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
sqlalchemy==1.4.46|
Done, updated to securesystemslib 0.26.0 |
|
@kairoaraujo suddenly, after the update to securesystemslib 0.26.0 the tests started to fail and the main problem seems to be they can't load the settings: Locally I don't have that problem and the tests pass. |
|
I removed the need for |
The incompatibility with newer securesystemslib versions was caused because of a new breaking change introduced in: secure-systems-lab/securesystemslib#231 Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
We want to use the "restrict" by default as we are the ones who will save metadata and target files through LocalStorage.put and we want to have as least privileges as possible because of security. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Simplify IStorage by not inheriting StorageBackendInterface anymore. In the last securesystemslib version, the contributors there added a lot of functionality inside the StorageBackendInterface which we don't use and is irrelevant to us. Additionally, we had at least two cases where our tests failed because of StorageBackendInterface API changes and we were blocked to use an older securesystemslib version or update IStorage accordingly. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
By mistake I have made IStorage a regular class as opposed to an interface which is its purpose. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
81d72e5 to
b33c1f2
Compare
|
Rebased because of merge conflicts. Can we review this pr and merge it with a higher priority as every bump of every dependency in |
Move the logic where we actually save the file content into the IStorage.put API call as this will help us easily support more storages within persist() call. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
|
Ready for another review @kairoaraujo. |
The incompatibility with newer securesystemslib versions was caused because of a new breaking change introduced in:
secure-systems-lab/securesystemslib#231
The changes were tested locally and the bootstrap works.
It seems that
Pipenv.lockwasn't updated for a while as many changes not related were added.I ran
pipenv lockand on the time of submitting this pr on the latest main 248 lines of insertions and 200 lines of deletion are introduced inPipenv.lock.I added unit tests testing the new
restrictargument to theLocalStorage.put()call which is used by default.Also, updated the old tests to be consistent with the newer code.
Closes #118
Signed-off-by: Martin Vrachev mvrachev@vmware.com