Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating CI files #132

Merged
merged 4 commits into from
Dec 14, 2017
Merged

Updating CI files #132

merged 4 commits into from
Dec 14, 2017

Conversation

victorb
Copy link
Member

@victorb victorb commented Nov 22, 2017

This commit updates all CI scripts to the latest version

@ghost ghost assigned victorb Nov 22, 2017
@ghost ghost added the status/in-progress In progress label Nov 22, 2017
@victorb
Copy link
Member Author

victorb commented Nov 22, 2017

So upgrading wrtc (to latest 0.0.63) fixes issues on linux, but breaks thing on macOS... However, even with old version, macOS is failing in timeout in one test (even when tests timeout is set to 1 minute [Edit: I see now that that test is overriding the timeout amount...]), and miss-match in number of peers in another...

  1) TCP + WebSockets + WebRTCStar

       nodeAll.dial nodeWStar using PeerInfo:

     Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  


  2) TCP + WebSockets + WebRTCStar

       nodeAll.hangUp nodeWStar using PeerInfo:


      Uncaught AssertionError: expected [ Array(2) ] to have a length of 3 but got 2

      + expected - actual


      -2

      +3

      

      at parallel (test/nodejs-bundle/tcp+websockets+webrtc-star.js:234:48)

      at node_modules/async/internal/parallel.js:31:39

      at eachOfArrayLike (node_modules/async/eachOf.js:65:9)

      at exports.default (node_modules/async/eachOf.js:9:5)

      at _parallel (node_modules/async/internal/parallel.js:30:5)

      at parallelLimit (node_modules/async/parallel.js:88:26)

      at Timeout.check [as _onTimeout] (test/nodejs-bundle/tcp+websockets+webrtc-star.js:231:9)

package.json Outdated
@@ -6,7 +6,7 @@
"scripts": {
"lint": "aegir lint",
"build": "aegir build",
"test": "aegir test -t node -t browser",
"test": "aegir test -t node -t browser --timeout 60000",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want timeouts per tests instead of global timeouts - should gives us a better idea of what's slow. That's what we've been leaning towards at least.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think setting short timeouts and then having logic for retrying until success is the way to go, then we don't have to fiddle with timeouts.

However, this change here is just made to confirm if things are really broken, or tests are just failing because of timeouts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, "retrying until success" would look something like this:

it('nodeAll.dial nodeWStar using PeerInfo', function (done) {
nodeAll.dial(nodeWStar.peerInfo, (err) => {
expect(err).to.not.exist()
const numberOfTries = 10
const pauseBetweenTries = 10
let currentTry = 1
function check () {
console.log('checking')
const peersAll = nodeAll.peerBook.getAll()
const peersWStar = nodeWStar.peerBook.getAll()
try {
expect(Object.keys(peersAll)).to.have.length(3)
expect(Object.keys(peersWStar)).to.have.length(1)
expect(Object.keys(nodeAll.swarm.muxedConns)).to.have.length(1)
console.log('everything ok')
done()
} catch (err) {
if (currentTry >= numberOfTries) {
console.log('done trying')
done(err)
} else {
currentTry = currentTry + 1
setTimeout(check, pauseBetweenTries)
}
}
}
check()
})
})

@victorb
Copy link
Member Author

victorb commented Nov 22, 2017

Leaving this for today, back at it tomorrow.

Status:

CircleCI is failing because the machine has to be upgraged, I have not yet done this as it would mean existing PRs and PRs in-between the change is made, and this very PR is merged, would not pass.

Jenkins is having troubles with dialing on windows, ( @richardschneider oh windows god, any ideas? ), log is here:

  1) TCP + WebSockets + WebRTCStar

       nodeAll.dial nodeWStar using PeerInfo:

     Uncaught AssertionError: expected [Error: Could not dial in any of the transports or relays] to not exist

      at nodeAll.dial (test\nodejs-bundle\tcp+websockets+webrtc-star.js:199:26)

      at swarm.dial (src\index.js:267:18)

      at attemptDial (node_modules\libp2p-swarm\src\dial.js:33:20)

      at dialCircuit (node_modules\libp2p-swarm\src\dial.js:96:22)

      at dialCircuit (node_modules\libp2p-swarm\src\dial.js:138:16)

      at nextTransport (node_modules\libp2p-swarm\src\dial.js:94:18)

      at swarm.transport.dial (node_modules\libp2p-swarm\src\dial.js:106:20)

      at dialer.dialMany (node_modules\libp2p-swarm\src\transport.js:55:18)

      at f (node_modules\once\once.js:25:25)

      at map (node_modules\libp2p-swarm\src\limit-dialer\index.js:61:14)

      at node_modules\async\internal\map.js:32:9

      at node_modules\async\internal\once.js:12:16

      at iteratorCallback (node_modules\async\eachOf.js:60:13)

      at node_modules\async\internal\onlyOnce.js:12:16

      at Object.callback (node_modules\async\internal\map.js:29:13)

      at node_modules\async\internal\queue.js:101:31

      at node_modules\async\internal\onlyOnce.js:12:16

      at _dialWithTimeout (node_modules\libp2p-swarm\src\limit-dialer\queue.js:44:16)

      at Timeout.timeoutCallback [as _onTimeout] (node_modules\async\timeout.js:74:13)


  2) TCP + WebSockets + WebRTCStar

       nodeAll.hangUp nodeWStar using PeerInfo:


      Uncaught AssertionError: expected [ Array(2) ] to have a length of 3 but got 2

      + expected - actual


      -2

      +3

      

      at parallel (test\nodejs-bundle\tcp+websockets+webrtc-star.js:239:48)

      at node_modules\async\internal\parallel.js:31:39

      at eachOfArrayLike (node_modules\async\eachOf.js:65:9)

      at exports.default (node_modules\async\eachOf.js:9:5)

      at _parallel (node_modules\async\internal\parallel.js:30:5)

      at parallelLimit (node_modules\async\parallel.js:88:26)

      at Timeout.check [as _onTimeout] (test\nodejs-bundle\tcp+websockets+webrtc-star.js:236:9)

TravisCI seems fine.

@victorb victorb force-pushed the automatic-ci-script-update branch 3 times, most recently from c25791c to b08506f Compare December 13, 2017 20:51
This commit updates all CI scripts to the latest version
@ghost ghost assigned daviddias Dec 14, 2017
@daviddias
Copy link
Member

@victorbjelkholm going to merge this PR to have the latest configs and timeouts. Note that:

  • I had to revert Circle because the new config was not working
  • Jenkins still does not work fully

Mind checking why separately ?

@daviddias daviddias merged commit 67ca37c into master Dec 14, 2017
@daviddias daviddias deleted the automatic-ci-script-update branch December 14, 2017 07:14
@ghost ghost removed the status/in-progress In progress label Dec 14, 2017
maschad pushed a commit to maschad/js-libp2p that referenced this pull request Jun 21, 2023
maschad pushed a commit to maschad/js-libp2p that referenced this pull request Jun 21, 2023
## [6.0.2](libp2p/js-libp2p-tcp@v6.0.1...v6.0.2) (2022-11-17)

### Bug Fixes

* update metric names to follow prometheus naming guide ([libp2p#228](libp2p/js-libp2p-tcp#228)) ([24c5b37](libp2p/js-libp2p-tcp@24c5b37))

### Trivial Changes

* add test for filtering unix socket address ([libp2p#229](libp2p/js-libp2p-tcp#229)) ([efcfbb2](libp2p/js-libp2p-tcp@efcfbb2)), closes [libp2p#132](libp2p/js-libp2p-tcp#132)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants