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

fix: pin.ls ignored opts when hash was present #875

Merged
merged 1 commit into from
Oct 30, 2018
Merged

Conversation

lidel
Copy link
Contributor

@lidel lidel commented Oct 21, 2018

ipfs.pin.ls may get really slow for mid-large repos, especially when called without executing with opts = {type: recursive}.

Unfortunately passing opts does not work right now: it is set to null if hash is also present.

interface-ipfs-core does not include proper tests for scenario when both hash and opts params are present, so it was not detected until I tried to use it in ipfs-companion (ipfs/ipfs-companion#360 (comment))

This PR fixes the bug by restoring passing of opts.

I add missing test cases to interface-ipfs-core/js/src/pin/ls.js in ipfs-inactive/interface-js-ipfs-core#375

Solves problem described in
ipfs/ipfs-companion#360 (comment)

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
@lidel lidel requested a review from alanshaw October 21, 2018 00:03
@ghost ghost assigned lidel Oct 21, 2018
@ghost ghost added the in progress label Oct 21, 2018
lidel added a commit to ipfs-inactive/interface-js-ipfs-core that referenced this pull request Oct 21, 2018
Adds tests to guard against issue described in
ipfs-inactive/js-ipfs-http-client#875

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
lidel added a commit to ipfs/ipfs-companion that referenced this pull request Oct 21, 2018
Solves problem described in
#360 (comment)
by applying fix for ipfs-api from
ipfs-inactive/js-ipfs-http-client#875

Closes #360
@lidel
Copy link
Contributor Author

lidel commented Oct 24, 2018

@alanshaw are you able to re-run Jenkins? I don't have permissions :(

@lidel
Copy link
Contributor Author

lidel commented Oct 25, 2018

Hm.. failing ping tests are not related to this PR:

lidel added a commit to ipfs/ipfs-companion that referenced this pull request Oct 26, 2018
Solves problem described in
#360 (comment)
by applying fix for ipfs-api from
ipfs-inactive/js-ipfs-http-client#875

Closes #360
@alanshaw
Copy link
Contributor

Merging because of failing unrelated ping tests

@alanshaw alanshaw merged commit 0b46750 into master Oct 30, 2018
@ghost ghost removed the in progress label Oct 30, 2018
@alanshaw alanshaw deleted the fix/pin-ls-opts branch October 30, 2018 16:55
lidel added a commit to ipfs/ipfs-companion that referenced this pull request Oct 31, 2018
Solves problem described in
#360 (comment)
by applying fix for ipfs-api from
ipfs-inactive/js-ipfs-http-client#875

Closes #360
lidel added a commit to ipfs/ipfs-companion that referenced this pull request Oct 31, 2018
Solves problem described in
#360 (comment)
by applying fix for ipfs-api from
ipfs-inactive/js-ipfs-http-client#875

Closes #360
lidel added a commit to ipfs/ipfs-companion that referenced this pull request Oct 31, 2018
Solves problem described in
#360 (comment)
by applying fix for ipfs-api from
ipfs-inactive/js-ipfs-http-client#875

Closes #360
lidel added a commit to ipfs-inactive/interface-js-ipfs-core that referenced this pull request Jul 9, 2019
Adds tests to guard against issue described in
ipfs-inactive/js-ipfs-http-client#875

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
alanshaw pushed a commit to ipfs-inactive/interface-js-ipfs-core that referenced this pull request Jul 16, 2019
This PR adds more detailed tests for `pin.ls`, including one that guards against issue described in ipfs-inactive/js-ipfs-http-client#875

refs ipfs/js-ipfs#2228

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
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.

None yet

2 participants