Commit Graph

1129 Commits

Author SHA1 Message Date
Zuul ce4fb27b53 Merge "reno: Update master for unmaintained/xena" 2024-03-21 16:26:24 +00:00
Zuul 9c313c7893 Merge "reno: Update master for unmaintained/wallaby" 2024-03-21 16:21:10 +00:00
OpenStack Release Bot 32397333ea reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.

Change-Id: I478a6bb6c5372f26e1001b05930b108fac14c6be
2024-03-12 10:49:14 +00:00
OpenStack Release Bot 6c2d5887d1 reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.

Change-Id: I0d228453dae70e0ce36b2ca4c893784d077ae0cb
2024-03-12 10:48:38 +00:00
OpenStack Release Bot 0dacfe7257 reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: Ia2bc3dfffcf0804b127eb6d81ff76e52ed702ec1
2024-03-12 10:47:52 +00:00
Zuul fa9718deee Merge "Add transaction id to errors" 2024-03-01 20:38:52 +00:00
Yan Xiao ac2a60dc0d Add transaction id to errors
Add transaction id to errors to help troubleshoot, including error
when downloading object with truncted/missing segment, stat'ing or
listing non-existent container.

Change response headers returned by client.py Connection APIs
such as get_object() from lowercase dict to CaseInsensitiveDict,
as some error paths rely on this to retrieve the transaction id,
while there are existing code paths using response.headers which
is CaseInsensitiveDict from requests lib.

Change-Id: Ice9cc9fe68684563f18ee527996e5a4292230a96
2024-03-01 09:59:33 -05:00
Tim Burke 27171d981c Authors / changelog for 4.5.0
Change-Id: I7fd65c32a7034fc5d1e01fc822b9771d49ad81c2
2024-02-27 09:14:44 -08:00
Tim Burke 153f4cd277 CI: Fix py36 and py37 jobs
The openstack/requirements repo has dropped support for these versions
of python; as a result, some constraints have moved forward to versions
requiring py38+.

Fortunately, the Python ecosystem has gotten much better about specifying
Python version requirements, so we should be clear to just trust the
package metadata to get us a useful version.

Change-Id: I44941d9f7cb145631a0daae2d12cfe85be854f6f
2024-02-27 08:50:27 -08:00
Tim Burke 3de67228a8 CI: add py39 and py310 to experimental pipeline
The openstack-python3-jobs template covers py38 and py311, with the
assumption that intermediate Python releases should pass, too. Since
we already have an experimental pipeline to spot-check that tests
still pass on various Python versions, include those intermediate
releases as well.

Change-Id: I0b4e8839ec14a4ad7529a9929f1150e5bc586059
2024-02-27 08:50:27 -08:00
Zuul 9366d86220 Merge "shell: Print friendly account byte quotas" 2024-02-27 07:32:53 +00:00
Tim Burke 0ec6246ac9 CI: skip func tests on irrelevant changes
These tests take 5-30x longer than the unit tests & style check; only
run them if there's a reason to think their outcome might have changed.

Change-Id: I2ccee79538f8bf6408e7bfb8a9826201180a41fe
2024-02-26 14:25:34 -08:00
Zuul 6af54cf481 Merge "CI: constrain deps for tests" 2024-02-26 22:13:23 +00:00
Tim Burke 3c529ceb70 CI: constrain deps for tests
Previously, we ran unconstrained so we could piggy-back off our extras,
but it causes issues in stable gates.

Change-Id: I5b04a1e4d6fb46cdcd50b547aa52290b8bf022ab
2024-02-26 10:49:34 -08:00
Zuul 0e8f64f2d3 Merge "lint: Up-rev hacking" 2024-02-26 06:51:21 +00:00
Matthew Oliver 1e0ab242ca lint: Up-rev hacking
Without up-reving hacking python 3.12 can't be used for pep8/flake8
checks. Also address a few new pyflakes issues that seem reasonable
to enforce:

   E275 missing whitespace after keyword
   H214 Use assertIn/NotIn(A, B) rather than
        assertTrue/False(A in/not in B)
   H211 do not compare types, use assert{Is,IsNot}Instance

Add F811 (redefinition of unused 'function'), as this check makes
client.py fail.

And noqa some longer lines that we're happy to carry.

Change-Id: Ic97698a310ffe7114b668b8c4bc0195f6997bb45
2024-02-21 17:14:27 +00:00
OpenStack Release Bot 16224e36e8 reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.

Change-Id: Ia6a273d087867c271832413e7aa41a27feab23c5
2024-02-08 14:39:47 +00:00
Zuul b9fb6ca1d0 Merge "make setup dependencies discoverable" 2024-01-25 22:38:27 +00:00
DavHau 85a3e827a5 make setup dependencies discoverable
Currently, dependency resolvers like the one of PDM, cannot resolve the
setup dependencies correctly, as those are hidden inside the python
code of setup.py

Supplement setup.py with pyproject.toml. Note that we can't remove
setup.py yet, as it remains part of OpenStack's Project Testing
Interface.

Change-Id: Ifb414df2577bc9ada78eaa26747da4f4bd673dda
2024-01-25 10:15:48 -08:00
DavHau 45a311fc62 Remove duplicate script entry leading to broken wheel build
The entry_point option already defines the /bin/swift script implicitly.
The definition of `scripts=bin/swift` ontop of that leads to a corrupt wheel build and can lead to a collision error during installation:
FileExistsError: File already exists: [...]/bin/swift

Closes-Bug: #1996959
Change-Id: I17d0c2b02555172eeedaa164aad956691ccb3b0a
2024-01-11 21:26:54 +00:00
Zuul 7e65d10199 Merge "tests: Fix call assertion" 2024-01-02 20:17:06 +00:00
Tim Burke 6f01f84ce2 tests: Fix call assertion
Under py312, MagicMock.has_calls raises an AttributeError. This is
actually a good thing, as previously we weren't actually making the
assertions we thought we were making.

Fix the one place that we forgot the leading `assert_`, and switch it
to `any_order=True`; this is required for the test to pass, as there
are additional calls between the two expected calls.

See https://github.com/python/cpython/commit/1d4d677d

Change-Id: Ia2ff2f198b4c1312a3e7dce32f11b87050683d45
2023-12-15 12:26:21 -08:00
Zuul c62357c32f Merge "tests: Skip keystoneauth tests if not available" 2023-10-17 20:50:21 +00:00
Tim Burke 4698f1f642 shell: Print friendly account byte quotas
This gives us an opportunity to give it more human-friendly units
when doing a `stat --lh`.

Change-Id: I01c02ffcba94d89ae03f87c1c64afca4d491a895
2023-10-06 10:00:39 -07:00
OpenStack Release Bot 44f11384ff Update master for stable/2023.2
Add file to the reno documentation build to show release notes for
stable/2023.2.

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

Sem-Ver: feature
Change-Id: I4bd3883583c1ae3e10b07815b8587b1c6be480a8
2023-09-07 14:19:59 +02:00
Tim Burke 54fbfa8bc9 ChangeLog for 4.4.0
Change-Id: I0cec9e7f88323d63dde7f78677b340fb3a53d19f
2023-08-25 09:43:43 -07:00
Tim Burke eb5d5d464c Clean up CI jobs
We no longer need our own py311 job; there is now an openstack-tox-py311
included in openstack-python3-jobs (though we want to make it voting).

Additionally, that template has marked py39 and py310 jobs as voting, so
we no longer need to do that ourselves.

Change-Id: Ie964678af069d5255e463ef22b1b53957d28f918
2023-08-25 09:43:43 -07:00
Tim Burke ff8731bde1 Remove pypy from bindep.txt
We haven't tested under pypy since 2020, and haven't done so
*successfully* for even longer.

As that was the only remaining set of packages in bindep.txt,
remove it entirely.

Related-Change: Ibc80d23846b364bfcd82043430ef71ad4b6e271b
Change-Id: I0e4abc482e546f36358f6085a6d5635490f4ac5c
2023-08-25 09:43:43 -07:00
Tim Burke 9331880e73 tests: Fix timeout assertion for py36, py37
The kwargs property was introduced in py38.

Change-Id: Id380fee6a2131bf88baa27145c8158277eef10c1
2023-08-25 09:43:43 -07:00
Tim Burke c52e404262 tests: Skip keystoneauth tests if not available
Change-Id: I80af28b49415c5bea6399683922b6649f04ed011
2023-07-07 14:32:05 -07:00
Tim Burke 90f565009a Declare py311 support
Add a voting job, update trove classifiers.

Change-Id: I757b76e3af5f667a670cdf65687f23ef2b486666
2023-07-07 12:41:48 -07:00
Tim Burke 236c2775c6 Changelog for 4.3.0 (and 4.2.0)
Change-Id: Ia5f65c19bc31053dbdb4482a23ce977aa0c3f565
2023-04-04 14:34:16 -07:00
Zuul 1ffe514621 Merge "Ensure v*password auth_type correctly implies auth version" 2023-03-24 18:02:58 +00:00
Zuul fe013f7417 Merge "trivial: Refactor os_options processing" 2023-03-24 18:02:57 +00:00
Tim Burke ee952c1bf2 Ensure v*password auth_type correctly implies auth version
Change-Id: I787b0988b7518850f1e1f93ca269f39f8cdec15c
2023-03-23 20:32:23 -07:00
Tim Burke 825145e9e6 trivial: Refactor os_options processing
Change-Id: I01c096084172ea8ebeda791016a603c59c7924cd
2023-03-23 20:32:23 -07:00
Tim Burke 9c45343845 shell: Allow uploads from stdin to specify --use-dlo
Change-Id: Id6818ab416380242cc215a980a541fc59109c69c
2023-03-23 09:05:45 -07:00
Zuul 31c279ff0e Merge "Use SLO by default for segmented uploads if the cluster supports it" 2023-03-22 16:00:44 +00:00
Zuul cd82d15506 Merge "docs: Fix code-generated docs" 2023-03-21 20:28:45 +00:00
Tim Burke f96c3cff5c docs: Fix code-generated docs
Skip multithreading since some upstream docstrings have invalid ReST.

Change-Id: I682238b8307e5a2f9bd7607676749497cd6d4261
2023-03-21 13:07:04 -07:00
Tim Burke 6a8675e897 Use SLO by default for segmented uploads if the cluster supports it
We've had SLO for nearly ten years, and it is preferable for most
use-cases. It's time to default to SLO rather than DLO.

Add a new --use-dlo option to give users a way to return to old
behavior; ensure there is still a --use-slo option so we don't break
existing scripts that may use it.

UpgradeImpact:
==============
The default segmented-upload behavior has changed; Static Large Objects
are now used by default rather than Dynamic Large Objects. To revert to
the old behavior:

* CLI users may use the new `--use-dlo` option
* Service API users may explicitly set `use_slo` to False in their
  options dicts

Change-Id: Iebcd64ced8eab6efebb9f02a0c4be6bf6338cb3b
2023-03-21 12:46:44 -07:00
Zuul 62641a2f49 Merge "Retry on SSLError" 2023-03-21 19:37:06 +00:00
Tim Burke 9e703b9345 shell: Allow timeouts to have units
Related-Change: Ibbe7e5aa8aa8e54935da76109c2ea13fb83bc7ab
Change-Id: Ifeaaea790d1dadc84b157a7cf2be7590949c70f0
2023-03-20 17:23:38 -07:00
Tim Burke 099dd66265 Retry on SSLError
...provided it isn't something to do with certification validation.

Closes-Bug: #1641363
Closes-Bug: #2011731
Change-Id: Ic3acbf431e444fcd8bc0fe79571fe2db4140cf22
2023-03-20 16:57:15 -07:00
Zuul 779cf7484e Merge "Metadata updates" 2023-03-20 16:27:40 +00:00
Tim Burke d368644bc6 Metadata updates
Include project_urls so PyPI gets more sidebar links.

Include long_description_content_type to quiet a twine warning.

Change-Id: Id3b90927ba24fd47efdbeeb2107bdae9e86e93ba
2023-03-17 16:47:34 -07:00
Tim Burke e343298240 Include transaction ID on content-check failures
Change-Id: I6b667db26ffc5dccdcadfc8c73f7accb81f03dac
2023-03-15 12:37:02 -07:00
Zuul d572ccfae9 Merge "service: Check content-length before etag" 2023-03-15 11:30:08 +00:00
Tim Burke 6adb8bb17f service: Check content-length before etag
If the received content-length does not match expectations, of course
the etag won't match!

Co-Authored-By: Alistair Coles <alistairncoles@gmail.com>
Change-Id: I1a0c066c11b94718fffbb11e13b82d0b16e01626
2023-03-14 11:56:03 -07:00
Tim Burke 16f0034e67 Switch from pkg_resources to importlib
Seen on Arch Linux:

    ModuleNotFoundError: No module named 'pkg_resources'

On new enough Python, we don't need it anyway.

Change-Id: I3d46319a36a1c2477e9f7dae0c7e40a362a17639
2023-03-14 10:41:52 -07:00