Specify a workunit for node.js test and run #4572

Merged
merged 1 commit into from May 9, 2017

Conversation

Projects
None yet
3 participants
@stuhood
Member

stuhood commented May 9, 2017

Problem

Not specifying the workunit for these tasks resulted in the binary name being used as the workunit name, which was very long (especially in CI environments) and not particularly readable. And because the workunit name ends up used as a filename, it was also possible to trip filename length limits this way.

Solution

Align with the other node tasks in using the target address as the workunit name.

Result

Output looks like

11:02:45 00:03     [node]
11:02:48 00:06       [examplebird/intake-service:node-lint]

                     > ...

rather than:

11:02:45 00:03     [node]
11:02:48 00:06       [/Users/stuhood/.cache/pants/bin/node/mac/10.11/v6.9.5/node/bin/npm]

                    > ...

And filename length limits aren't triggered in cases where the HOME directory path is very long.

Not specifying the workunit resulted in the binary name being used as…
… the workunit name, which was very long (particularly in CI environments) and not particularly readable.

@stuhood stuhood added this to the 1.3.0 milestone May 9, 2017

@stuhood stuhood requested review from baroquebobcat, mateor and kwlzn May 9, 2017

@mateor

mateor approved these changes May 9, 2017

LGTM

@stuhood stuhood merged commit e26a311 into pantsbuild:master May 9, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@stuhood stuhood deleted the twitter:stuhood/specify-workunit-in-node-tasks branch May 9, 2017

stuhood added a commit that referenced this pull request May 12, 2017

Specify a workunit for node.js test and run. (#4572)
### Problem

Not specifying the workunit for these tasks resulted in the binary name being used as the workunit name, which was very long (especially in CI environments) and not particularly readable. And because the workunit name ends up used as a filename, it was also possible to trip filename length limits this way.

### Solution

Align with the other node tasks in using the target address as the workunit name.

### Result

Output looks like
```
11:02:45 00:03     [node]
11:02:48 00:06       [examplebird/intake-service:node-lint]

                     > ...
```
rather than:
```
11:02:45 00:03     [node]
11:02:48 00:06       [/Users/stuhood/.cache/pants/bin/node/mac/10.11/v6.9.5/node/bin/npm]

                    > ...
```

And filename length limits aren't triggered in cases where the HOME directory path is very long.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment