Skip to content

Deprecate Gateway.Writable in Kubo 0.19 #9622

Closed
@lidel

Description

@lidel

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

Metadata

Metadata

Assignees

Labels

effort/daysEstimated to take multiple days, but less than a weekkind/maintenanceWork required to avoid breaking changes or harm to project's status quotopic/gatewayTopic gateway

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions