1040 Commits

Author SHA1 Message Date
Tim Burke
f1858d89e0 Add option to skip container PUT during upload
Currently, a user with read/write access to a container (but without
access to creat new containers) recieves a warning every time they
upload. Now, allow them to avoid the extra request and warning by
specifying --skip-container-put on the command line.

This is also useful when testing: developers can HEAD a container to
ensure it's in memcache, shut down all container servers, then upload
and creaate a bunch of async pendings. Previously, the 503 on container
PUT would prevent the object upload from even being attempted.

Closes-Bug: 1317956
Related-Bug: 1204558
Change-Id: I3d9129a0b6b65c6c6187ae6af003b221afceef47
Related-Change: If1f8a02ee7459ea2158ffa6e958f67d299ec529e
2022-01-11 16:39:38 -08:00
Zuul
3f5d5b0252 Merge "Include storage policy when listing account with --long" 2021-10-13 01:11:03 +00:00
Zuul
ec6a346afb Merge "Allow functional tests to pass with etag_quoter enabled by default" 2021-09-24 02:35:55 +00:00
Zuul
e03a11c649 Merge "Allow unit tests to be run via pytest" 2021-09-23 23:56:23 +00:00
Tim Burke
373fa26ce1 Correctly aggregate totals for >10k items
Previously, we would write out totals for every page of listings, like

    $ swift list sync --prefix=09-21 --total -l
     80000000000
     80000000000
     80000000000
     58096000000

Now, roll those all into a single total:

    $ swift list sync --prefix=09-21 --total -l
    298096000000

Change-Id: Icc265636815220e33e8c9eec0a3ab80e9f899038
2021-09-21 16:06:56 -07:00
Tim Burke
ad3e8e49d0 Include storage policy when listing account with --long
Change-Id: Ibc2f9445b5a8e80cfb73d0706e20a7e4c62eec4a
2021-09-21 08:40:45 -07:00
Tim Burke
5129b33505 Only log the traceback for non-404s
Change-Id: I08ba4a3120e99b444b13f1ca6f5493529868df26
2021-09-20 15:49:59 -07:00
Tim Burke
553e34ebfe Improve formatting for billions of objects
Change-Id: If8aa08c4c8c8ad6ca2c861602baf1eefa8642a8a
2021-09-20 15:49:59 -07:00
bcf19d47a3 Add Python3 yoga unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for yoga.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Icf192aedeadf7fbed6e0f217da5b348172dc4478
2021-09-16 08:51:57 -07:00
218676a990 Update master for stable/xena
Add file to the reno documentation build to show release notes for
stable/xena.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.

Sem-Ver: feature
Change-Id: I79a7fbda1ea9ae034d009c54be4b401809183c42
2021-09-16 08:51:57 -07:00
jinyuanliu
afa2c4642a Clean up extra spaces
Although these errors are not important, they affect the code specification.

Change-Id: Ifab29d9c803a78ee994b99b4b410893864b90908
2021-09-15 01:55:48 -04:00
wu.shiming
b846071d2f Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I244d98bb3fc7cb75624b598f4d26f784159f5428
2021-07-06 16:15:55 +08:00
Tim Burke
abda44a87d Use upper-constraints for docs jobs
Looks like there are some issues with too-new-Sphinx and the PDF docs
builds.

Also, get devstack installing on bionic again for our py2 func test job.

Change-Id: I633398054694fe6ba1e0de50278f274daf69fefd
2021-05-25 12:20:23 -07:00
Tim Burke
6d8138ebcf Allow functional tests to pass with etag_quoter enabled by default
Change-Id: I861b5e0a172f0ea0a5b1fe8389cd70da8d4b5d5d
2021-05-11 13:42:47 -07:00
Tim Burke
99b5b81217 Allow unit tests to be run via pytest
You can run all tests by just running

   $ pytest

Or just unit tests with

   $ pytest test/unit/

