Closed Bug 1232793 Opened 9 years ago Closed 8 years ago

Automatically update npm modules in github repo

Categories

(Hello (Loop) :: Client, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: crafuse)

References

Details

(Whiteboard: [tech-debt])

Attachments

(3 files)

Now we've moved to github we should investigate an automatic updating system for our npm modules.

Some possibilities:

* http://greenkeeper.io/
* https://github.com/peerigon/updtr

(the greenkeeper.io might be the leader at the moment as it creates an actual PR)

Possibly worth testing this on a test github repo with minimal setup first, so that we can see how it works.
Rank: 21
Priority: -- → P2
Whiteboard: [tech-debt]
Assignee: nobody → crafuse
Testing out Greenkeeper first as recommended for ease of management.
Output of changes, see PR and commits for more details:
Links are temporary.
Dependency Diff
https://github.com/chrafuse/loop/commit/4eef5621a75b6eef62c962c0ddf051e3b8b189fb

PR Description
https://github.com/chrafuse/loop/pull/1/commits
Attachment #8699532 - Flags: review?(standard8)
Attachment #8699532 - Flags: review?(dmose)
GreenKeeper was quick to set up (allowing application to access the repo) and the PR came back under a minute or two.

Will run updtr to see if the settings work - will take more time to set up the test path.
Status: NEW → ASSIGNED
Is there anyway greenkeeper can be configured to do one PR per library?  It seems like we'd almost never want do all the libraries at once like this, since it would make it hard to bisect for any regressions...
Attachment #8699532 - Flags: review?(dmose)
2 Failures on latest versions.  Will investigate compatibility by setting lower versions but top minor versions in the package.json and re-test. Shown with package.json version tested.

babel 6.3.13 failed
"babel": "^5.8.34"

karma 0.13.15 failed
"karma": "^0.12.37",

~/loop$ updtr 
Found 8 outdated modules

Starting to update your modules...
1/8 	 ● compression 1.6.0 success
2/8 	 ● classnames 2.2.1 success
3/8 	 ● eslint-plugin-react 3.11.3 success
4/8 	 ● karma-coverage 0.5.3 success
5/8 	 ● babel 6.3.13 failed
6/8 	 ● react 0.14.3 success
7/8 	 ● karma 0.13.15 failed
8/8 	 ● webpack 1.12.9 success

Finished
Attachment #8699532 - Flags: review?(dmose)
Greenkeeper is configured to a branch, upDtr can exclude modules that are scanned and tested.  UpDtr runs first to update and test latest modules and creates the changes in the package.json.  Greenkeeper does not test the modules it suggests in the sent PR. Might be best to use upDtr to test the configuration that is set by Greenkeeper.
(In reply to Chris Rafuse :crafuse from comment #7)
> Greenkeeper does not test the modules it suggests in the sent PR.

But travis will do that automagically as soon as it sends the PR, yes?

Still curious about the answer to my question in comment 5.
Comment on attachment 8699532 [details]
Proposed package.json from GreenKeeper

So according to what's happened in Chris' repo, it looks like subsequent library updates get individual PR. However, I'd suspect if two updates came in at the same time, we'd likely get a single PR.

I think that's generally reasonable - we don't *have* to use the PRs if we think there's issues that we might want to land separately.

The bit I don't really like is the creating new branches in the master repo, however I think we're just going to have to accept that for now as the price of convenience. I do like the way greenkeeper gives details of the changelogs and things in the single-update-PRs, and that's better than other methods I've seen.

I think the way forward for this bug is now:

- Update the PR to rebase on latest master and update the currently out-of-date packages. Excluding those which fail tests, and excluding React (we know we don't want to update that atm).

- File bugs on the individual failures (and eslint) & get those fixed.

- Cycle round to check we're still up to date

- Enable Greenkeeper.
Attachment #8699532 - Flags: review?(standard8)
Attachment #8699532 - Flags: review?(dmose)
Attachment #8701514 - Flags: review?(standard8) → review+
Depends on: 1234904
Depends on: 1234905
Depends on: 1234906
No longer depends on: 1234904, 1234905, 1234906
Start the GreenKeeper service for Loop repo.  Which email id should we use and how/where should we apply the greenkeeper enable method?
Flags: needinfo?(standard8)
GreenKeeper is now enabled via my github account (as it can only be associated with one).
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(standard8)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: