fix(deps): update module github.com/go-openapi/strfmt to v0.25.0#412
fix(deps): update module github.com/go-openapi/strfmt to v0.25.0#412renovate-sh-app[bot] wants to merge 1 commit intomainfrom
Conversation
ℹ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: testing/alerting-gen/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
ca1a806 to
dd8b4a1
Compare
4f2f343 to
2763e9e
Compare
2763e9e to
e90f799
Compare
e90f799 to
d201383
Compare
c8081ae to
c32ca82
Compare
10eaa9f to
e123bce
Compare
6e8a5f4 to
737e7c5
Compare
737e7c5 to
18f5fed
Compare
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: testing/alerting-gen/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
18f5fed to
da3e594
Compare
64f1999 to
4b35ed5
Compare
65f9ffb to
d1c83b8
Compare
2538638 to
0102ff1
Compare
991b49e to
a7bf938
Compare
e315675 to
0f51816
Compare
1590d4e to
a979ce3
Compare
| github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc | ||
| github.com/go-kit/log v0.2.1 | ||
| github.com/go-openapi/strfmt v0.23.0 | ||
| github.com/go-openapi/strfmt v0.25.0 |
There was a problem hiding this comment.
DateTime omitempty may stop working
Medium Severity
Bumping github.com/go-openapi/strfmt to v0.25.0 can change strfmt.DateTime zero/IsZero semantics, which encoding/json may use for omitempty. This risks IntegrationStatus.LastNotifyAttempt being serialized when unset (e.g., as Unix epoch) instead of being omitted, altering the /receivers API output.
|
Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.
Or push these changes by commenting: Preview (ba641dbd2d)diff --git a/models/receivers.go b/models/receivers.go
--- a/models/receivers.go
+++ b/models/receivers.go
@@ -20,7 +20,7 @@
type IntegrationStatus struct {
// A timestamp indicating the last attempt to deliver a notification regardless of the outcome.
// Format: date-time
- LastNotifyAttempt strfmt.DateTime `json:"lastNotifyAttempt,omitempty"`
+ LastNotifyAttempt *strfmt.DateTime `json:"lastNotifyAttempt,omitempty"`
// Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc).
LastNotifyAttemptDuration string `json:"lastNotifyAttemptDuration,omitempty"`
diff --git a/notify/grafana_alertmanager.go b/notify/grafana_alertmanager.go
--- a/notify/grafana_alertmanager.go
+++ b/notify/grafana_alertmanager.go
@@ -426,10 +426,15 @@
integrations := make([]models.IntegrationStatus, 0, len(rcv.Integrations()))
for _, integration := range rcv.Integrations() {
ts, d, err := integration.GetReport()
+ var lastNotifyAttempt *strfmt.DateTime
+ if !ts.IsZero() {
+ dt := strfmt.DateTime(ts)
+ lastNotifyAttempt = &dt
+ }
integrations = append(integrations, models.IntegrationStatus{
Name: integration.Name(),
SendResolved: integration.SendResolved(),
- LastNotifyAttempt: strfmt.DateTime(ts),
+ LastNotifyAttempt: lastNotifyAttempt,
LastNotifyAttemptDuration: d.String(),
LastNotifyAttemptError: func() string {
if err != nil {
diff --git a/notify/test_receivers.go b/notify/test_receivers.go
--- a/notify/test_receivers.go
+++ b/notify/test_receivers.go
@@ -48,8 +48,9 @@
}
now := time.Now()
err = TestNotifier(ctx, nf[0], newTestAlert(&testAlert, now, now), now)
+ dt := strfmt.DateTime(now)
result := models.IntegrationStatus{
- LastNotifyAttempt: strfmt.DateTime(now),
+ LastNotifyAttempt: &dt,
LastNotifyAttemptDuration: model.Duration(time.Since(now)).String(),
Name: nf[0].Name(),
SendResolved: nf[0].SendResolved(), |
9b5fcb7 to
9e2d3c6
Compare
| golang.org/x/sys v0.37.0 // indirect | ||
| golang.org/x/text v0.30.0 // indirect | ||
| golang.org/x/tools v0.37.0 // indirect | ||
| golang.org/x/tools/godoc v0.1.0-deprecated // indirect |
There was a problem hiding this comment.
Deprecated module added as indirect dependency
Low Severity
The update introduces golang.org/x/tools/godoc v0.1.0-deprecated as a new indirect dependency. This module's -deprecated version suffix signals it has been officially marked deprecated and superseded by golang.org/x/pkgsite/cmd/pkgsite. A documentation tool like godoc has no expected role in an alerting library's dependency graph, and its presence is unexplained — it does not appear in the testing/alerting-gen submodule despite that module also using strfmt v0.25.0, suggesting an unintended transitive pull from one of the other updated packages (e.g., go.mongodb.org/mongo-driver v1.17.6). This could trigger dependency-scanning or supply-chain security policy violations in CI.
There was a problem hiding this comment.
Bugbot Autofix determined this is a false positive.
golang.org/x/tools/godoc is reintroduced by go mod tidy because transitive tests in github.com/shurcooL/httpfs (pulled via github.com/prometheus/alertmanager/asset) still import golang.org/x/tools/godoc/vfs/*, so it cannot be cleanly removed without larger dependency pinning hacks.
| datasource | package | from | to | | ---------- | ---------------------------- | ------- | ------- | | go | github.com/go-openapi/strfmt | v0.23.0 | v0.25.0 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
9e2d3c6 to
3883840
Compare



This PR contains the following updates:
v0.23.0→v0.25.0Release Notes
go-openapi/strfmt (github.com/go-openapi/strfmt)
v0.25.0Compare Source
v0.24.0Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
Need help?
You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.