Skip to content

Commit

Permalink
Fix issues with upstream jobs
Browse files Browse the repository at this point in the history
setuptools version is pinned to 70.3.0 to resolve an issue
related to this ticket:
pypa/setuptools#4483

pylint version is forced to >=3.3.0, where max-positional-arguments
functionality has been added and max-positional-arguments is set to 16:
pylint-dev/pylint#9842

Changes in functional test test_stateless_sec_group_list_find because
sec group lists from a sec group can be ordered differently each time
a request is sent to obtain them.

Changed custom_mtu_size default value from 1350 to 1300 because some
tests started failing on some jobs with:
"Requested MTU is too big, maximum is 1314"

Change-Id: Ie92d9a2f4e0dd08aeadfd720bdf4963b532decf3
  • Loading branch information
eduolivares committed Sep 30, 2024
1 parent 859ce18 commit 5768597
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,9 @@ ignored-parents=
# Maximum number of arguments for function / method.
max-args=5

# Maximum number of positional arguments for function / method (default=5.)
max-positional-arguments = 16

# Maximum number of attributes for a class (see R0902).
max-attributes=7

Expand Down
2 changes: 1 addition & 1 deletion linters-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pep8 and flake8 requirements

pre-commit >= 2.16.0 # MIT
pylint>=2.5.3 # GPL2
pylint>=3.3.0 # GPL2
2 changes: 1 addition & 1 deletion tobiko/openstack/neutron/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
default=None,
help="List of nameservers IPv6 addresses"),
cfg.IntOpt('custom_mtu_size',
default=1350,
default=1300,
help=("Customized maximum transfer unit size\n"
"Notes:\n"
" - MTU values as small as 1000 has been seen "
Expand Down
12 changes: 11 additions & 1 deletion tobiko/tests/functional/openstack/neutron/test_security_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,17 @@ def test_stateless_sec_group_list_find(self):
f"{StatelessSecurityGroupFixture.__qualname__}-{i}")
self.assertEqual(ssg_name, ssg_fixture.name)
ssg = neutron.list_security_groups(name=ssg_name).unique
self.assertEqual(ssg, ssg_fixture.security_group)
self.assertCountEqual(ssg.keys(),
ssg_fixture.security_group.keys())
for k in ssg.keys():
if k != 'security_group_rules':
self.assertEqual(ssg[k], ssg_fixture.security_group[k])
else:
# the elements from the lists ssg['security_group_rules']
# and ssg_fixture.security_group['security_group_rules']
# are equal, but they could be ordered in a different way
self.assertCountEqual(ssg[k],
ssg_fixture.security_group[k])

def test_stateless_sec_group_list_parameters(self):
for i, ssg_fixture in enumerate(self.ssg_fixture_list):
Expand Down
1 change: 1 addition & 0 deletions upper-constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ sentinels===1.0.0
seqdiag===3.0.0;python_version=='3.8'
setproctitle===1.2.2
setuptools===60.9.3;python_version=='3.8'
setuptools===70.3.0;python_version>='3.9'
simplegeneric===0.8.1
simplejson===3.17.6
six===1.16.0
Expand Down

0 comments on commit 5768597

Please sign in to comment.