Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Adopt next aegir #961

Merged
merged 11 commits into from
Sep 8, 2017
Merged

Adopt next aegir #961

merged 11 commits into from
Sep 8, 2017

Conversation

daviddias
Copy link
Member

@dignifiedquire went ahead to try js-ipfs with next AEgir but started seeing some strange behaviors and errors. From what I can infer, the new AEgir doesn't like how interface spec tests are loaded by. See errors below:

 FAIL  test/core/interface/interface.spec.js (14.419s)
  ● Console

    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50209/ipfs/QmdQiFG5b3myVjxqT3R3kRYgXSNbBdt1uJtss8EQjLAUTC
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50210/ipfs/QmbMQ594mGbkQQD1Qy7tRwCgh3WV97zjRtXymFnUhWzDxp
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50211/ipfs/Qmf8DkFu7mV6ikxUhMYip1yjit9BhUkxmGW63pMPotPgdK
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50212/ipfs/QmWt8bnMs9RCkjCn6qzZM3GXAayQvdCY5VxqBHsPtFzBuc
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50214/ipfs/QmZdcZe4tkgjEhQpvFk3FBdqgDgvqBhP2RTeDUFZL36kmR
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50215/ipfs/QmSh3n1xmFS6ceCgtvXaPZM8Cq49tVocq1sxA9GePUoC3Z
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50216/ipfs/QmdWLvdsHkKehmdfq3dz9UKYW7Xs4xJjcBuTREeyoJ9gir
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50217/ipfs/QmeE7EEgDYyFsZ8SxdxN9STxRQCxvDaY7vuXE4HBiT3izc
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50221/ipfs/QmTo13pEYRiLjq4gc3uATFyEmKiBwXen9vnCqjHk1iDK5p
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50222/ipfs/QmRLZtQthQoXoyvaBYRVPf2SYnQZKasbvw4KWiZFtb1hae
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50223/ipfs/QmNXytQfEuEaLTmvWB45hYXGk23BUjZxwfdPgFMVFJqsJL
    console.log node_modules/interface-ipfs-core/src/pubsub.js:515
      Send/Receive 10k messages took: 3529 ms, 2833 ops / s

    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50244/ipfs/QmZijnvw9GoNQCnEWwyqYpRt4MDma8fjjLUTcR9YEPUa6U

  ● interface-ipfs-core tests › .files › encountered a declaration exception

    describe does not expect any arguments

      at Env.describe (node_modules/jest-jasmine2/build/jasmine/Env.js:299:15)
      at Suite.describe (node_modules/interface-ipfs-core/src/files.js:54:5)
      at Object.<anonymous>.module.exports [as files] (node_modules/interface-ipfs-core/src/files.js:20:3)
      at Object.<anonymous> (test/core/interface/files.js:19:6)

 PASS  test/core/create-node.spec.js (21.923s)
  ● Console

    console.log src/core/boot.js:82
      WARNING, trying to set config on uninitialized repo, maybe forgot to set "init: true"
    console.log src/core/boot.js:100
      WARNING, trying to start ipfs node on uninitialized repo, maybe forgot to set "init: true"
    console.log src/core/boot.js:82
      WARNING, trying to set config on uninitialized repo, maybe forgot to set "init: true"
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/9977/ipfs/QmbC8v1wp7aTyJk8aW2S4qtnFcY4KVpM6Y8grwWDSMEwpr

 FAIL  test/core/bitswap.spec.js (28.24s)
  ● Console

    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/50228/ipfs/QmUDuiRomnQrRW6KRAKRX2RkBwSjoSR1CaGCniL7jVzJNc

See how it is showing logs from PubSub tests and fails on the Files with an exception that is really unexpected: describe does not expect any arguments

Mind checking?

@daviddias
Copy link
Member Author

I am in love with the new way of selecting targets and entry points for tests, great job! :D

@dignifiedquire
Copy link
Member

@diasdavid that error should have been fixed from this: ipfs-inactive/interface-js-ipfs-core#148 might be others around as well. Jest validates things a bit more strict than mocha

@daviddias
Copy link
Member Author

Updated and released interface-ipfs-core to 0.31.2

Now seeing other errors:

  ● Console

    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/58556/ipfs/QmSXfXAtFagKbGp47fytiHtwAPDmDFxShNYLse7kG3gdWY
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/58557/ipfs/Qmexof9XeUaocH6QhgXQJCno4JebGZCSbJhpDGwsXQArce
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/58558/ipfs/QmYTWEiuGTcKJFuKsXPAA2Ffx35Gt4YykidmvMxQyAFJop
    console.error node_modules/jest-jasmine2/build/jasmine/Env.js:195
      Unhandled error
    console.error node_modules/jest-jasmine2/build/jasmine/Env.js:196
      Error: Unhandled "error" event. (Error: Non-base58 character)
          at Stream.emit (events.js:185:19)
          at next (/Users/imp/code/js-ipfs/node_modules/pull-stream-to-stream/index.js:117:13)
          at /Users/imp/code/js-ipfs/node_modules/pull-stream/throughs/map.js:19:9
          at /Users/imp/code/js-ipfs/node_modules/pull-stream/sources/error.js:5:5
          at /Users/imp/code/js-ipfs/node_modules/pull-stream/throughs/map.js:11:7
          at Immediate.drain [as _onImmediate] (/Users/imp/code/js-ipfs/node_modules/pull-stream-to-stream/index.js:108:5)
          at runCallback (timers.js:781:20)
          at tryOnImmediate (timers.js:743:5)
          at processImmediate [as _immediateCallback] (timers.js:714:5)
    console.log src/core/components/libp2p.js:50
      Swarm listening on /ip4/127.0.0.1/tcp/58559/ipfs/QmdGkRje1

