Skip to content

Option and Tap watches never send the initial-events-end bookmark #4465

Open

Description

The Option and Tap resources in core.cozystack.io never end the initial events of a WatchList watch. Their Watch sends the current list as ADDED events and then blocks, without the bookmark annotated with k8s.io/initial-events-end. A client that opens the watch with sendInitialEvents=true and allowWatchBookmarks=true, which is what a client-go informer does with WatchListClient on, keeps waiting for that bookmark and never reaches HasSynced from the stream.

The other aggregated storages handle this through registry.InitialEventsBookmarker and registry.InitialEventsEndBookmarkRequested. The one-shot watchers are in option/rest.go and tap/rest.go.

Emitting the marker after the last ADDED event, only when both flags are set, should be enough. A watch test with both flags that expects ADDED events and then the annotated bookmark would pin it.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/apiIssues or PRs related to the cozystack-api aggregated API server
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiIssues or PRs related to the cozystack-api aggregated API serverkind/bugCategorizes issue or PR as related to a bugtriage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions