Repository navigation
NWAC weather: keep the last issuance past 24 hours while a forecast is in force - #1515
Merged
Merged
Conversation
Contributor
|
Preview deployment: https://fixxnwac-weather-live-24h-gap.preview.avy-fx.org |
Contributor
|
🚀 This is included in version v1.28.1 |
This branch was successfully deployed
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.
Description
NWAC weather beside a forecast only accepted an issuance from the 24 hours before the
publishedtime it was asked with. The mobile app asksapi/nwac/nwac-weather-zonewith the reader's clock, so when one day's forecast went out later than the day before's (3:00 pm, then 3:30 pm), the route answered{ day: null }in between and the app showed a missing forecast even though a recent one existed.A forecast still in force now keeps the last issuance until the next one is out. A past forecast is still held to an issuance at most a day before it.
Related Issues
Unblocks the weather tab in NWACus/avy#1273.
Key Changes
newestForinsrc/services/nac/nwacWeatherForForecast.tsapplies the 24-hour lower bound only to a held (past) forecast.docs/afp-products/architecture.mdupdated to match.How to test
pnpm test __tests__/server/nwacWeather— the new cases cover a request 30 minutes and an hour past a day since the last issuance, and the same request read days later still answering none./api/nwac/nwac-weather-zone?zone=3030&published=<now>a little more than 24 hours after the last issuance and before the next. It answers with the last issuance, not{ "day": null }.Screenshots / Demo video
None, no visual change.
Migration Explanation
None.
Future enhancements / Questions
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.