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

RESOLVED WONTFIX

Status

Taskcluster
Worker
RESOLVED WONTFIX
7 months ago
17 days ago

People

(Reporter: garndt, Unassigned, Mentored)

Tracking

Details

(Whiteboard: good-first-bug)

(Reporter)

Description

7 months ago
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.
(Reporter)

Updated

7 months ago
Whiteboard: [good first bug]
(Reporter)

Updated

7 months ago
Mentor: garndt@mozilla.com
(Reporter)

Updated

7 months ago
Whiteboard: [good first bug] → good-first-bug

Comment 1

5 months ago
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)
(Reporter)

Comment 2

5 months ago
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)

Comment 3

5 months ago
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)
(Reporter)

Comment 4

5 months ago
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
Last Resolved: 17 days ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.