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

Deprecate Gateway.Writable in Kubo 0.19 #9622

Closed
lidel opened this issue Feb 1, 2023 · 1 comment · Fixed by #9616
Closed

Deprecate Gateway.Writable in Kubo 0.19 #9622

lidel opened this issue Feb 1, 2023 · 1 comment · Fixed by #9616
Assignees
Labels
effort/days Estimated to take multiple days, but less than a week kind/maintenance Work required to avoid breaking changes or harm to project's status quo topic/gateway Topic gateway

Comments

@lidel
Copy link
Member

lidel commented Feb 1, 2023

Gateway.Writable is opt-in, enables very old legacy code that has no specs.

We plan to eventually create specs for onboarding data over HTTP POST and PUT (ipfs/specs#375) but it will not happen any time soon.

We are extracting things that have specs to the reference library (#8524), but the code behind Gateway.Writable should stay in Kubo (or be removed until we re-introduce something with a a spec).

Deprecation plan

  1. Replace Gateway.Writable with optional Flag to remove it from the default config created by ipfs init.
  2. See if we can do a civilized deprecation period and NOT break users in Kubo 0.19
  • (soft deprecation) If possible, keep it working (move handlers for Gateway.Writable to kubo/core/corehttp/ for now)
    • If user has it enabled, display deprecation error during daemon start
  • (hard removal) if there is no other way
    • If user has it enabled, display hard error informing about removal, asking them to remove Gateway.Writable from config

Examples of deprecation notices

  • log error and refuse to start:
    log.Fatal("Private network does not work with Routing.Type=auto. Update your config to Routing.Type=dht (or none, and do manual peering)")
  • log error, but continue:
    log.Error("Private networking (swarm.key / LIBP2P_FORCE_PNET) does not work with public HTTP IPNIs enabled by Routing.Type=auto. Kubo will use Routing.Type=dht instead. Update config to remove this message.")

Ref. https://github.com/ipfs/kubo/blob/master/docs/config.md#gatewaywritable

@lidel lidel added topic/gateway Topic gateway kind/maintenance Work required to avoid breaking changes or harm to project's status quo effort/days Estimated to take multiple days, but less than a week labels Feb 1, 2023
@lidel lidel moved this to 🥞 Todo in IPFS Shipyard Team Feb 1, 2023
@lidel
Copy link
Member Author

lidel commented Feb 1, 2023

my vote is to not break people, unless this is a time sink to restore it after extraction.

remove from go-libipfs, but keep it working in Kubo. flag as deprecated like we did for object APIs so there is no expectation of it being around in 0.20. This gateway has been around for 5-8 years, people need at least 1 release of heads-up.

@hacdias hacdias moved this from 🥞 Todo to 🔎 In Review in IPFS Shipyard Team Feb 1, 2023
@hacdias hacdias moved this from 🔎 In Review to 🏃‍♀️ In Progress in IPFS Shipyard Team Feb 1, 2023
@github-project-automation github-project-automation bot moved this from 🏃‍♀️ In Progress to 🎉 Done in IPFS Shipyard Team Feb 2, 2023
This was referenced Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/days Estimated to take multiple days, but less than a week kind/maintenance Work required to avoid breaking changes or harm to project's status quo topic/gateway Topic gateway
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants