-
Notifications
You must be signed in to change notification settings - Fork 106
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
Fix discprov image dirCID indexing #280
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, i would prefer if we could somehow emulate the single byte cat (maybe with request streaming up to a limited size or something - which is possible in python) but let's get this in, we will have to revisit our dir behavior eventually anyway.
let's confirm this works by running locally against stage before checking in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good! some small comments
9ec8d37
to
f0b555f
Compare
f0b555f
to
ee7af53
Compare
Fixes discprov image indexing when local cat fails. Regression occurred after we added multi-res images and changed the cnode ipfs gateway route API. The indexing code was still pinging the non-dir image gateway route on cnode, which no longer returns error msg indicating CID is a directory. Logic now first checks the dir image gateway route.
Tested fallback logic by removing the local cat logic at beginning of function so it has to ping the gateways.
Tested non-dir image fallback logic by running local discprov against staging chain from scratch.