Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Bring back the PR #672

Merged
merged 14 commits into from
Jan 23, 2018
Merged

Bring back the PR #672

merged 14 commits into from
Jan 23, 2018

Conversation

daviddias
Copy link
Contributor

@daviddias daviddias commented Jan 19, 2018

ref: #652

@ghost ghost assigned daviddias Jan 19, 2018
@ghost ghost added the in progress label Jan 19, 2018
@daviddias
Copy link
Contributor Author

Something weird happened with #669 and code is missing causing these errors:

  1) stats
       .stats.bitswap:
     Uncaught AssertionError: expected { Object (ProvideBufLen, Wantlist, ...) } to have property 'provideBufLen'
      at ipfs.stats.bitswap (test/stats.spec.js:33:29)
      at f (node_modules/once/once.js:25:25)
      at streamToValue (node_modules/ipfs-api/src/utils/stream-to-json-value.js:30:5)
      at concat (node_modules/ipfs-api/src/utils/stream-to-value.js:12:22)
      at ConcatStream.<anonymous> (node_modules/concat-stream/index.js:36:43)
      at finishMaybe (node_modules/readable-stream/lib/_stream_writable.js:607:14)
      at endWritable (node_modules/readable-stream/lib/_stream_writable.js:615:3)
      at ConcatStream.Writable.end (node_modules/readable-stream/lib/_stream_writable.js:571:41)
      at IncomingMessage.onend (_stream_readable.js:595:10)
      at endReadableNT (_stream_readable.js:1056:12)
      at _combinedTickCallback (internal/process/next_tick.js:138:11)
      at process._tickDomainCallback (internal/process/next_tick.js:218:9)

  2) stats
       .stats.bw:
     Uncaught AssertionError: expected { Object (TotalIn, TotalOut, ...) } to have property 'totalIn'
      at ipfs.stats.bw (test/stats.spec.js:50:29)
      at send.andTransform (node_modules/ipfs-api/src/stats/bw.js:23:7)
      at concat (node_modules/ipfs-api/src/utils/stream-to-value.js:12:22)
      at ConcatStream.<anonymous> (node_modules/concat-stream/index.js:36:43)
      at finishMaybe (node_modules/readable-stream/lib/_stream_writable.js:607:14)
      at endWritable (node_modules/readable-stream/lib/_stream_writable.js:615:3)
      at ConcatStream.Writable.end (node_modules/readable-stream/lib/_stream_writable.js:571:41)
      at DestroyableTransform.onend (node_modules/readable-stream/lib/_stream_readable.js:570:10)
      at endReadableNT (node_modules/readable-stream/lib/_stream_readable.js:992:12)
      at _combinedTickCallback (internal/process/next_tick.js:138:11)
      at process._tickDomainCallback (internal/process/next_tick.js:218:9)

  3) stats
       .stats.repo:
     Uncaught AssertionError: expected { Object (NumObjects, RepoSize, ...) } to have property 'numObjects'
      at ipfs.stats.repo (test/stats.spec.js:62:29)
      at f (node_modules/once/once.js:25:25)
      at streamToValue (node_modules/ipfs-api/src/utils/stream-to-json-value.js:30:5)
      at concat (node_modules/ipfs-api/src/utils/stream-to-value.js:12:22)
      at ConcatStream.<anonymous> (node_modules/concat-stream/index.js:36:43)
      at finishMaybe (node_modules/readable-stream/lib/_stream_writable.js:607:14)
      at afterWrite (node_modules/readable-stream/lib/_stream_writable.js:470:3)
      at _combinedTickCallback (internal/process/next_tick.js:144:20)
      at process._tickDomainCallback (internal/process/next_tick.js:218:9)

Could you check what's happening? Also @dryajov

@daviddias daviddias assigned dryajov and hacdias and unassigned daviddias Jan 19, 2018
@dryajov
Copy link
Contributor

dryajov commented Jan 19, 2018

@diasdavid I believe I know what the issue with the PR is - we need to use the current ipfs-api -

    df.spawn((err, _ipfsd) => {
      expect(err).to.not.exist()
      ipfsd = _ipfsd
      ipfs = IPFSApi(_ipfsd.apiAddr)
      done()
    })

I'm making the change right now.

@dryajov
Copy link
Contributor

dryajov commented Jan 19, 2018

the relevant line in the above comment is ipfs = IPFSApi(_ipfsd.apiAddr)

@dryajov
Copy link
Contributor

dryajov commented Jan 19, 2018

depends on ipfs-inactive/interface-js-ipfs-core#203

@daviddias
Copy link
Contributor Author

released the fixed interface-ipfs-core and spinned up the CI here again. Waiting to get a confirmation.

@dryajov
Copy link
Contributor

dryajov commented Jan 19, 2018

@diasdavid looking into ci issues

@dryajov
Copy link
Contributor

dryajov commented Jan 20, 2018

@diasdavid @victorbjelkholm something is up with jenkins, the builds are not running.

@dryajov
Copy link
Contributor

dryajov commented Jan 20, 2018

hmm, travis is giving a JavaScript heap out of memory, not sure if its due to the new ipfsd-ctl or travis is being travis. Would be nice to see if this runs in jenkins, so far circle is green :)

@dryajov
Copy link
Contributor

dryajov commented Jan 20, 2018

I'll profile the test run tomorrow see where things might be going wrong.

@dryajov
Copy link
Contributor

dryajov commented Jan 20, 2018

btw, coverage is back to a reasonable level.

@dryajov
Copy link
Contributor

dryajov commented Jan 20, 2018

requires - ipfs/js-ipfsd-ctl#184

@daviddias
Copy link
Contributor Author

btw, coverage is back to a reasonable level.

What created the massive drop?

@daviddias
Copy link
Contributor Author

released ipfs/js-ipfsd-ctl#184, spinning CI here again

@dryajov
Copy link
Contributor

dryajov commented Jan 21, 2018

It was due to the fact that ipfs-api was not being consumed directly, but through ipfsd-ctl which was wrong in the context of ipfs-api testing. Ding IpfsApi(ipfsd-ctl.apiAddr) fixes that.

@daviddias
Copy link
Contributor Author

Every CI is failing. Circle with:

  4 failing

  1) .object,promise API,object.patch
       .addLink:
     Error: unexpected multihash type: undefined
    at module.exports (test/interface/object.spec.js:7360:11)
    at Function.promisify (test/interface/object.spec.js:81172:19)
    at test/interface/object.spec.js:111:20
    at new Promise (<anonymous>)
    at Object.addLink (test/interface/object.spec.js:105:16)
    at Promise.then (test/interface/object.spec.js:119397:40)
    at <anonymous>

  

  2) .object,promise API,object.patch
       .rmLink:
     Error: unexpected multihash type: undefined
    at module.exports (test/interface/object.spec.js:7360:11)
    at Function.promisify (test/interface/object.spec.js:81217:19)
    at test/interface/object.spec.js:111:20
    at new Promise (<anonymous>)
    at Object.rmLink (test/interface/object.spec.js:105:16)
    at Context.it (test/interface/object.spec.js:119407:36)

  

  3) .object,promise API,object.patch
       .appendData:
     Error: unexpected multihash type: undefined
    at module.exports (test/interface/object.spec.js:7360:11)
    at Function.promisify (test/interface/object.spec.js:81307:19)
    at test/interface/object.spec.js:111:20
    at new Promise (<anonymous>)
    at Object.appendData (test/interface/object.spec.js:105:16)
    at Context.it (test/interface/object.spec.js:119414:36)

  

  4) .object,promise API,object.patch
       .setData:
     Error: unexpected multihash type: undefined
    at module.exports (test/interface/object.spec.js:7360:11)
    at Function.promisify (test/interface/object.spec.js:81307:19)
    at test/interface/object.spec.js:111:20
    at new Promise (<anonymous>)
    at Object.appendData (test/interface/object.spec.js:105:16)
    at Context.it (test/interface/object.spec.js:119421:36)

Travis runs out of memory. I believe that it is trying to webpack stuff it doesn't need and crashes because of that.

@dryajov
Copy link
Contributor

dryajov commented Jan 22, 2018

@diasdavid There seem to be two issues with the tests, at least in circleci - travis seems to be failing on a different error

  1. Tests timeout at least %40 of the time, which is what causes the cascading failures you pasted in the prev comment
  2. When running the full suit of tests, after successfully completing all the tests, chrome aegir/karma/mocha doesn't exit correctly (or takes longer than expected) causing Chrome/karma to timeout

screen shot 2018-01-22 at 2 06 13 pm

I haven't been able to reproduce either of this failures locally, so it makes it a little harder to troubleshoot. I can run the builds with ssh enabled, which should allow me to trouble shoot it on circle directly.

@dryajov
Copy link
Contributor

dryajov commented Jan 23, 2018

ok, increasing the browserNoActivityTimeout to 100 * 1000 fixed the karma timeout issue. I'm guessing that with ipfsd-ctl there is a little more overhead when running in the browser since it has to do a request and wait for a response from the REST endpoints.

@daviddias
Copy link
Contributor Author

Ok, only tests missing is the Windows PubSub failing tests. LGTM :)

@daviddias daviddias merged commit 2b1820b into master Jan 23, 2018
@daviddias daviddias deleted the feat/ipfsd-ctl branch January 23, 2018 22:17
@ghost ghost removed the in progress label Jan 23, 2018
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.

3 participants