144 Commits

Author SHA1 Message Date
Tim Burke
0265d50f23 Remove nose detritus
Change-Id: Id27a6e5b79cac980aed4f9c7e7756e5e0c74fe6b
2025-02-28 08:29:39 -08:00
Matthew Oliver
4a464500c2 Version bump for 2.0.0 release
Change-Id: Iceb09fb60f7bce5fbb227eb5a66eb05a60ce6371
2.0.0
2025-02-28 12:17:16 +11:00
Zuul
13ae279d77 Merge "pypy is not checked at gate" 2025-02-27 05:46:03 +00:00
Zuul
bc8a208a37 Merge "drop mock from lower-constraints and requirements" 2025-02-27 05:38:38 +00:00
Saju
7ef87b91bc pypy is not checked at gate
Change-Id: Ibf7af10895df24231fac1868c05de34a5cf2859e
2025-02-27 16:19:01 +11:00
Hervé Beraud
a463307d54 drop mock from lower-constraints and requirements
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py39 and later, we don't need it
in lower-constraints and requirements.

These changes will help us to drop `mock` from openstack/requirements

Change-Id: I3da40f2d2ef55e4665752450059dddb188414b90
2025-02-26 21:05:42 -08:00
indianwhocodes
897a2f9b3b support container_name from cli
Change-Id: Ib3a99b0453d7e04464ffef303accf1b0c05385df
2025-02-26 20:46:59 -08:00
Zuul
13311e1159 Merge "Switch from optparse to argparse" 2025-02-27 04:17:06 +00:00
Tim Burke
b00714980d Switch from optparse to argparse
Change-Id: Ie56dc0cdcc56577570e13e48732d7d72c63820e4
2025-02-27 03:58:01 +00:00
Tim Burke
3a269af476 Read GETs in 1MB chunks
Previously, we would read the whole response into memory, which would
likely cause swift-bench to get killed when using larger objects.

Change-Id: I2b11a3c4ac4690539d3a67fc11a0f5e1777a9b7a
2025-02-27 03:57:07 +00:00
Tim Burke
dee1430b42 Up-rev hacking
And fix readfp to read_file and make sure it reads from the
start of any filelike object.

Change-Id: I8ecb3143536b9c97438af7b6b2797fb22768e7d3
2025-02-27 12:39:13 +11:00
Thomas Goirand
666fc883fa Removed Python 2 support and six
Remove the use of six and move forward with Python3 only.

Change-Id: Ia4694704e001df03ac489a4d8a491c1c784ec3f9
2024-03-11 12:50:42 +01:00
Tim Burke
e8eb9511d2 Catch connection errors and count them as failures
Previously we'd get tracebacks like this during a proxy reload:

Traceback (most recent call last):
  File ".../urllib3/connectionpool.py", line 791, in urlopen
    response = self._make_request(
  File ".../urllib3/connectionpool.py", line 537, in _make_request
    response = conn.getresponse()
  File ".../urllib3/connection.py", line 461, in getresponse
    httplib_response = super().getresponse()
  File ".../http/client.py", line 1375, in getresponse
    response.begin()
  File ".../http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File ".../http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File ".../urllib3/connectionpool.py", line 845, in urlopen
    retries = retries.increment(
  File ".../urllib3/util/retry.py", line 470, in increment
    raise reraise(type(error), error, _stacktrace)
  File ".../urllib3/util/util.py", line 38, in reraise
    raise value.with_traceback(tb)
  File ".../urllib3/connectionpool.py", line 791, in urlopen
    response = self._make_request(
  File ".../urllib3/connectionpool.py", line 537, in _make_request
    response = conn.getresponse()
  File ".../urllib3/connection.py", line 461, in getresponse
    httplib_response = super().getresponse()
  File ".../http/client.py", line 1375, in getresponse
    response.begin()
  File ".../http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File ".../http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../eventlet/greenpool.py", line 88, in _spawn_n_impl
    func(*args, **kwargs)
  File ".../swiftbench/bench.py", line 477, in _run
    client.get_object(self.url, self.token,
  File ".../swiftclient/client.py", line 1252, in get_object
    conn.request(method, path, '', headers)
  File ".../swiftclient/client.py", line 416, in request
    self.resp = self._request(method, url, headers=headers, data=data,
  File ".../swiftclient/client.py", line 400, in _request
    return self.request_session.request(*arg, **kwarg)
  File ".../requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File ".../requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File ".../requests/adapters.py", line 501, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Change-Id: Idd1a83afd2c4dbf7305c19d3ec3974961e500620
2023-11-08 11:38:12 -08:00
Matthew Oliver
5f803ae8fd refactor bin/bench into swiftbench/cli for testing
The test infrastructure for swiftbench is pretty bad. In order to start
cleaning it up this patch starts with some initial scaffolding for
test_cli.py. Sd such it refactors the code out of bin/swiftbench and
puts it into swiftbench/cli/__init__.py. Leaving the cli namespace free
for future expansions.

A very basic tests/test_cli.py has been added which initialises some test
scaffolding. Additionally, fix some bugs this uncovered:

- The --delete-concurrency option now actually has an effect.
- Stop mutating global state on every run.

Partial-Bug: #1263290
Change-Id: Ibb2c3bb17522b6302697e2d2b01df3a6aa62800e
2023-07-10 15:42:23 -07:00
Tim Burke
427a16cb08 Fix SyntaxWarning
SyntaxWarning: "is not" with a literal. Did you mean "!="?
Change-Id: Iedfb1bc5fd444109f9239eb7aeb57983883acf0f
2023-07-10 14:35:37 -07:00
Zuul
f4a1509534 Merge "py3: Fix distributed benchmarking" 2023-05-16 19:47:01 +00:00
Zuul
be8295eda4 Merge "Use unversioned templates" 2023-02-17 22:26:00 +00:00
Tim Burke
db047a71e9 Fix tox.ini to work with tox4
Also, update our minversion to match swift.

Change-Id: I3d0cd6ef11f010f79367598dbb242121c7348d4d
2023-02-17 09:28:48 -08:00
Tim Burke
23aba5291e py3: Fix distributed benchmarking
Change-Id: I52b38ca4ccaec0b77d333a710e238300679cf86b
2023-02-16 18:41:37 -08:00
Takashi Kajinami
d3db1eaeb3 Use unversioned templates
... because swift-benach follows the independent release model.

Change-Id: I8650ef4f6145849076b6fdda46151a7d3eaa677d
2022-07-22 23:31:59 +09:00
HeroicHitesh
7d3192cdee Migrate from testr to stestr
Replace .testr.conf by .stestr.conf for migration and update
.gitignore, tox.ini and test-requirements.txt files accordingly

Signed-off-by: HeroicHitesh <email.hiteshkumar@gmail.com>
Change-Id: I0948bd22e257285c77fb61564684ab31080ecf54
2021-06-30 19:21:39 -07:00
Zuul
50e1e58fe8 Merge "Use py3 as the default runtime for tox" 2021-07-01 01:30:08 +00:00
Zuul
b1d91adda7 Merge "Switch to xena jobs" 2021-07-01 01:24:59 +00:00
zhangboye
9d708e6c90 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: I8225f85caa5db84d10eef91a7948306d98ba8962
2021-06-30 18:19:51 -07:00
Tim Burke
457f368f62 Switch to xena jobs
Change-Id: If21c091da5bd1648945028c20b78b6dd3bf1e856
2021-06-30 16:56:12 -07:00
Zuul
f5096bf6c8 Merge "Drop testing for py27" 2021-06-30 23:54:29 +00:00
Tim Burke
8845f72f40 py2: Import print function
Change-Id: Ia1e326d52efdddd3b97fa1c2296de7d1b5589f09
Related-Change: I46c196c389f9425c398506a4abe4dd0abed7ade9
2020-07-20 13:25:52 -07:00
Tim Burke
7d0046069a Drop testing for py27
Change-Id: Ib04148b0705beb6ae0e3d2bf6b80df0e6387a31d
2020-07-16 15:06:18 -07:00
Tim Burke
4539128ffc py3: Fix sigint handler
Change-Id: I46c196c389f9425c398506a4abe4dd0abed7ade9
2020-07-14 12:52:10 -07:00
xuanyandong
31d474723c Switch to Ussuri jobs
Change-Id: I07ef97c59658bda1f46817179164bf306718569b
2019-10-25 11:00:18 +08:00
Tim Burke
fc53cbf147 Allow users to specify object sizes with k/M/G suffixes
Change-Id: Ie8671e2313b76376d123c9d4eafcc1aff44ba0b8
2019-08-29 13:17:24 -07:00
Tim Burke
f221632a82 Port to py3
Change-Id: Ib86178259f854c15dd305dd39779a203cafb0451
2019-08-29 13:16:33 -07:00
OpenDev Sysadmins
6e047b640d OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:36:56 +00:00
Zuul
b69aab178b Merge "Change openstack-dev to openstack-discuss" 2019-01-04 00:38:43 +00:00
Tim Burke
e1acba9154 Add long_description to fix gate
With https://github.com/pypa/twine/commit/125b772 this will not be
necessary, but may as well fix the warning that would get generated.

Apparently this has been broken ever since PTI started using twine, back
in https://github.com/openstack-infra/project-config/commit/38e40c5

Change-Id: I577883ccc9441cd0eb12eae02149874c736f25a3
2019-01-03 14:25:12 -08:00
ZhijunWei
fb57d21856 Change openstack-dev to openstack-discuss
Change-Id: I64d6a472718576095657f0767ff60da6e62c683f
2018-12-04 23:37:36 -05:00
Nguyen Hai
c82ac0d7e0 import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I3c98411e9ff1840a721933e4fa23f770dc0835d5
Story: #2002586
Task: #24337
2018-08-24 16:38:11 +09:00
Zuul
df62f56c97 Merge "Remove discover from test-requirements" 2017-10-20 01:54:08 +00:00
Luong Anh Tuan
63140645a8 Replace assertEquals with assertEqual
The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.

This is part of blueprint assertequal

Change-Id: Ie6b881f594c0b3e7015e70a12d7ac720fa765736
2016-11-21 15:59:11 +07:00
reedip
b6b1e42fce Remove support for py33/py26
Python 3.3/Python 2.6 is not supported from Mitaka, as per Infra.
The following patch removes the support for the same.

Change-Id: I7c8a1a39f0e86cbd38466c2dcd611a8f513c8adc
Closes-Bug: #1526170
2016-09-10 04:11:32 +00:00
Swapnil Kulkarni (coolsvap)
7d5c39d593 Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: I794ed96bcc6b2a6d2fd83e67e485a3a099f26ca6
2016-07-21 08:44:49 +00:00
Jenkins
f773f17927 Merge "Put py34 first in the env order of tox" 2016-06-08 20:28:13 +00:00
John Dickinson
7b083851bb version bump to open 1.2.1 dev work
Change-Id: I2fa98e3cd706ab9dbc022288a8540f063ea9498c
2016-02-12 12:23:35 -08:00
John Dickinson
24d8761190 version bump for 1.2 release
Change-Id: Ief12fe5673369e9445f3f8538a875d8627dd5d0a
1.2.0
2016-02-12 12:17:27 -08:00
John Dickinson
f2354794fc added metadata section to setup.cfg
This is necessary for release tooling.

Change-Id: I96a83be91730ec8ac55502dd738b75a3a2626430
2016-02-12 12:14:01 -08:00
John Dickinson
c34a750544 version bump to open 1.2 dev work
Change-Id: I50201bafc1f623b1470a8a7f2c36002c925db3f0
2016-02-11 15:22:09 -08:00
John Dickinson
0fa52e11b8 version bump for 1.1. release
Change-Id: I5a818d5a2a73af45b60fee74f8d190d5111eb275
1.1
2016-02-11 15:21:41 -08:00
John Dickinson
0187ce57a9 authors/changelog update for 1.1. release
Change-Id: I472fb72bfaf90a11b11e4d802da3981325a95408
2016-02-11 15:07:21 -08:00
reedip
5eb2f500fd TrivialFix of Import JSON
As per the comment#12 in [1], the if loop can be removed
and json can be directly imported from bench.py

[1]: https://review.openstack.org/#/c/264486/

TrivialFix
Depends-On:I7c8a1a39f0e86cbd38466c2dcd611a8f513c8adc
Change-Id: I519753b0db0d8eee70c84afa92dfab2b943afbac
2016-01-29 00:54:43 +00:00
Janonymous
9e41cb329d Put py34 first in the env order of tox
To solve the problem of "db type could not be determined" on
py34 we have to run py34 env before py27.
This patch puts py34 first on the tox.ini's list of envs
to avoid this problem to happen.

Change-Id: Ife0c57c0d92d41018862aad744ef9af65ef87b21
Closes-bug: #1489059
2016-01-28 08:40:34 +00:00