Skip to content

fix(gateway,iroh-dns): tolerate legacy slash-encoded cluster names in remaining decoders#200

Merged
scotwells merged 2 commits into
mainfrom
fix/legacy-cluster-name-decode-2
Jun 18, 2026
Merged

fix(gateway,iroh-dns): tolerate legacy slash-encoded cluster names in remaining decoders#200
scotwells merged 2 commits into
mainfrom
fix/legacy-cluster-name-decode-2

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

Problem

Follow-up to #199. That PR fixed two of the spots that decode the meta.datumapis.com/upstream-cluster-name label back into a cluster name, but the same legacy slash-encoded labels (cluster-_<project>, written before #196) are decoded in four more places. Each still rebuilds /<project>, which no longer matches the slash-less name the provider engages — so reconciles for pre-#196 resources keep failing the cluster lookup and logging cluster /<project> not found on every replica, and their downstream→upstream event propagation stays broken.

Fix

Route the remaining decoders through the shared UpstreamClusterNameFromLabel helper (added in #199), and strip the legacy leading slash in the iroh-dns controller's own decodeIrohClusterLabel:

  • gateway_resource_replicator_controller.go (replicator enqueue)
  • httpproxy_controller.go (downstream Gateway watch)
  • trafficprotectionpolicy_controller.go (certificate-ready enqueue)
  • iroh_dns_controller.go (decodeIrohClusterLabel) + round-trip test updated for the slash-less canonical form

No data migration — existing resources keep resolving and re-stamp to the new label format on their next reconcile.

Follow-up to #199 / #196.

… remaining decoders

Follow-up to #199, which routed two of the downstream-resource label decoders
through UpstreamClusterNameFromLabel. The same legacy slash-encoded
meta.datumapis.com/upstream-cluster-name labels are decoded in four more places,
which still fail the cluster lookup on every replica for resources written
before #196:

- gateway resource replicator
- HTTPProxy controller (downstream Gateway watch)
- TrafficProtectionPolicy controller (certificate-ready enqueue)
- iroh-dns controller (decodeIrohClusterLabel)

Route the first three through the shared helper, and strip the legacy leading
slash in decodeIrohClusterLabel. Updates the iroh-dns round-trip test for the
slash-less canonical form.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@scotwells
scotwells requested review from a team and mattdjenkinson June 18, 2026 14:58
@scotwells
scotwells merged commit c51b0bc into main Jun 18, 2026
11 checks passed
@scotwells
scotwells deleted the fix/legacy-cluster-name-decode-2 branch June 18, 2026 15:18
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.

2 participants