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

Fixes #4522 #4552

Merged
merged 13 commits into from
Aug 7, 2019
Merged

Fixes #4522 #4552

merged 13 commits into from
Aug 7, 2019

Conversation

acolytec3
Copy link
Contributor

@acolytec3 acolytec3 commented May 31, 2019

Description

Replace deprecated ifpsapi library with ipfshttpclient in dashboard, kudos, and healthcheck.. Add tests for dashboard.utils that interact with IPFS.

Refers/Fixes

Fixes #4522'

Testing

Added tests for get_ipfs and ipfs_cat_ipfsapi in dashboard.utils to verify connectivity and retrieval of objects by IPFS hash string are working.

@codecov
Copy link

codecov bot commented May 31, 2019

Codecov Report

Merging #4552 into master will decrease coverage by 0.03%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4552      +/-   ##
==========================================
- Coverage   30.17%   30.13%   -0.04%     
==========================================
  Files         209      209              
  Lines       16886    16886              
  Branches     2278     2278              
==========================================
- Hits         5095     5089       -6     
- Misses      11594    11600       +6     
  Partials      197      197
Impacted Files Coverage Δ
app/kudos/utils.py 20.37% <50%> (ø) ⬆️
app/dashboard/utils.py 34.49% <66.66%> (ø) ⬆️
app/dashboard/embed.py 28.16% <0%> (-3.45%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ec5cca...50c1102. Read the comment docs.

@codecov
Copy link

codecov bot commented May 31, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@bba6294). Click here to learn what that means.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #4552   +/-   ##
=========================================
  Coverage          ?   30.66%           
=========================================
  Files             ?      216           
  Lines             ?    17498           
  Branches          ?     2389           
=========================================
  Hits              ?     5365           
  Misses            ?    11916           
  Partials          ?      217
Impacted Files Coverage Δ
app/healthcheck/healthchecks.py 40% <0%> (ø)
app/dashboard/utils.py 37.12% <100%> (ø)
app/kudos/utils.py 20.37% <33.33%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bba6294...b126a1b. Read the comment docs.

@acolytec3
Copy link
Contributor Author

Hold on this. I thought everything was working and now I'm seeing some errors in my local build.

@acolytec3
Copy link
Contributor Author

acolytec3 commented Jun 1, 2019

Appears to be working now that I've corrected the connect parameters. I'm not seeing the connection errors that surfaced previously so should be ready for review.

@acolytec3
Copy link
Contributor Author

@owocki @kuhnchris Any chance I could get this reviewed? Would love to get it closed so I can move on a look at applying for some other bounties.

Thanks!

@kuhnchris
Copy link
Contributor

@danlipert do you have time to review this? Else I'll take a look

@danlipert
Copy link
Contributor

@kuhnchris @acolytec3 The existing tests are pretty lackluster and don't really test IPFS. I'd like some a better writeup of how this change was tested and what the differences are between this library and the newer one. Is it simply a rename? Since there are compatibility issues with Python 3.4 I'm guessing its not.

@acolytec3
Copy link
Contributor Author

Here's the official write-up on the changes from the old library.

Based on reading the docs, the only change that's pertinent for how gitcoin uses IPFS is the connect method and I've updated that to match the new structure in both of the places in the code where it's called.

The other functions from the library that are used (cat, get_json, add_json) appear to be unchanged.

I'll look at writing some tests for those specific utils methods where connect is used.

@acolytec3
Copy link
Contributor Author

acolytec3 commented Jun 13, 2019

@danlipert I added tests for both of the dashboard utility methods that call ipfs. Let me know if this is what you're looking for.

And don't mind my complete ineptitude at squashing commits. ^^;;

Copy link
Contributor

@danlipert danlipert left a comment

Choose a reason for hiding this comment

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

@acolytec3 Looks good! Did you try running the app locally and interacting with IPFS via the backend?

app/dashboard/utils.py Show resolved Hide resolved
@acolytec3
Copy link
Contributor Author

acolytec3 commented Jun 22, 2019 via email

@acolytec3
Copy link
Contributor Author

@danlipert @octavioamu @thelostone-mc @owocki Hi all, what's the status on this one? Are there more tests or validations you're looking for to close this out?

@owocki
Copy link
Contributor

owocki commented Jul 16, 2019

quick question.. are PRs that are approved included in releases automatically, or is there some other inclusion metric?

@danlipert
Copy link
Contributor

quick question.. are PRs that are approved included in releases automatically, or is there some other inclusion metric?

Once they are approved by each engineer, then the final approving engineer usually merges it. Sometimes we save merging until before the deploy in case there are conflicts, especially with migrations.

@thelostone-mc @octavioamu this look good to y'all?

@acolytec3
Copy link
Contributor Author

What about this one? Is it good to go? Would love to get paid if it's done. 😬

Copy link
Contributor

@octavioamu octavioamu left a comment

Choose a reason for hiding this comment

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

LGTM

@kuhnchris
Copy link
Contributor

LGTM too - works locally at least

@danlipert danlipert merged commit 9c3b47b into gitcoinco:master Aug 7, 2019
@owocki owocki mentioned this pull request Oct 19, 2019
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.

ipfsapi library is deprecated
6 participants