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

feat!: make --empty-repo default #9758

Merged
merged 1 commit into from
Mar 31, 2023
Merged

feat!: make --empty-repo default #9758

merged 1 commit into from
Mar 31, 2023

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Mar 27, 2023

Closes #9757.

  • Makes --empty-repo default
  • Flips the tests with that flag
  • Updates sharness tests that require the default docs

@hacdias hacdias self-assigned this Mar 27, 2023
@hacdias hacdias requested a review from lidel March 27, 2023 13:42
@hacdias hacdias marked this pull request as ready for review March 28, 2023 11:59
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

I suspect this will break a lot of naive tests outside this repo,
but this is the price for cleaning this up and paying off the technical debt.

Flipping the flag first is a smart way of doing this.
We can ship it, people can still restore old behavior by passing ipfs init --empty-repo=false if they need to fix their tests.

cc @yiannisbot @dennis-tra for visibility – the CIDs that every Kubo had pinned and announced by default will no longer be present, so we can't rely on them for fingerprinting Kubo instances anymore.

Before

$ ipfs init && ipfs refs local
generating ED25519 keypair...done
peer identity: 12D3KooWNgbPevBVzHPyQTEs81dG2JvDnJKwtcbzhAPQ7hfpPCJp
initializing IPFS node at /home/lidel/tmp/test-refactor-1680267541
to get started, enter:

	ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme

bafkreiasgpw5ago4iqge4p3bupju6gdmelkqqpxxljax4fcg4ouffnep64
bafkreiczsscdsbs7ffqz55asqdf3smv6klcw3gofszvwlyarci47bgf354
bafkreihtwdtifv43rn5cyilnmkwofdcxi2suqimmo62vn3etf45gjoiuwy
bafkreib6ofpfz3wpht3fnitq5tnkrmcxwkqzqfso75djgcjutauzsfsvce
bafkreiasb5vpmaounyilfuxbd3lryvosl4yefqrfahsb2esg46q6tu6y5q
bafkreia6po64b6tfqq73lckadrhpihg2oubaxgqaoushquhcek46y3zumm
bafkreidc4hz6xawirp4wkcrni54yhvhdawdusbrsskzoqf4avemrlxzw7m
bafkreiah44eqfkfaf4eomjq6x2gcg6q44mt2im3dcv6int42k5pjml5k5y
bafkreibyr5kj7pkocaju3o5xzk3gcsxtgqg6nh23gbvtur7cqoskww4yxe
bafkreicvksdnbh3jxytovgy2alghaayzj4kctsvnyc7fg5wpptosnuf2bm
bafkreihshanjznywfxaxc664xcmsnzwqydntrgsxmbnqqjqeeqxecos2w4
bafkreif6imy7ltlghsk6yncrjrsr7wc5toxhborgcb2dwqo234m2rvsybq
bafkreiestiydyoo2rifwpqews5dc62d2adddrpfvqd7k4bsffygb6ifuf4
bafkreidszrmp3v674lf2rypkal2hgr5qb4imevmlqpdpqougb7zghnnkna
bafkreiblqtq4qdsdqt2ph7xsap5cp2myiuqftt7xd5crljlgj2prwlkqsa
bafkreia4wvraun2neos7xpn7byqxo65jbgjfnl5lmkripawmew6gezyuni
bafkreigbyivpq6rzmva4hl6n65ztg6u5u3zo2zpmgzaceqxlqtnpi77dq4
bafkreiaoj5zr5qx5rngntlrdirizrbd273zdamx4uxahdvxxepeii5t7mi
bafkreidycyuvogknbkwsy5ydpfmq5s4tphdpsauojkgq6vojoj62ksbgeq
bafkreiaz6g7xzoum6udnmxkdfcvnpucn53fdewr3nj4nvzawyn6i7hkxhi
bafkreidajpgiercbn7rneed64s4erjjz7zrfex5s7zftg2zb24zgabbl2q
bafkreibhbx3y6tnn7q4gpsous6apnobft5jybvroiepdsmvps2lmycjjxu

$ ipfs pin ls 
QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc recursive
QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn recursive
QmQ5vhrL7uv6tuoN9KeVBwd4PwfQkXdVVmDLUZuTNxqgvm indirect
QmejvEPop4D7YUadeGqYWmZxHhLc4JBUCzJJHWMzdcMe2y indirect
QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB indirect
QmQy6xmJhrcC5QLboAcGFcAE1tC8CrwDVkrHdEYJkLscrQ indirect
QmU5k7ter3RdjZXu3sHghsga1UQtrztnQxmTL22nPnsu3g indirect
QmQGiYLVAdSHJQKYFRTJZMG4BXBHqKperaZtyKGmCRLmsF indirect
QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y indirect

After this PR

$ ipfs init && ipfs refs local 
generating ED25519 keypair...done
peer identity: 12D3KooWA5CGBJrUmcBFB3fNv3aBWme7kwXkft58EK93yKWcm2KM
initializing IPFS node at /home/lidel/tmp/test-refactor-1680267598
bafkreiczsscdsbs7ffqz55asqdf3smv6klcw3gofszvwlyarci47bgf354

$ ipfs pin ls 
QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn recursive

(the only pin is the CID of an empty directory used as the initial MFS root)

@lidel lidel merged commit 55587d8 into master Mar 31, 2023
@lidel lidel deleted the issue/9757 branch March 31, 2023 13:06
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.

Make ipfs init --empty-repo=true the default
2 participants