Changeset 609bd81 in trunk
- Timestamp:
- 2022-01-25T15:42:04Z (3 years ago)
- Branches:
- master
- Children:
- 2583236
- Parents:
- 0ad31e3 (diff), 6480e0c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 1 added
- 1 deleted
- 15 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified .circleci/config.yml ¶
r0ad31e3 r609bd81 50 50 {} 51 51 52 # Just one Python 3.6 configuration while the port is in-progress.53 - "python3 6":52 # Test against Python 3: 53 - "python37": 54 54 {} 55 55 … … 119 119 - "build-image-pypy27-buster": 120 120 <<: *DOCKERHUB_CONTEXT 121 - "build-image-python3 6-ubuntu":121 - "build-image-python37-ubuntu": 122 122 <<: *DOCKERHUB_CONTEXT 123 123 … … 380 380 381 381 382 python3 6:382 python37: 383 383 <<: *UBUNTU_18_04 384 384 docker: 385 385 - <<: *DOCKERHUB_AUTH 386 image: "tahoelafsci/ubuntu:18.04-py3 "386 image: "tahoelafsci/ubuntu:18.04-py3.7" 387 387 user: "nobody" 388 388 … … 393 393 # reporter. 394 394 TAHOE_LAFS_TRIAL_ARGS: "--reporter=subunitv2-file" 395 TAHOE_LAFS_TOX_ENVIRONMENT: "py3 6"395 TAHOE_LAFS_TOX_ENVIRONMENT: "py37" 396 396 397 397 … … 512 512 docker: 513 513 - <<: *DOCKERHUB_AUTH 514 image: "docker:17.05.0-ce-git" 514 # CircleCI build images; https://github.com/CircleCI-Public/cimg-base 515 # for details. 516 image: "cimg/base:2022.01" 515 517 516 518 environment: … … 578 580 579 581 580 build-image-python3 6-ubuntu:582 build-image-python37-ubuntu: 581 583 <<: *BUILD_IMAGE 582 584 … … 584 586 DISTRO: "ubuntu" 585 587 TAG: "18.04" 586 PYTHON_VERSION: "3 "588 PYTHON_VERSION: "3.7" 587 589 588 590 -
TabularUnified .github/workflows/ci.yml ¶
r0ad31e3 r609bd81 40 40 python-version: 41 41 - 2.7 42 - 3.643 42 - 3.7 44 43 - 3.8 45 44 - 3.9 46 45 include: 47 # On macOS don't bother with 3. 6-3.8, just to get faster builds.46 # On macOS don't bother with 3.7-3.8, just to get faster builds. 48 47 - os: macos-10.15 49 48 python-version: 2.7 … … 182 181 python-version: 183 182 - 2.7 184 - 3. 6183 - 3.7 185 184 - 3.9 186 185 include: 187 # On macOS don't bother with 3. 6, just to get faster builds.186 # On macOS don't bother with 3.7, just to get faster builds. 188 187 - os: macos-10.15 189 188 python-version: 2.7 -
TabularUnified Makefile ¶
r0ad31e3 r609bd81 36 36 tox --develop -e codechecks 37 37 # Run all the test environments in parallel to reduce run-time 38 tox --develop -p auto -e 'py27,py3 6,pypy27'38 tox --develop -p auto -e 'py27,py37,pypy27' 39 39 .PHONY: test-venv-coverage 40 40 ## Run all tests with coverage collection and reporting. … … 52 52 ## Run all tests under Python 3 53 53 test-py3-all: .tox/create-venvs.log 54 tox --develop -e py3 6allmydata54 tox --develop -e py37 allmydata 55 55 56 56 # This is necessary only if you want to automatically produce a new -
TabularUnified NEWS.rst ¶
r0ad31e3 r609bd81 6 6 7 7 .. towncrier start line 8 Release 1.17.1 (2022-01-07) 9 ''''''''''''''''''''''''''' 10 11 Bug Fixes 12 --------- 13 14 - Fixed regression on Python 3 causing the JSON version of the Welcome page to sometimes produce a 500 error (`#3852 <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3852>`_) 15 - Fixed regression on Python 3 where JSON HTTP POSTs failed to be processed. (`#3854 <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3854>`_) 16 17 18 Misc/Other 19 ---------- 20 21 - `#3848 <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3848>`_, `#3849 <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3849>`_, `#3850 <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3850>`_, `#3856 <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3856>`_ 8 22 9 23 -
TabularUnified docs/Installation/install-tahoe.rst ¶
r0ad31e3 r609bd81 29 29 30 30 4. Start PowerShell and enter the following command to verify python installation:: 31 31 32 32 python --version 33 33 34 34 5. Enter the following command to install Tahoe-LAFS:: 35 35 36 36 pip install tahoe-lafs 37 37 38 38 6. Verify installation by checking for the version:: 39 39 40 40 tahoe --version 41 41 … … 57 57 58 58 2. Install Tahoe-LAFS using pip:: 59 59 60 60 pip install tahoe-lafs 61 61 62 62 3. Verify installation by checking for the version:: 63 63 64 64 tahoe --version 65 65 66 If you are looking to hack on the source code or run pre-release code, we recommend you install Tahoe-LAFS on a `virtualenv` instance. To learn more, see :doc:`install-on-linux`. 66 If you are looking to hack on the source code or run pre-release code, we recommend you install Tahoe-LAFS on a `virtualenv` instance. To learn more, see :doc:`install-on-linux`. 67 67 68 68 You can always write to the `tahoe-dev mailing list <https://lists.tahoe-lafs.org/mailman/listinfo/tahoe-dev>`_ or chat on the `Libera.chat IRC <irc://irc.libera.chat/%23tahoe-lafs>`_ if you are not able to get Tahoe-LAFS up and running on your deployment. -
TabularUnified docs/release-checklist.rst ¶
r0ad31e3 r609bd81 71 71 72 72 - update "docs/known_issues.rst" if appropriate 73 - update "docs/Installation/install-tahoe.rst" references to the new release74 73 - Push the branch to github 75 74 - Create a (draft) PR; this should trigger CI (note that github … … 108 107 - tox -e deprecations,upcoming-deprecations 109 108 109 - clone to a clean, local checkout (to avoid extra files being included in the release) 110 111 - cd /tmp 112 - git clone /home/meejah/src/tahoe-lafs 113 110 114 - build tarballs 111 115 … … 154 158 - secure-copy all release artifacts to the download area on the 155 159 tahoe-lafs.org host machine. `~source/downloads` on there maps to 156 https://tahoe-lafs.org/downloads/ on the Web. 157 - scp dist/*1.15.0* username@tahoe-lafs.org:/home/source/downloads 160 https://tahoe-lafs.org/downloads/ on the Web: 161 162 - scp dist/*1.15.0* username@tahoe-lafs.org:/home/source/downloads 163 158 164 - the following developers have access to do this: 159 165 … … 161 167 - meejah 162 168 - warner 169 170 Push the signed tag to the main repository: 171 172 - git push origin tahoe-lafs-1.17.1 163 173 164 174 For the actual release, the tarball and signature files need to be -
TabularUnified nix/tahoe-lafs.nix ¶
r0ad31e3 r609bd81 8 8 }: 9 9 python.pkgs.buildPythonPackage rec { 10 # Most of the time this is not exactly the release version (eg 1.17. 0).10 # Most of the time this is not exactly the release version (eg 1.17.1). 11 11 # Give it a `post` component to make it look newer than the release version 12 12 # and we'll bump this up at the time of each release. … … 21 21 # it is excluded from the source tree by default. When it is included, the 22 22 # package tends to be frequently spuriously rebuilt. 23 version = "1.17. 0.post1";23 version = "1.17.1.post1"; 24 24 name = "tahoe-lafs-${version}"; 25 25 src = lib.cleanSourceWith { -
TabularUnified relnotes.txt ¶
r0ad31e3 r609bd81 1 ANNOUNCING Tahoe, the Least-Authority File Store, v1.17. 01 ANNOUNCING Tahoe, the Least-Authority File Store, v1.17.1 2 2 3 The Tahoe-LAFS team is pleased to announce version 1.17. 0of3 The Tahoe-LAFS team is pleased to announce version 1.17.1 of 4 4 Tahoe-LAFS, an extremely reliable decentralized storage 5 5 system. Get it with "pip install tahoe-lafs", or download a … … 16 16 https://tahoe-lafs.readthedocs.org/en/latest/about.html 17 17 18 The previous stable release of Tahoe-LAFS was v1.1 6.0, released on19 October 19, 2021.18 The previous stable release of Tahoe-LAFS was v1.17.0, released on 19 December 6, 2021. 20 20 21 This release fixes several security issues raised as part of an audit 22 by Cure53. We developed fixes for these issues in a private 23 repository. Shortly after this release, public tickets will be updated 24 with further information (along with, of course, all the code). 21 This release fixes two Python3-releated regressions and 4 minor bugs. 25 22 26 There is also OpenMetrics support now and several bug fixes. 27 28 In all, 46 issues have been fixed since the last release. 29 30 Please see ``NEWS.rst`` for a more complete list of changes. 23 Please see ``NEWS.rst`` [1] for a complete list of changes. 31 24 32 25 … … 67 60 all versions since v1.0. 68 61 69 Network connections are limited by the Introducer protocol in 70 use. If the Introducer is running v1.10 or v1.11, then servers71 from this release (v1.12) can serve clients of all versions72 back to v1.0 . If it is running v1.12, then they can only 73 serve clients back to v1.10. Clients from this release can use 74 servers back to v1.10, butnot older servers.62 Network connections are limited by the Introducer protocol in use. If 63 the Introducer is running v1.10 or v1.11, then servers from this 64 release can serve clients of all versions back to v1.0 . If it is 65 running v1.12 or higher, then they can only serve clients back to 66 v1.10. Clients from this release can use servers back to v1.10, but 67 not older servers. 75 68 76 69 Except for the new optional MDMF format, we have not made any … … 80 73 to build such an infrastructure in the future. 81 74 82 This is the twenty- firstrelease in the version 1 series. This75 This is the twenty-second release in the version 1 series. This 83 76 series of Tahoe-LAFS will be actively supported and maintained 84 77 for the foreseeable future, and future versions of Tahoe-LAFS … … 140 133 ACKNOWLEDGEMENTS 141 134 142 This is the eighteenth release of Tahoe-LAFS to be created135 This is the nineteenth release of Tahoe-LAFS to be created 143 136 solely as a labor of love by volunteers. Thank you very much 144 137 to the team of "hackers in the public interest" who make … … 148 141 on behalf of the Tahoe-LAFS team 149 142 150 December 6, 2021 143 January 7, 2022 151 144 Planet Earth 152 145 153 146 154 [1] https://github.com/tahoe-lafs/tahoe-lafs/blob/tahoe-lafs-1.17. 0/NEWS.rst147 [1] https://github.com/tahoe-lafs/tahoe-lafs/blob/tahoe-lafs-1.17.1/NEWS.rst 155 148 [2] https://github.com/tahoe-lafs/tahoe-lafs/blob/master/docs/known_issues.rst 156 149 [3] https://tahoe-lafs.org/trac/tahoe-lafs/wiki/RelatedProjects 157 [4] https://github.com/tahoe-lafs/tahoe-lafs/blob/tahoe-lafs-1.17. 0/COPYING.GPL158 [5] https://github.com/tahoe-lafs/tahoe-lafs/blob/tahoe-lafs-1.17. 0/COPYING.TGPPL.rst159 [6] https://tahoe-lafs.readthedocs.org/en/tahoe-lafs-1.17. 0/INSTALL.html150 [4] https://github.com/tahoe-lafs/tahoe-lafs/blob/tahoe-lafs-1.17.1/COPYING.GPL 151 [5] https://github.com/tahoe-lafs/tahoe-lafs/blob/tahoe-lafs-1.17.1/COPYING.TGPPL.rst 152 [6] https://tahoe-lafs.readthedocs.org/en/tahoe-lafs-1.17.1/INSTALL.html 160 153 [7] https://lists.tahoe-lafs.org/mailman/listinfo/tahoe-dev 161 154 [8] https://tahoe-lafs.org/trac/tahoe-lafs/roadmap -
TabularUnified setup.py ¶
r0ad31e3 r609bd81 381 381 packages=find_packages('src') + ['allmydata.test.plugins'], 382 382 classifiers=trove_classifiers, 383 # We support Python 2.7, and we're working on support for 3.6 (the 384 # highest version that PyPy currently supports). 385 python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", 383 # We support Python 2.7, and Python 3.7 or later. 384 python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*", 386 385 install_requires=install_requires, 387 386 extras_require={ … … 414 413 "junitxml", 415 414 "tenacity", 416 "paramiko", 415 # Pin old version until 416 # https://github.com/paramiko/paramiko/issues/1961 is fixed. 417 "paramiko < 2.9", 417 418 "pytest-timeout", 418 419 # Does our OpenMetrics endpoint adhere to the spec: -
TabularUnified src/allmydata/test/web/test_root.py ¶
r0ad31e3 r609bd81 12 12 13 13 import time 14 import json 14 15 15 16 from urllib.parse import ( … … 25 26 from twisted.application import service 26 27 from testtools.twistedsupport import succeeded 27 from twisted.internet.defer import inlineCallbacks 28 from twisted.internet.defer import ( 29 inlineCallbacks, 30 succeed, 31 ) 28 32 29 33 from ...storage_client import ( … … 31 35 StorageFarmBroker, 32 36 ) 33 from ...web.root import RootElement 37 from ...web.root import ( 38 RootElement, 39 Root, 40 ) 34 41 from ...util.connection_status import ConnectionStatus 42 from ...crypto.ed25519 import ( 43 create_signing_keypair, 44 ) 35 45 from allmydata.web.root import URIHandler 36 46 from allmydata.client import _Client … … 48 58 from ..common import ( 49 59 SyncTestCase, 60 AsyncTestCase, 50 61 ) 51 62 … … 139 150 self.assertThat(item.slotData.get("version"), Equals("")) 140 151 self.assertThat(item.slotData.get("nickname"), Equals("")) 152 153 154 class RenderRoot(AsyncTestCase): 155 156 @inlineCallbacks 157 def test_root_json(self): 158 """ 159 The 'welcome' / root page renders properly with ?t=json when some 160 servers show None for available_space while others show a 161 valid int 162 163 See also https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3852 164 """ 165 ann = { 166 "anonymous-storage-FURL": "pb://w2hqnbaa25yw4qgcvghl5psa3srpfgw3@tcp:127.0.0.1:51309/vucto2z4fxment3vfxbqecblbf6zyp6x", 167 "permutation-seed-base32": "w2hqnbaa25yw4qgcvghl5psa3srpfgw3", 168 } 169 srv0 = NativeStorageServer(b"server_id0", ann, None, {}, EMPTY_CLIENT_CONFIG) 170 srv0.get_connection_status = lambda: ConnectionStatus(False, "summary0", {}, 0, 0) 171 172 srv1 = NativeStorageServer(b"server_id1", ann, None, {}, EMPTY_CLIENT_CONFIG) 173 srv1.get_connection_status = lambda: ConnectionStatus(False, "summary1", {}, 0, 0) 174 # arrange for this server to have some valid available space 175 srv1.get_available_space = lambda: 12345 176 177 class FakeClient(_Client): 178 history = [] 179 stats_provider = object() 180 nickname = "" 181 nodeid = b"asdf" 182 _node_public_key = create_signing_keypair()[1] 183 introducer_clients = [] 184 helper = None 185 186 def __init__(self): 187 service.MultiService.__init__(self) 188 self.storage_broker = StorageFarmBroker( 189 permute_peers=True, 190 tub_maker=None, 191 node_config=EMPTY_CLIENT_CONFIG, 192 ) 193 self.storage_broker.test_add_server(b"test-srv0", srv0) 194 self.storage_broker.test_add_server(b"test-srv1", srv1) 195 196 root = Root(FakeClient(), now_fn=time.time) 197 198 lines = [] 199 200 req = DummyRequest(b"") 201 req.fields = {} 202 req.args = { 203 b"t": [b"json"], 204 } 205 206 # for some reason, DummyRequest is already finished when we 207 # try to add a notifyFinish handler, so override that 208 # behavior. 209 210 def nop(): 211 return succeed(None) 212 req.notifyFinish = nop 213 req.write = lines.append 214 215 yield root.render(req) 216 217 raw_js = b"".join(lines).decode("utf8") 218 js = json.loads(raw_js) 219 servers = js["servers"] 220 self.assertEquals(len(servers), 2) 221 self.assertIn( 222 { 223 "connection_status": "summary0", 224 "nodeid": "server_id0", 225 "last_received_data": 0, 226 "version": None, 227 "available_space": None, 228 "nickname": "" 229 }, 230 servers 231 ) 232 self.assertIn( 233 { 234 "connection_status": "summary1", 235 "nodeid": "server_id1", 236 "last_received_data": 0, 237 "version": None, 238 "available_space": 12345, 239 "nickname": "" 240 }, 241 servers 242 ) -
TabularUnified src/allmydata/test/web/test_web.py ¶
r0ad31e3 r609bd81 821 821 d = self.GET("/?t=json") 822 822 def _check(res): 823 """ 824 Check that the results are correct. 825 We can't depend on the order of servers in the output 826 """ 823 827 decoded = json.loads(res) 824 expected = { 825 u'introducers': { 826 u'statuses': [], 828 self.assertEqual(decoded['introducers'], {u'statuses': []}) 829 actual_servers = decoded[u"servers"] 830 self.assertEquals(len(actual_servers), 2) 831 self.assertIn( 832 { 833 u"nodeid": u'other_nodeid', 834 u'available_space': 123456, 835 u'connection_status': u'summary', 836 u'last_received_data': 30, 837 u'nickname': u'other_nickname \u263b', 838 u'version': u'1.0', 827 839 }, 828 u'servers': sorted([ 829 {u"nodeid": u'other_nodeid', 830 u'available_space': 123456, 831 u'connection_status': u'summary', 832 u'last_received_data': 30, 833 u'nickname': u'other_nickname \u263b', 834 u'version': u'1.0', 835 }, 836 {u"nodeid": u'disconnected_nodeid', 837 u'available_space': 123456, 838 u'connection_status': u'summary', 839 u'last_received_data': 35, 840 u'nickname': u'disconnected_nickname \u263b', 841 u'version': u'1.0', 842 }, 843 ], key=lambda o: sorted(o.items())), 844 } 845 self.assertEqual(expected, decoded) 840 actual_servers 841 ) 842 self.assertIn( 843 { 844 u"nodeid": u'disconnected_nodeid', 845 u'available_space': 123456, 846 u'connection_status': u'summary', 847 u'last_received_data': 35, 848 u'nickname': u'disconnected_nickname \u263b', 849 u'version': u'1.0', 850 }, 851 actual_servers 852 ) 853 846 854 d.addCallback(_check) 847 855 return d -
TabularUnified src/allmydata/test/web/test_webish.py ¶
r0ad31e3 r609bd81 91 91 self._fields_test(b"GET", {}, b"", Equals(None)) 92 92 93 def test_form_fields (self):93 def test_form_fields_if_filename_set(self): 94 94 """ 95 95 When a ``POST`` request is received, form fields are parsed into 96 ``TahoeLAFSRequest.fields``. 96 ``TahoeLAFSRequest.fields`` and the body is bytes (presuming ``filename`` 97 is set). 97 98 """ 98 99 form_data, boundary = multipart_formdata([ … … 121 122 ), 122 123 ) 124 125 def test_form_fields_if_name_is_file(self): 126 """ 127 When a ``POST`` request is received, form fields are parsed into 128 ``TahoeLAFSRequest.fields`` and the body is bytes when ``name`` 129 is set to ``"file"``. 130 """ 131 form_data, boundary = multipart_formdata([ 132 [param(u"name", u"foo"), 133 body(u"bar"), 134 ], 135 [param(u"name", u"file"), 136 body(u"some file contents"), 137 ], 138 ]) 139 self._fields_test( 140 b"POST", 141 {b"content-type": b"multipart/form-data; boundary=" + bytes(boundary, 'ascii')}, 142 form_data.encode("ascii"), 143 AfterPreprocessing( 144 lambda fs: { 145 k: fs.getvalue(k) 146 for k 147 in fs.keys() 148 }, 149 Equals({ 150 "foo": "bar", 151 "file": b"some file contents", 152 }), 153 ), 154 ) 155 156 def test_form_fields_require_correct_mime_type(self): 157 """ 158 The body of a ``POST`` is not parsed into fields if its mime type is 159 not ``multipart/form-data``. 160 161 Reproducer for https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3854 162 """ 163 data = u'{"lalala": "lolo"}' 164 data = data.encode("utf-8") 165 self._fields_test(b"POST", {"content-type": "application/json"}, 166 data, Equals(None)) 123 167 124 168 -
TabularUnified src/allmydata/web/root.py ¶
r0ad31e3 r609bd81 298 298 return json.dumps(result, indent=1) + "\n" 299 299 300 301 300 def _describe_known_servers(self, broker): 302 return sorted(list(301 return list( 303 302 self._describe_server(server) 304 303 for server 305 304 in broker.get_known_servers() 306 ), key=lambda o: sorted(o.items())) 307 305 ) 308 306 309 307 def _describe_server(self, server): -
TabularUnified src/allmydata/webish.py ¶
r0ad31e3 r609bd81 115 115 self.args = parse_qs(argstring, 1) 116 116 117 if self.method == b'POST': 117 content_type = (self.requestHeaders.getRawHeaders("content-type") or [""])[0] 118 if self.method == b'POST' and content_type.split(";")[0] in ("multipart/form-data", "application/x-www-form-urlencoded"): 118 119 # We use FieldStorage here because it performs better than 119 120 # cgi.parse_multipart(self.content, pdict) which is what -
TabularUnified tox.ini ¶
r0ad31e3 r609bd81 9 9 python = 10 10 2.7: py27-coverage,codechecks 11 3.6: py36-coverage12 11 3.7: py37-coverage,typechecks,codechecks3 13 12 3.8: py38-coverage … … 19 18 20 19 [tox] 21 envlist = typechecks,codechecks,codechecks3,py{27,3 6,37,38,39}-{coverage},pypy27,pypy3,integration,integration320 envlist = typechecks,codechecks,codechecks3,py{27,37,38,39}-{coverage},pypy27,pypy3,integration,integration3 22 21 minversion = 2.4 23 22 … … 52 51 certifi 53 52 # VCS hooks support 54 py3 6,!coverage: pre-commit53 py37,!coverage: pre-commit 55 54 56 55 # We add usedevelop=False because testing against a true installation gives
Note: See TracChangeset
for help on using the changeset viewer.