Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the deployment record client’s observability and behavior around GitHub API responses (rate limiting and “no artifacts found”), including new Prometheus metrics and expanded PostOne test coverage.
Changes:
- Add new Prometheus counters for
no_attestationandrate_limitedoutcomes. - Refactor
PostOneresponse handling/logging to distinguish rate limiting and “no artifacts found” 404s. - Add comprehensive
PostOneunit tests and document the new metrics in the README.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/dtmetrics/prom.go | Adds new counters for no_attestation and rate_limited. |
| pkg/deploymentrecord/client.go | Introduces NoArtifactError and refines retry/logging logic for 4xx/5xx, including rate-limited detection. |
| pkg/deploymentrecord/client_test.go | Adds table-driven tests validating PostOne behavior and metric deltas across outcomes. |
| internal/controller/controller.go | Treats NoArtifactError as non-fatal (no requeue) when posting records. |
| README.md | Documents the newly added metrics. |
| go.mod | Adds an indirect dependency entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
malancas
reviewed
Mar 16, 2026
malancas
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change:
not_savedmetric tono_attestationrate_limitedmetricno artifact foundPostOne