feat: only update status when allowance bucket changes #487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As I was fixing #486, I noticed we had a large number of audit logs being generated for allowance buckets. I was able to determine this was because we were issuing status updates to the allowance bucket, even when nothing changed.
$ datumctl activity query --project humans-of-the-internet-gkvgql --filter 'objectRef.apiGroup == "quota.miloapis.com" && verb == "update"' --all-pages TIMESTAMP VERB USER NAMESPACE RESOURCE NAME STATUS 2026-01-20 16:43:59 update milo-controller-manager milo-system allowancebuckets bucket-74925ac57598071106a6c7971090b631bcecfd7afde7b20722e00fe7635e89d4 200 2026-01-20 16:43:58 update milo-controller-manager milo-system allowancebuckets bucket-6b60066b57937827a0f70718d344bccc0d7f1d0b6fc58e6ae10e5784ada91807 200 2026-01-20 16:43:54 update milo-controller-manager milo-system allowancebuckets bucket-74925ac57598071106a6c7971090b631bcecfd7afde7b20722e00fe7635e89d4 200 2026-01-20 16:43:54 update milo-controller-manager milo-system allowancebuckets bucket-6b60066b57937827a0f70718d344bccc0d7f1d0b6fc58e6ae10e5784ada91807 200 2026-01-20 16:43:50 update milo-controller-manager milo-system allowancebuckets bucket-74925ac57598071106a6c7971090b631bcecfd7afde7b20722e00fe7635e89d4 200 2026-01-20 16:43:50 update milo-controller-manager milo-system allowancebuckets bucket-6b60066b57937827a0f70718d344bccc0d7f1d0b6fc58e6ae10e5784ada91807 200 2026-01-20 16:43:46 update milo-controller-manager milo-system allowancebuckets bucket-74925ac57598071106a6c7971090b631bcecfd7afde7b20722e00fe7635e89d4 200 2026-01-20 16:43:46 update milo-controller-manager milo-system allowancebuckets bucket-6b60066b57937827a0f70718d344bccc0d7f1d0b6fc58e6ae10e5784ada91807 200 2026-01-20 16:43:42 update milo-controller-manager milo-system allowancebuckets bucket-74925ac57598071106a6c7971090b631bcecfd7afde7b20722e00fe7635e89d4 200 2026-01-20 16:43:42 update milo-controller-manager milo-system allowancebuckets bucket-6b60066b57937827a0f70718d344bccc0d7f1d0b6fc58e6ae10e5784ada91807 200 2026-01-20 16:43:38 update milo-controller-manager milo-system allowancebuckets bucket-74925ac57598071106a6c7971090b631bcecfd7afde7b20722e00fe7635e89d4 200 2026-01-20 16:43:38 update milo-controller-manager milo-system allowancebuckets bucket-6b60066b57937827a0f70718d344bccc0d7f1d0b6fc58e6ae10e5784ada91807 200 2026-01-20 16:43:34 update milo-controller-manager milo-system allowancebuckets bucket-74925ac57598071106a6c7971090b631bcecfd7afde7b20722e00fe7635e89d4 200 2026-01-20 16:43:34 update milo-controller-manager milo-system allowancebuckets bucket-6b60066b57937827a0f70718d344bccc0d7f1d0b6fc58e6ae10e5784ada91807 200 2026-01-20 16:43:30 update milo-controller-manager milo-system allowancebuckets bucket-74925ac57598071106a6c7971090b631bcecfd7afde7b20722e00fe7635e89d4 200 2026-01-20 16:43:29 update milo-controller-manager milo-system allowancebuckets bucket-6b60066b57937827a0f70718d344bccc0d7f1d0b6fc58e6ae10e5784ada91807 200