Skip to content

TOPICS_ALLOW_WILDCARDS: disabling the flag leaves existing wildcard subscriptions half-working #991

Description

@alexluong

Follow-up to #912 (wildcard topic subscriptions, flag TOPICS_ALLOW_WILDCARDS).

The flag is only consulted at validation time (Topics.Validate, called from the destination create/update handlers). Topic matching on the delivery path (Topics.MatchTopicmatchTopicPattern) honors * unconditionally.

Consequences of flipping enabled → disabled with existing wildcard destinations

  1. Existing wildcard subscriptions keep matching and delivering. Disabling the flag stops new wildcards from being created but does not stop stored ones from expanding on the hot path.
  2. Those destinations become un-updatable. Update re-validates the full destination, so any PATCH — including one that doesn't touch topics — fails with invalid topics until the caller also replaces the wildcard topics.
  3. Portal inconsistency. The portal receives the flag and stops offering wildcard input, but existing wildcard subscriptions still render and behave as wildcards.

Net: the toggle reads like a kill switch but behaves as "stop new wildcards" with grandfathered data that delivers fine yet can't be edited.

Possible mitigations to evaluate

  • Only validate topics on update when the update actually changes them (removes the PATCH trap, keeps grandfathering) — likely the minimal fix.
  • Gate MatchTopic on the flag so wildcards stop matching when disabled — makes the flag a true kill switch, but silently drops deliveries for existing subscriptions.
  • Document the current semantics if grandfathering is the intended behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions