infinitered / solidarity

Solidarity is an environment checker for project dependencies across multiple machines.
https://infinitered.github.io/solidarity/
MIT License
639 stars 48 forks source link

Snapshot update #134

Closed mattathompson closed 6 years ago

mattathompson commented 6 years ago

Work in progress #75

GantMan commented 6 years ago

Looks like it's broke on windows as of right now.

mattathompson commented 6 years ago

@gantman, the appVoyer runner is for windows? That makes much more sense.

The issue is around the use of the spread operator. I'll look into windows/node limitations.

skellock commented 6 years ago

It's a problem introduced upstream in gluegun with the new table stuff.

Is Appveyor targeting < 8.6 of Node. If so, then great. We should have checks like this up on gluegun.

skellock commented 6 years ago

Ok, I have PR in place now. We'll get this merged in shortly and cut a new build of gluegun.

mattathompson commented 6 years ago

Thanks for picking that up @skellock

codecov[bot] commented 6 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@d55a791). Click here to learn what that means. The diff coverage is 95.28%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #134   +/-   ##
=========================================
  Coverage          ?   81.54%           
=========================================
  Files             ?       28           
  Lines             ?      531           
  Branches          ?       83           
=========================================
  Hits              ?      433           
  Misses            ?       66           
  Partials          ?       32
Impacted Files Coverage Δ
src/types.ts 100% <ø> (ø)
...c/extensions/functions/appendSolidaritySettings.ts 100% <100%> (ø)
src/commands/snapshot.ts 52.27% <90.9%> (ø)
src/extensions/functions/ruleHandlers.ts 93.93% <93.93%> (ø)
...c/extensions/functions/buildSpecificRequirement.ts 94.73% <94.73%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d55a791...4af9018. Read the comment docs.

GantMan commented 6 years ago

image ^ having trouble actually adding a file rule.

That error message I added to your code, to identify the issue.

GantMan commented 6 years ago

Also, looks like it's overwriting and not appending: image

mattathompson commented 6 years ago

Yeah, I saw that when writing more specs this evening. I've got a fix for that but, I'm working through some test failures.

GantMan commented 6 years ago

@mattathompson - cool bud! Let me know when you want me to test again 👍

mattathompson commented 6 years ago

Yeah, I haven't had as much time as I'd like to work on opensorce this week. I'll ping you when it's ready.

On Nov 29, 2017 10:27 PM, "Gant Laborde" notifications@github.com wrote:

@mattathompson https://github.com/mattathompson - cool bud! Let me know when you want me to test again 👍

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/infinitered/solidarity/pull/134#issuecomment-348071903, or mute the thread https://github.com/notifications/unsubscribe-auth/AF83KwWub59U-rgZ8AnkxZVyAM99ycN-ks5s7iCcgaJpZM4QqhGY .

mattathompson commented 6 years ago

@GantMan: Playing around with the new functionality I've noticed one use case of interest:

Adding a rule that already exists in the solidarity file... Should we handle that? I built something to handle it w/ cli rules but, would need to extend to all of the other rules.

Or.. Should we just let the user add rules regardless of the fact that they already exists? If so i can just remove that code.

GantMan commented 6 years ago

Just pulled latest, here's my report:

Clean up the unexpected path experience.

Duplicates (as you already pointed out)

I think replacing would be best.

New Shell Command


This PR is starting to really shape up. Let me know if I can help in any way 👍

GantMan commented 6 years ago

Heya @mattathompson - just got back from a biz trip. Anything I can do to help?

mattathompson commented 6 years ago

@GantMan, I'm working on this today. I've addressed all the issues but one so far. Currently right now if you add a duplicate you end up just having two of the same rule.

Thinking through a solution for that.

GantMan commented 6 years ago

Awesome bud. Let me know if I can help in any way.

GantMan commented 6 years ago

Btw I’m presenting this lib at a meetup on the 19th! I’ll be giving you a shoutout

TravisBuddy commented 6 years ago

Travis tests have failed

Hey Matthew Thompson, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

Node.js: node

Node.js: 8

mattathompson commented 6 years ago

@GantMan Ready for Review. Need to update the documentation but, this is good to test drive/ code review.

TravisBuddy commented 6 years ago

Travis tests have failed

Hey Matthew Thompson, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

Node.js: node

npm run test:ci ``` > solidarity@1.1.0 test:ci /home/travis/build/infinitered/solidarity > jest --ci && tslint -p . PASS __tests__/schema/validateExampleSchema.ts (22.658s) events.js:136 throw er; // Unhandled 'error' event ^ Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at ChildProcess.target.send (internal/child_process.js:606:16) at Object.send (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/fork.js:24:17) at Farm.stopChild (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:131:11) at Farm. (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:96:10) at ontimeout (timers.js:466:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! solidarity@1.1.0 test:ci: `jest --ci && tslint -p .` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the solidarity@1.1.0 test:ci script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/travis/.npm/_logs/2017-12-21T15_31_08_910Z-debug.log ```


