Remove unused alert envelope retention

This commit is contained in:
2026-08-13 04:17:05 +00:00
parent cd7b9aef2b
commit d6829af32b
5 changed files with 10 additions and 3 deletions

View File

@@ -308,7 +308,7 @@ func (b *bundleBuilder) fetchAlerts(acquired sourceAcquisition) error {
}
raw, source := fetched.raw, fetched.source
if isJSONNull(raw) {
b.bundle.Alerts = &weatherdata.AlertRun{Raw: append(json.RawMessage(nil), raw...)}
b.bundle.Alerts = &weatherdata.AlertRun{}
b.addSource(source)
return nil
}
@@ -316,7 +316,6 @@ func (b *bundleBuilder) fetchAlerts(acquired sourceAcquisition) error {
if err := decodeSource(raw, &alerts); err != nil {
return b.handleMalformed(&source, err, acquired.request)
}
alerts.Raw = append(json.RawMessage(nil), raw...)
if alerts.AsOf != nil {
source.IssuedAt = alerts.AsOf
}

View File

@@ -148,7 +148,6 @@ func (p ForecastPeriod) HasValidPrecipitationProbability() bool {
type AlertRun struct {
AsOf *time.Time `json:"asOf,omitempty"`
Alerts []json.RawMessage `json:"alerts,omitempty"`
Raw json.RawMessage `json:"raw,omitempty"`
}
type Discussion struct {