Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worker Manager: support test payloads in registerWorker #6892

Open
petemoore opened this issue Mar 8, 2024 · 0 comments · May be fixed by #6893
Open

Worker Manager: support test payloads in registerWorker #6892

petemoore opened this issue Mar 8, 2024 · 0 comments · May be fixed by #6893
Assignees

Comments

@petemoore
Copy link
Member

petemoore commented Mar 8, 2024

For the purposes of integration testing, it is useful for worker tests to be able to call real taskcluster services in addition to mocks. This way, if the behavior of mocks and real services unexpectedly deviate, we can catch the issues before making a release.

Currently there is no way to successfully call workerManager.registerWorker for a non-static worker unless Worker Manager created the worker where the API call originates, which is not the case during integration testing. This is intentional in a production scenario, however severely limiting in an integration testing scenario.

In order to address this, it would be useful to reserve a special provisionerId (test-provisioner-id) that when used will slightly alter the behaviour of workerManager.registerWorker. Rather than looking up the worker in the database of Worker-Manager-spawned workers, and only returning successfully if exactly one suitable worker can be found, instead, the worker credentials, secret, and expiry can be given fake (reserved) values, and the worker config can be returned as if the call was successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant