Closed Bug 1553953 Opened 6 years ago Closed 6 years ago

[worker-manager] enforce same character restrictions in queue and worker-manager

Categories

(Taskcluster :: Services, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: dustin)

References

Details

worker-manager has a restricted character set for the workerType portion of its workerTypeName property. Comments indicate that this is intended to be broadly compatible with various cloud providers, which seems pretty reasonable.

If we're happy with those character limits, we should probably enforce them in the queue as well, so that we do not create tasks or queues for workerTypes that worker-manager cannot manage.

We should do this while we can still easily determine the full set of workerTypes deployed in Taskcluster (at the moment, I think they all satisfy this format). However, we could wait until we're happy enough with the workerTypeName property to extend it to the queue, and change the character restrictions at that time.

Assignee: nobody → dustin

We do have some workerTypes that violate this pattern, but they're all used internally for testing:

...
no-provisioning-nope/t9kjwsukTuyDdcn0wklR4A
no-provisioning-nope/vFdaQUk1RCSoMiOLTxRU0Q
test-dummy-provisioner/dummy-worker-AVgr2w
test-dummy-provisioner/dummy-worker-HAvSMM
...

The first is from docker-worker tests. I can't figure out what uses the second -- I only see test-dummy-provisioner in the tc-worker tests, but that project is archived. The queue's data doesn't have any tasks for any of those workers. So, I guess we'll see those when the tests break, and pick new names at that point :)

We use the latter in scriptworker integration tests. What should we use?

Ah, thanks! I did look in that repo but didn't find that line. it just needs to restrict the characters a little.

Something like

randstring = slugid.nice().lower().replace('_', '').replace('-', '')[:6]

should do the trick.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED

generic-worker is also impacted by this change:

https://travis-ci.org/taskcluster/generic-worker/jobs/575746979#L2944

We'll need a similar fix.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED

BTW I think the reason I missed this is that I looked at active workers, and generic-worker CI hadn't run in a while, so all of its workers had expired. Sorry about that!

You need to log in before you can comment on or make changes to this bug.