and


  ● bitswap › connections › fetches a remote block › 2 peers

    data must be a buffer, was: {}

      at Object.add (node_modules/pull-reader/state.js:18:15)
      at node_modules/pull-reader/index.js:61:15
      at node_modules/pull-reader/index.js:20:7
      at WebSocket.<anonymous> (node_modules/pull-ws/source.js:23:14)
      at WebSocket.onMessage (node_modules/pull-ws/node_modules/ws/lib/WebSocket.js:442:14)
      at emitTwo (events.js:125:13)
      at WebSocket.emit (events.js:213:7)
      at Receiver.onbinary (node_modules/pull-ws/node_modules/ws/lib/WebSocket.js:848:10)
      at node_modules/pull-ws/node_modules/ws/lib/Receiver.js:628:18
      at Receiver.Object.<anonymous>.Receiver.applyExtensions (node_modules/pull-ws/node_modules/ws/lib/Receiver.js:371:5)

  ● bitswap › connections › fetches a remote block › 3 peers

    data must be a buffer, was: {}

      at Object.add (node_modules/pull-reader/state.js:18:15)
      at node_modules/pull-reader/index.js:61:15
      at node_modules/pull-reader/index.js:20:7
      at WebSocket.<anonymous> (node_modules/pull-ws/source.js:23:14)
      at WebSocket.onMessage (node_modules/pull-ws/node_modules/ws/lib/WebSocket.js:442:14)
      at emitTwo (events.js:125:13)
      at WebSocket.emit (events.js:213:7)
      at Receiver.onbinary (node_modules/pull-ws/node_modules/ws/lib/WebSocket.js:848:10)
      at node_modules/pull-ws/node_modules/ws/lib/Receiver.js:628:18
      at Receiver.Object.<anonymous>.Receiver.applyExtensions (node_modules/pull-ws/node_modules/ws/lib/Receiver.js:371:5)

  ● bitswap › connections › fetches a remote file › 2 peers

    data must be a buffer, was: {}

      at Object.add (node_modules/pull-reader/state.js:18:15)
      at node_modules/pull-reader/index.js:61:15
      at node_modules/pull-reader/index.js:20:7

@daviddias
Copy link
Member Author

✅ Browser tests are working fine in isolation

@dignifiedquire
Copy link
Member

maybe try no-parallel?

@dignifiedquire
Copy link
Member

@diasdavid looking at these failures, they don't look related to aegir to me, rather than other things are actually broken

@daviddias
Copy link
Member Author

Hm.. it might be that due to the new aegir, some things need to change, however, the tests do pass with old aegir. This is also happening with ipfs-inactive/js-ipfs-http-client#585 and even in the aegir-test-repo ipfs-inactive/aegir-test-repo#1 (comment) which suggests that it was not properly tested before the 12.0.0 release.

Let's figure out first in aegir test repo, then js-ipfs-api (which is very close) and then here. Probably fixing for one will fix for all anyway :)

@dignifiedquire
Copy link
Member

This might also indicate that some things were not being properly tested before and we have actual failures in these cases

@daviddias daviddias mentioned this pull request Sep 4, 2017
16 tasks
@dignifiedquire
Copy link
Member

fix for Buffer issue is here: https://github.com/pull-stream/pull-ws/pull/20/files

package.json Outdated
@@ -26,7 +26,7 @@
"release-minor": "aegir release --type minor --no-parallel",
"release-major": "aegir release --type major --no-parallel",
"test": "aegir test --no-parallel --timeout 50000",
"test:node": "aegir test --target node --no-parallel",
"test:node": "aegir test --target node --no-parallel --timeout 50000",
Copy link
Member Author

Choose a reason for hiding this comment

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

I really prefer to see these timeouts in tests. It will help us target batch by batch and do improvs across the board :)

Copy link
Member

Choose a reason for hiding this comment

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

feel free, but I don't think it is that useful compared to the amount of time it costs to increase timeouts in each tests manually

Copy link
Member

Choose a reason for hiding this comment

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

(and how often that is breaking)

@dignifiedquire
Copy link
Member

Tests started working on circle now, due to the changes in the libp2p modules some hashes changed, (dag node protobuf orders the bytes a bit different now), but those fixes should be done independently

@dignifiedquire
Copy link
Member

ref: protobufjs/protobuf.js#908

@daviddias daviddias changed the base branch from master to feat/aegir-next-2 September 8, 2017 05:17
@daviddias daviddias merged commit bffd1e5 into feat/aegir-next-2 Sep 8, 2017
@daviddias daviddias deleted the feat/next-aegir branch September 8, 2017 05:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants