Skip to content

feat: store queryInterval timestamp in a separate status field#119

Merged
ytsarev merged 1 commit into
mainfrom
feat/query-interval-timestamps
Jul 21, 2026
Merged

feat: store queryInterval timestamp in a separate status field#119
ytsarev merged 1 commit into
mainfrom
feat/query-interval-timestamps

Conversation

@ytsarev

@ytsarev ytsarev commented Jul 20, 2026

Copy link
Copy Markdown
Member

Follow-up to #118 (customer feedback) on the still-unreleased queryInterval feature.

Previously the last-query timestamp was appended as an extra element to the result list at the status target, polluting a list that often drives downstream composed resources. It is now stored in a separate status.lastQueryTimestamps map, keyed by target, leaving the result a clean list:

status:
  validatedUsers:              # unchanged: a plain list of results
    - id: "a1b2c3"
      userPrincipalName: "jane@example.com"
  lastQueryTimestamps:         # separate metadata, keyed by target
    validatedUsers: "2026-07-20T20:45:22Z"

The example XRD gains a lastQueryTimestamps status field. queryInterval is rc-only, so no released behavior changes. The combined-flags warning already landed in #118 and is unchanged here.

Testing

go build/test/vet and golangci-lint green; crossplane render smoke test; kind + Crossplane 2.3.3 e2e with v0.7.0-rc4, queryInterval: "2m":

Behavior Result
First run clean validatedUsers list + lastQueryTimestamps.validatedUsers recorded
Within interval FunctionSkip/IntervalLimit, list unchanged
After interval re-queried, timestamp advanced
Independent of reconcile frequency queries=2 across ~16 reconciles (skips=11)

@ytsarev
ytsarev requested a review from a team July 20, 2026 21:01
Follow-up to #118, addressing customer feedback on the (still unreleased)
queryInterval feature.

Previously the last successful query timestamp was appended as an extra
{lastQueryTime: ...} element to the result list at the status target, which
polluted a list that frequently drives downstream composed resources. Store it
instead in a separate status.lastQueryTimestamps map keyed by target, leaving
the result a clean list. The example XRD status schema gains a
lastQueryTimestamps field, and the code drops the array/map append + extract
helpers.

The combined-flags warning already landed with #118; only its test is updated
here to the new shape.

Signed-off-by: Yury Tsarev <yury@upbound.io>
@ytsarev
ytsarev force-pushed the feat/query-interval-timestamps branch from a4ea72c to 24d52e0 Compare July 20, 2026 21:04
@ytsarev ytsarev changed the title feat: separate queryInterval timestamp field and warn on flag conflict feat: store queryInterval timestamp in a separate status field Jul 20, 2026
@ytsarev
ytsarev merged commit 0d00fbd into main Jul 21, 2026
5 checks passed
@ytsarev
ytsarev deleted the feat/query-interval-timestamps branch July 21, 2026 11:13
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