Skip to content

chore(ipfs): enable pubsub via Pubsub.Enabled instead of the deprecated flag - #1237

Open
RezaRahemtola wants to merge 1 commit into
mainfrom
chore/ipfs-pubsub-config
Open

chore(ipfs): enable pubsub via Pubsub.Enabled instead of the deprecated flag#1237
RezaRahemtola wants to merge 1 commit into
mainfrom
chore/ipfs-pubsub-config

Conversation

@RezaRahemtola

Copy link
Copy Markdown
Member

Kubo deprecated --enable-pubsub-experiment in v0.40.0 (ipfs/kubo#11110), so since our v0.43.0 bump every daemon start logs:

ERROR cmd/ipfs kubo/daemon.go:426 The --enable-pubsub-experiment flag is deprecated. Use Pubsub.Enabled config option instead.

001-update-ipfs-config.sh now sets Pubsub.Enabled, and the four compose files drop the flag. Pubsub.Enabled is not a new key — the flag was always an alias for it. No removal version has been announced, so this is cleanup, not a deadline.

Tested against ipfs/kubo:v0.43.0: full container start with the script mounted at /container-init.d/ and the new command line — config applies, daemon ready, pubsub publish/subscribe round-trips, no deprecation warning. Flag and config set together also works, so an operator who keeps the flag is not broken.

Upgrade Guide (for the release notes)

The Kubo pubsub flag is replaced by the Pubsub.Enabled config option. Do these in order:

  1. Update 001-update-ipfs-config.sh from this release, then docker compose up -d ipfs.
  2. Verify it applied: docker compose exec ipfs ipfs config Pubsub.Enabled must print true.
    If it errors, the config did not apply — ipfs config is rejected while a repo migration is pending, which is the case on the boot that upgrades the repo. Restart the container once more and re-check. Do not continue until this returns true.
  3. Only then remove --enable-pubsub-experiment from the ipfs service command in docker-compose.yml and docker compose up -d ipfs.

Leaving the flag in place is harmless — it logs a deprecation warning and is ignored once the config option is set. A CCN with neither the flag nor the config option has pubsub disabled and will not propagate messages, with no error surfaced.

Copilot AI lite review requested due to automatic review settings August 6, 2026 22:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the IPFS (Kubo) deployment configuration to enable pubsub via the supported Pubsub.Enabled config option, removing usage of the deprecated --enable-pubsub-experiment daemon flag to eliminate deprecation warnings on startup.

Changes:

  • Update 001-update-ipfs-config.sh to set Pubsub.Enabled to true via ipfs config.
  • Remove --enable-pubsub-experiment from the ipfs service command in the sample and docker-build compose files.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
deployment/scripts/001-update-ipfs-config.sh Sets Pubsub.Enabled in IPFS config during container init.
deployment/samples/docker-monitoring/docker-compose.yml Drops deprecated pubsub flag from daemon command.
deployment/samples/docker-compose/docker-compose.yml Drops deprecated pubsub flag from daemon command.
deployment/docker-build/docker-compose.yml Drops deprecated pubsub flag from daemon command.
deployment/docker-build/dev/docker-compose.yml Drops deprecated pubsub flag from daemon command.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +16 to +17
# CCNs propagate messages over pubsub, so the daemon must have it enabled
ipfs config Pubsub.Enabled --json 'true'

@foxpatch-aleph foxpatch-aleph left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean, correct migration from the deprecated --enable-pubsub-experiment flag to the Pubsub.Enabled config option. All four compose files with an IPFS service are updated consistently, the fifth (test) has no IPFS service. The init script addition follows the existing pattern (ipfs config with --json for booleans) and includes a clear comment. The upgrade guide in the PR description is thorough and covers the repo-migration edge case. No remaining references to the old flag exist anywhere in the repo.

deployment/scripts/001-update-ipfs-config.sh (line 17): Pre-existing pattern, not introduced by this PR: the script has no set -e, so if ipfs config Pubsub.Enabled fails (e.g. during a repo migration as noted in the upgrade guide), the script still exits 0 and prints "IPFS config updated!". The upgrade guide warns operators to verify with ipfs config Pubsub.Enabled, which is the right mitigation. Consider adding set -e in a future PR so any failed config call is surfaced automatically.

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.

3 participants