From 90bb027baf7d305398138c91ed5f9d72a69493da Mon Sep 17 00:00:00 2001 From: Rail Aliiev Date: Tue, 9 Jul 2019 13:23:05 -0400 Subject: [PATCH] Allow longer worker_id (#363) * Allow longer worker_id * Fix tests * Add changelog * Pin pydocstyle==3.0.0 --- CHANGELOG.md | 8 ++++++++ scriptworker/config.py | 4 ++-- scriptworker/test/test_config.py | 4 ++-- tox.ini | 1 + version.json | 4 ++-- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eb71d23..0e6febaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [23.3.3] - 2019-07-09 +### Changed +- Allow longer (up to 38 characters) worker_id + +## [23.3.2] - 2019-07-02 +### Added +- Log worker_group, worker_id, FQDN + ## [23.3.1] - 2019-07-02 ### Fixed - Fennec Release is now shipped off mozilla-esr68 diff --git a/scriptworker/config.py b/scriptworker/config.py index 1593ba51..d789996c 100644 --- a/scriptworker/config.py +++ b/scriptworker/config.py @@ -31,8 +31,8 @@ ) # Based on -# https://github.com/taskcluster/taskcluster-queue/blob/ced3b7bd824b445fd33ce0deb5de87a65f02b8b3/src/api.js#L94 -_GENERIC_ID_REGEX = re.compile(r'^[a-zA-Z0-9-_]{1,22}$') +# https://github.com/taskcluster/taskcluster/blob/8bf75678626567ec2fdae3889dff2f6d86235958/services/queue/src/api.js#L63 +_GENERIC_ID_REGEX = re.compile(r'^[a-zA-Z0-9-_]{1,38}$') _VALUE_UNDEFINED_MESSAGE = "{path} {key} needs to be defined!" diff --git a/scriptworker/test/test_config.py b/scriptworker/test/test_config.py index ff091ff7..ec81bee1 100644 --- a/scriptworker/test/test_config.py +++ b/scriptworker/test/test_config.py @@ -125,9 +125,9 @@ def test_check_config_invalid_type(t_config): @pytest.mark.parametrize("params", ("provisioner_id", "worker_group", "worker_type", "worker_id")) def test_check_config_invalid_ids(params, t_config): - t_config[params] = 'twenty-three-characters' + t_config[params] = 'way-way-way-more-than-thirty-eight-characters' messages = config.check_config(t_config, "test_path") - assert '{} doesn\'t match "^[a-zA-Z0-9-_]{{1,22}}$" (required by Taskcluster)'.format(params) in messages + assert '{} doesn\'t match "^[a-zA-Z0-9-_]{{1,38}}$" (required by Taskcluster)'.format(params) in messages def test_check_config_good(t_config): diff --git a/tox.ini b/tox.ini index 562c1369..a3c672dc 100644 --- a/tox.ini +++ b/tox.ini @@ -19,6 +19,7 @@ deps = asyncio_extras coverage>=4.2 flake8 + pydocstyle==3.0.0 flake8_docstrings mock pytest<4.1.0 diff --git a/version.json b/version.json index 0db29300..e1869bee 100644 --- a/version.json +++ b/version.json @@ -2,7 +2,7 @@ "version": [ 23, 3, - 2 + 3 ], - "version_string": "23.3.2" + "version_string": "23.3.3" }