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

chore: migrate bootstrap #474

Merged
merged 15 commits into from
Oct 31, 2023
Merged

chore: migrate bootstrap #474

merged 15 commits into from
Oct 31, 2023

Conversation

gammazero
Copy link
Contributor

Migrating bootstrap service from kubo. The bootstrap package is used outside of kubo, and should be relocated into boxo so that kubo is not used as an IPFS library.

@gammazero gammazero requested a review from a team as a code owner September 29, 2023 01:45
@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Merging #474 (45426db) into main (46c47bc) will decrease coverage by 0.93%.
The diff coverage is 32.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #474      +/-   ##
==========================================
- Coverage   65.96%   65.04%   -0.93%     
==========================================
  Files         206      204       -2     
  Lines       25392    25578     +186     
==========================================
- Hits        16751    16638     -113     
- Misses       7172     7454     +282     
- Partials     1469     1486      +17     
Files Coverage Δ
bootstrap/bootstrap.go 32.54% <32.54%> (ø)

... and 24 files with indirect coverage changes

gammazero added a commit to ipfs/kubo that referenced this pull request Sep 29, 2023
The bootstrap package is being used outside kubo, so should be relocated to boxo.

See ipfs/boxo#474
gammazero added a commit to ipfs/kubo that referenced this pull request Oct 2, 2023
The bootstrap package is being used outside kubo, so should be relocated to boxo.

See ipfs/boxo#474
gammazero added a commit to ipfs/kubo that referenced this pull request Oct 5, 2023
The bootstrap package is being used outside kubo, so should be relocated to boxo.

See ipfs/boxo#474
@hacdias hacdias requested a review from Jorropo October 6, 2023 10:54
gammazero added a commit to ipfs/kubo that referenced this pull request Oct 13, 2023
The bootstrap package is being used outside kubo, so should be relocated to boxo.

See ipfs/boxo#474
Copy link
Contributor

@Jorropo Jorropo left a comment

Choose a reason for hiding this comment

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

I'm gonna refactor this to work without goprocess before reviewing.

bootstrap/bootstrap.go Outdated Show resolved Hide resolved
@hsanjuan
Copy link
Contributor

I'm gonna refactor this to work without goprocess before reviewing.

No please... merge and then do whatever... I would like to rely on this as part of upstream, otherwise I will copy-paste the whole thing directly.

@Jorropo
Copy link
Contributor

Jorropo commented Oct 16, 2023

@hsanjuan I'm not sure about the API exposed to consumers either, if I touch this code I can see this.
We want to have a high bar in what goes in boxo, we want to avoid merging code we don't want to maintain.

@hsanjuan
Copy link
Contributor

@hsanjuan I'm not sure about the API exposed to consumers either, if I touch this code I can see this. We want to have a high bar in what goes in boxo, we want to avoid merging code we don't want to maintain.

If I run staticcheck --checks all ./... in boxo there are 328 warnings, with tons of undocumented stuff and things not following convention. So I don't think this code is any different from everything else that has been imported into Boxo (and didn't go through refactoring). Anything is better without goprocess in it, but this is nice-to-have as is right now, while it gets refactored.

Anyways, no big deal, I just have different approach but it's just matter of opinion.

gammazero added a commit to ipfs/kubo that referenced this pull request Oct 18, 2023
The bootstrap package is being used outside kubo, so should be relocated to boxo.

See ipfs/boxo#474
@BigLep
Copy link
Contributor

BigLep commented Oct 19, 2023

2023-10-19 conversation: Jorropo will refactor this to remove goprocess and then merge next week (week of 2023-10-23).

gammazero added a commit to ipfs/kubo that referenced this pull request Oct 20, 2023
The bootstrap package is being used outside kubo, so should be relocated to boxo.

See ipfs/boxo#474
@Jorropo
Copy link
Contributor

Jorropo commented Oct 20, 2023

@gammazero just flagging that I plan to push on this branch, if you ever force push be sure to use --force-with-lease and not --force, this will error in case I pushed anything in the meanwhile, thx in advance.

magik6k and others added 9 commits October 31, 2023 17:41
License: MIT
Signed-off-by: Łukasz Magiera <[email protected]>


This commit was moved from ipfs/kubo@d35dac7
License: MIT
Signed-off-by: Łukasz Magiera <[email protected]>


This commit was moved from ipfs/kubo@0e6f8d4
closes #6391

License: MIT
Signed-off-by: Raúl Kripalani <[email protected]>


This commit was moved from ipfs/kubo@e8c2852
We've deprecated this system and have yet to move to a new system. We might as
well remove everything, switch to a new system, then deliberately trace the
entire system.


This commit was moved from ipfs/kubo@906f45e
* feat(bootstrap): save connected peers as backup temporary bootstrap ones
* fix: do not add duplicated oldSavedPeers, not using tags, reuse
randomizeList
* test: add regression test
* chore: add changelog

---------

Co-authored-by: Henrique Dias <[email protected]>
Co-authored-by: Marcin Rataj <[email protected]>

This commit was moved from ipfs/kubo@63561f3
gammazero and others added 6 commits October 31, 2023 17:41
…0029)

Fix panic when backup bootstrap peer load and save funcs are nil

A panic occurs when the first bootstrap round runs is these functions are not assigned in the configuration:
- `LoadBackupBootstrapPeers`
- `SaveBackupBootstrapPeers`

This fix assumes that it is acceptable for these functions to be nil, as it may be desirable to disable the backup peer load and save functionality.

This commit was moved from ipfs/kubo@c46cbec
@hacdias hacdias changed the title Chore/migrate bootstrap chore: migrate bootstrap Oct 31, 2023
Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

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

This is fine by me. As per the standup, this is going to be merged as-is for tomorrow RC.

@hacdias hacdias merged commit 08b11e5 into main Oct 31, 2023
12 checks passed
@hacdias hacdias deleted the chore/migrate-bootstrap branch October 31, 2023 17:12
hacdias pushed a commit to ipfs/kubo that referenced this pull request Oct 31, 2023
The bootstrap package is being used outside kubo, so should be relocated to boxo.

See ipfs/boxo#474
@BigLep BigLep mentioned this pull request Nov 9, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

10 participants