Or one specific test with

   $ pytest test/unit/test_swiftclient.py::TestConnection::test_reauth

Change-Id: I1dfa239f9ee9ea85663b5c1f22631a97f87b4dfc
2021-05-11 13:34:35 -07:00
Zuul
38c435f888 Merge "setup.cfg: Replace dashes with underscores" xena-em 2021-05-06 08:14:07 +00:00
Zuul
22e2605367 Merge "Use py3 as the default runtime for tox" 2021-05-06 04:59:58 +00:00
yangyawei
2beddc2f30 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: Ief2c7a217914dc5cacdffc6959ed0585fc6a1225
2021-05-03 10:51:40 +08:00
jonasdlindner
58f0700ad9 Fix Typo in shell.py
Change-Id: I2615e0d6b54d8cc020c24d1b5b4064e038f0934b
2021-04-29 17:39:28 +02:00
zhangboye
998bb8b578 Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update
this at each new cycle.

Change-Id: I4a54455e7e8b1b4de2f9656d13f65ef090da68eb
2021-04-20 15:11:06 +08:00
Zuul
eaf40510fa Merge "Add Python3 xena unit tests" 2021-03-26 05:02:29 +00:00
6966fbea57 Add Python3 xena unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for xena.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Ic272b2583f9e0ff5f1b542ce9596af9d3bf8edef
2021-03-22 11:59:41 -07:00
c8b48dee58 Update master for stable/wallaby
Add file to the reno documentation build to show release notes for
stable/wallaby.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.

Sem-Ver: feature
Change-Id: Idcc50c36c1fac81ed214bcbaf6a97307e3db7ee7
2021-03-22 11:59:01 -07:00
Tim Burke
06b36ae0e2 Drop lower-constraints testing
The OpenStack community consensus seems to be that it's not worth the
hassle of fixing. *Maybe* we can revisit this if we ever drop py2
support?

Reasonable spot to start on ML threads:
http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019672.html

Change-Id: Ibf0c891782afe014cc453b713a94c187340d172e
Depends-On: https://review.opendev.org/c/openstack/requirements/+/777025
wallaby-em
2021-02-22 16:05:25 -08:00
zhangboye
e6876361f0 remove unicode from code
Change-Id: I791cc993aef832b30c08fdb5bdd7165a074d263f
2021-01-03 16:44:32 +08:00
Zuul
903e0cb64a Merge "Make py39 voting" 2020-11-03 04:49:23 +00:00
Tim Burke
a5aebc3b9a Make py39 voting
Also, add trove classifier for py39.

Depends-On: https://review.opendev.org/#/c/758813/
Change-Id: I8d33b4dd6af990b09141acd52d36e44e9c871b3b
2020-10-19 11:08:23 -07:00
Tim Burke
74c50dee2d Have delete --all imply --versions for the CLI
Change-Id: Id5a6d4cef3d4ed76c897a099a62a4ba3ed8f8dab
2020-10-16 13:57:02 -07:00
Zuul
fcd8488ec4 Merge "Remove some py38 job cruft" 2020-10-16 08:36:48 +00:00
Zuul
bf862981a6 Merge "Close connections created when calling module-level functions" 2020-10-15 22:41:10 +00:00
Tim Burke
de5c74069e Remove some py38 job cruft
For a time, we wanted to flag it as being voting while it still wasn't
voting for most of OpenStack. It's not needed now, though.

Change-Id: Idccb731a0814335fc4d314eed5caa1f336212b22
2020-10-15 11:45:55 -07:00
Zuul
90c10fab43 Merge "tests: Make test_delete_container_versions less flakey" 2020-10-14 03:56:46 +00:00
Tim Burke
97aa3e6541 Close connections created when calling module-level functions
Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Change-Id: Id62e63afc6f2ffa32eb8640787c78559481050f9
Related-Change: I200ad0cdc8b7999c3f5521b9a822122bd18714bf
Related-Bug: #1873435
Closes-Bug: #1838775
2020-10-13 10:45:07 -07:00
Zuul
89994a7ad0 Merge "Add cacert test config option" 2020-09-23 22:14:55 +00:00
Zuul
ef7380048e Merge "Add Python3 wallaby unit tests" 2020-09-23 20:53:19 +00:00
Zuul
b5dd9caeb0 Merge "Update master for stable/victoria" 2020-09-23 20:35:49 +00:00
Zuul
d63ec1b38d Merge "Include transaction ID in ClientException.__str__" 2020-09-22 01:56:50 +00:00
Zuul
2c28691f86 Merge "[goal] Migrate testing to ubuntu focal" 2020-09-22 01:28:48 +00:00
Tim Burke
c73792c2e5 tests: Make test_delete_container_versions less flakey
Hammering that test in a tight loop, I'd often see failures due to
ordering issues. Make the delete single-threaded to avoid that.

Change-Id: Iff45be32a7c3f258214cce78001fd33ad0a39b8c
2020-09-21 16:40:09 -07:00
5728bf4a50 Add Python3 wallaby unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for wallaby.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I9a2e832e8165232c15731cfb97d401c84abf95c0
2020-09-21 10:17:03 -07:00
16b377c623 Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: Ic1dc50f7e9d0b38f04a114eb22de25466ba83e56
Sem-Ver: feature
2020-09-21 10:17:03 -07:00
Zuul
b13712949f Merge "(Mostly) revert "Cleanup session on delete"" 2020-09-19 03:44:31 +00:00
Ghanshyam Mann
9f69908f75 [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

- Keep py2 functional job run on Bionic node

Story: #2007865
Task: #40221

Change-Id: I578abeb1552d73a2e5c5a24ba7afab975508ea0c
2020-09-19 01:39:35 +00:00
Andreas Jaeger
e367b6270c Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I4418f86c3066353d43758118865baf66d1741c79
2020-09-18 12:22:01 -07:00
Tim Burke
5cb9061487 Clean up some requirements
* Drop the py26 marker for futures; we don't support 2.6 anymore.
* Split hacking version used based on python version.
* Clean up sphinx split -- 2.0+ aren't available to install on py2,
  anyway.

Depends-On: https://review.opendev.org/#/c/752340/
Depends-On: https://review.opendev.org/#/c/752736/
Change-Id: I5a6ba8e65c23ada7297f6684dcbdd886591d0af5
2020-09-18 12:22:01 -07:00
Tim Burke
0f6713ed5b Include transaction ID in ClientException.__str__
It's fairly annoying getting a traceback in swift's probe tests then
only having a URL and status code to go searching for in logs.

Leave the shell.py output untouched, though, since we output the
transaction ID on a new line anyway.

Change-Id: Idb849848ec08b6c04812b088467c9a687c2a7e27
2020-09-09 15:32:43 -07:00
Tim Burke
0c70d164ba (Mostly) revert "Cleanup session on delete"
This reverts commit 1f26c5736949e1c3b57c024a315e33fc419f126e for py2.
Apparently the existence of the __del__ method on Python 2 prevents us
from cleaning up all file descriptors.

Change-Id: Id6cff5dd7b9faf9c4240c0cb26b74d05ed37da5b
Closes-Bug: #1873435
Related-Bug: #1838775
2020-09-08 15:04:54 -07:00
Zuul
9d8db8f612 Merge "Speed up test_lazy_connections" victoria-em 2020-09-03 04:12:21 +00:00
Tim Burke
89c8d9b853 Speed up test_lazy_connections
It doesn't really need to sleep a full second.

Change-Id: Ida80f0c5a983edb33a93662badb6aa1a25f9a27c
2020-07-28 11:28:30 -07:00
Meuh
842086d27f Add max_backoff and starting_backoff for get_conn in swift service
Change-Id: I45f5d3009e0e2015c7366384ee826113fc27c70b
2020-07-28 20:03:11 +02:00