TravisBuddy commented 6 years ago

Travis tests have failed

Hey Gant Laborde, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

Node.js: node

npm run test:ci ``` > solidarity@1.1.0 test:ci /home/travis/build/infinitered/solidarity > jest --ci && tslint -p . PASS __tests__/commands/help.ts (22.263s) PASS __tests__/command_helpers/removeNonVersionCharacters.ts (25.062s) PASS __tests__/docs/testDocs.ts (26.673s) PASS __tests__/command_helpers/checkENV.ts (27.238s) PASS __tests__/command_helpers/setSolidaritySettings.ts (27.055s) PASS __tests__/schema/validateExampleSchema.ts (27.083s) PASS __tests__/command_helpers/getLineWithVersion.ts (27.91s) PASS __tests__/command_helpers/skipRule.ts (28.871s) PASS __tests__/command_helpers/getSolidaritySettings.ts (32.396s) events.js:136 throw er; // Unhandled 'error' event ^ Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at ChildProcess.target.send (internal/child_process.js:606:16) at Object.send (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/fork.js:24:17) at Farm.stopChild (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:131:11) at Farm. (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:96:10) at ontimeout (timers.js:466:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! solidarity@1.1.0 test:ci: `jest --ci && tslint -p .` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the solidarity@1.1.0 test:ci script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/travis/.npm/_logs/2017-12-21T17_07_32_845Z-debug.log ```


mattathompson commented 6 years ago

We've been getting this random failure ^ Not sure what this is about. I've seen it now twice in different tests. Have not seen it locally.

GantMan commented 6 years ago

I believe it's a timeout issue. I can increase the timeout for those tests. I merged your code with master, will test soon.

mattathompson commented 6 years ago

🔥 🔥

GantMan commented 6 years ago

Bug

❌ Add new shell asks for what to match against, but does not add match prop to .solidarity file

UX issues

❌ Create rule without name but do not type name when prompted (accidental enter issue) result: creates name undefined in json ❌ Add new requirement, but do not type a name (creates name undefined in json) ❌ When adding a shell rule, it says "What is the name of the shell you'd like to add rule for", perhaps here it should say "What is the shell command you'd like to add a rule for"

Summary

Dude, epic PR! just a few issues to make it mergable. Also, do you want to do the docs in this PR or a separate one? I can help 👍

mattathompson commented 6 years ago

Whatever you think is best regarding the documentation! If you want to knock those out I can start on the issues you've raised.

I'm on staycation starting now so I should be able to knock these out pretty quickly.

Thanks for your review!

mattathompson commented 6 years ago

Outstanding Items

UX issues

GantMan commented 6 years ago

Looking good so far! 👍

TravisBuddy commented 6 years ago

Travis tests have failed

Hey Matthew Thompson, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

Node.js: node

npm run test:ci ``` > solidarity@1.1.0 test:ci /home/travis/build/infinitered/solidarity > jest --ci && tslint -p . PASS __tests__/commands/help.ts (18.602s) PASS __tests__/command_helpers/skipRule.ts (21.114s) PASS __tests__/command_helpers/removeNonVersionCharacters.ts (21.242s) PASS __tests__/docs/testDocs.ts (20.717s) PASS __tests__/command_helpers/getLineWithVersion.ts (21.593s) PASS __tests__/command_helpers/checkENV.ts (21.539s) PASS __tests__/schema/validateExampleSchema.ts (21.102s) PASS __tests__/command_helpers/setSolidaritySettings.ts (27.351s) events.js:136 throw er; // Unhandled 'error' event ^ Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at ChildProcess.target.send (internal/child_process.js:606:16) at Object.send (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/fork.js:24:17) at Farm.stopChild (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:131:11) at Farm. (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:96:10) at ontimeout (timers.js:466:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! solidarity@1.1.0 test:ci: `jest --ci && tslint -p .` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the solidarity@1.1.0 test:ci script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/travis/.npm/_logs/2017-12-23T17_43_11_652Z-debug.log ```


mattathompson commented 6 years ago

@GantMan Barring the test passes on CI all the issues have been addressed.

TravisBuddy commented 6 years ago

Travis tests have failed

Hey Matthew Thompson, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

Node.js: node

npm run test:ci ``` > solidarity@1.1.0 test:ci /home/travis/build/infinitered/solidarity > jest --ci && tslint -p . PASS __tests__/command_helpers/removeNonVersionCharacters.ts (17.798s) PASS __tests__/command_helpers/getLineWithVersion.ts (17.874s) PASS __tests__/command_helpers/skipRule.ts (18.972s) PASS __tests__/commands/help.ts (19.308s) PASS __tests__/command_helpers/checkENV.ts (19.382s) PASS __tests__/command_helpers/setSolidaritySettings.ts (19.165s) PASS __tests__/docs/testDocs.ts (19.209s) PASS __tests__/schema/validateExampleSchema.ts (20.087s) events.js:136 throw er; // Unhandled 'error' event ^ Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at ChildProcess.target.send (internal/child_process.js:606:16) at Object.send (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/fork.js:24:17) at Farm.stopChild (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:131:11) at Farm. (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:96:10) at ontimeout (timers.js:466:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! solidarity@1.1.0 test:ci: `jest --ci && tslint -p .` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the solidarity@1.1.0 test:ci script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/travis/.npm/_logs/2017-12-23T19_56_02_003Z-debug.log ```


TravisBuddy commented 6 years ago

Travis tests have failed

Hey Matthew Thompson, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

Node.js: node

npm run test:ci ``` > solidarity@1.1.0 test:ci /home/travis/build/infinitered/solidarity > jest --ci && tslint -p . PASS __tests__/commands/help.ts (27.775s) PASS __tests__/command_helpers/setSolidaritySettings.ts (27.552s) PASS __tests__/command_helpers/getLineWithVersion.ts (28.832s) PASS __tests__/command_helpers/checkENV.ts (28.452s) PASS __tests__/docs/testDocs.ts (27.951s) PASS __tests__/command_helpers/skipRule.ts (29.485s) PASS __tests__/command_helpers/removeNonVersionCharacters.ts (29.99s) PASS __tests__/schema/validateExampleSchema.ts (30.672s) events.js:136 throw er; // Unhandled 'error' event ^ Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at ChildProcess.target.send (internal/child_process.js:606:16) at Object.send (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/fork.js:24:17) at Farm.stopChild (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:131:11) at Farm. (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:96:10) at ontimeout (timers.js:466:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! solidarity@1.1.0 test:ci: `jest --ci && tslint -p .` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the solidarity@1.1.0 test:ci script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/travis/.npm/_logs/2017-12-23T20_20_14_465Z-debug.log ```


mattathompson commented 6 years ago

@GantMan, Thoughts ^ seems to be happening more frequently after adding a few more tests.

TravisBuddy commented 6 years ago

Travis tests have failed

Hey Matthew Thompson, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

Node.js: node

npm run test:ci ``` > solidarity@1.1.0 test:ci /home/travis/build/infinitered/solidarity > jest --ci && tslint -p . PASS __tests__/command_helpers/skipRule.ts (23.052s) PASS __tests__/docs/testDocs.ts (23.209s) PASS __tests__/schema/validateExampleSchema.ts (23.068s) PASS __tests__/command_helpers/setSolidaritySettings.ts (24.206s) PASS __tests__/command_helpers/getLineWithVersion.ts (24.061s) PASS __tests__/command_helpers/removeNonVersionCharacters.ts (25.784s) PASS __tests__/command_helpers/checkENV.ts (26.352s) PASS __tests__/commands/help.ts (26.948s) events.js:136 throw er; // Unhandled 'error' event ^ Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at ChildProcess.target.send (internal/child_process.js:606:16) at Object.send (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/fork.js:24:17) at Farm.stopChild (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:131:11) at Farm. (/home/travis/build/infinitered/solidarity/node_modules/worker-farm/lib/farm.js:96:10) at ontimeout (timers.js:466:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! solidarity@1.1.0 test:ci: `jest --ci && tslint -p .` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the solidarity@1.1.0 test:ci script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/travis/.npm/_logs/2017-12-24T03_37_51_562Z-debug.log ```


GantMan commented 6 years ago

@mattathompson - looks like it might be timout.

We can adjust it like so: https://github.com/infinitered/solidarity/blob/d55a791bab899ef50f210f0895b430af87b30d5b/__tests__/integration/solidarity-check/check-invalid.ts#L11

Or jest.setTimeout(10000); // 10 second timeout

GantMan commented 6 years ago

I re-ran tests. Looks good now! Also did a quick local test 👍

Let's do docs in a separate PR - Let me know if you want them or if I should.

GantMan commented 6 years ago

It's ALIVE!!!!

noice

mattathompson commented 6 years ago

NOICE! Love me some Jurassic Park.

On Sat, Dec 23, 2017 at 11:25 PM, Gant Laborde notifications@github.com wrote:

It's ALIVE!!!!

[image: noice] https://camo.githubusercontent.com/0428042a51b7a8dabf4b079d6e37b017503d9020/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f52517a7841614167336141552f67697068792e676966

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/infinitered/solidarity/pull/134#issuecomment-353764535, or mute the thread https://github.com/notifications/unsubscribe-auth/AF83KwTdbiL_UgxsyOGO1lns2aOcLfJEks5tDdIngaJpZM4QqhGY .