Closed Bug 1346249 Opened 7 years ago Closed 7 years ago

[docker-worker] Convert JS style to new es2015 styling

Categories

(Taskcluster :: Workers, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: garndt, Unassigned, Mentored)

Details

(Whiteboard: good-first-bug)

There are many places where old styling is being used in docker-worker despite the worker (soon to be) using a newer version of node and es2015 standards.

We should attempt to:
1. migrate all async functions to use async rather than co()
2. Be consistent with variable declarations (prefer let over var)
I'm sure there are others we want to change so we can add as we go.
Whiteboard: [good first bug]
Mentor: garndt
Whiteboard: [good first bug] → good-first-bug
Hi,

I am a newbie and would like to take up this bug. Could you please help me in getting started with it.
Flags: needinfo?(garndt)
Absolutely.  The code this bug refers to lives here: https://github.com/taskcluster/docker-worker

Most of the code that needs adjusting would be under:
https://github.com/taskcluster/docker-worker/tree/master/src/lib
and
https://github.com/taskcluster/docker-worker/tree/master/test

Editing code in either one of those locations and pushing a PR up should invoke CI tests that can test changes.  If the tests do not run please let me know.  The recommendations in the description are only ideas.  Ideally we want to modernize this code base now that we're using node6 so if there are other native features we should be using feel free to suggest those too!
Flags: needinfo?(garndt)
Hi,

I was going through the code but could not find co() in the code anymore. Is it no more being used or am i checking something wrong.
Flags: needinfo?(garndt)
It is possible that along the way since entering the bug that some of the code has already been updated.
Flags: needinfo?(garndt)
I'm guessing this isn't a good idea anyway -- we are likely transitioning to tc-worker.  Keeping d-w running on recent Nodes is worthwhile, but a wholesale upgrade to ES6 is probably not.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Component: Worker → Workers
You need to log in before you can comment on or make changes to this bug.