Skip to content

Bulk apply reports updated for a document that changed nothing, so a client cannot tell a no-op from a write #1680

Description

@lex00

Measured today against a v0.16.0 instance while checking that a chant-authored manifest applies idempotently.

Applying the same manifest twice, unchanged, the second apply reports:

Environment/toolchain   updated
Vault/prod-creds        updated
Agent/prod-steward      updated

ApplyResult.action is created | updated | error, so a document that reconciled to exactly what was already stored is indistinguishable from one that wrote a real change. A client that wants to report "nothing drifted" has to diff the estate itself, or read every resource back and compare.

The ask is one more value, unchanged, returned when reconciliation produced no field change. Everything else about the endpoint already behaves idempotently, which is what makes the reporting gap visible.

Context for why a client cares: chant renders an apply summary a person reads before deciding whether an environment drifted, and its own reconciler for the three team-side kinds (INTENTIUS/chant#2127) already reports unchanged because it compares before writing. The three kinds that go through bulk apply cannot, so one summary carries two different meanings for the same word.

Related: #1636, which extends bulk apply to Teammate, Schedule and Webhook. If those land here, they will want the same third value.

Activity

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:apiHTTP API, OpenAPI and CLI contracts.type:featureAdds or improves product behavior.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions