Skip to content

Commit

Permalink
Allow longer worker_id (#363)
Browse files Browse the repository at this point in the history
* Allow longer worker_id

* Fix tests

* Add changelog

* Pin pydocstyle==3.0.0
  • Loading branch information
Rail Aliiev committed Jul 9, 2019
1 parent 478601d commit 90bb027
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scriptworker/config.py
Expand Up @@ -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!"


Expand Down
4 changes: 2 additions & 2 deletions scriptworker/test/test_config.py
Expand Up @@ -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):
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -19,6 +19,7 @@ deps =
asyncio_extras
coverage>=4.2
flake8
pydocstyle==3.0.0
flake8_docstrings
mock
pytest<4.1.0
Expand Down
4 changes: 2 additions & 2 deletions version.json
Expand Up @@ -2,7 +2,7 @@
"version": [
23,
3,
2
3
],
"version_string": "23.3.2"
"version_string": "23.3.3"
}

0 comments on commit 90bb027

Please sign in to comment.