developmentseed / developmentseed/scoreboard

refreshment/last_update dates not handled correctly

Open
#538 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
27
Forks
8
PR merge metrics
No merged PRs in 30d

Description

This issue collects a couple of related things about the handling of last refreshed/last updated dates in scoreboard and osmesa:

1. In [api/src/services/osmesa.js](https://github.com/developmentseed/scoreboard/blob/develop/api/src/services/osmesa.js#L383-L386) `getUpdates()` `Date.now()` is returned if the osmesa `refreshments` table is empty. This could (possibly) lead to a situation where scoreboard ui is displaying the current date is shown but really it is unknown if/when the database last updated. It would be better to throw an exception and let the UI display an empty value or error message.

2. The the dev environment, the osmesa `refreshments` table is empty, as is the scoreboard `user_update` table. In #530 I listed some sql queries to populate these tables for testing in development. These tables should be added to the seed data in scoreboard and in https://github.com/developmentseed/osm-fabricator so it just works in the dev environment.

Contributor guide

Open the contributing guide

Research direction

Start with getUpdates() in api/src/services/osmesa.js and review the SQL queries from issue #530. Then locate the seed data in scoreboard and osm-fabricator. Done means unknown refresh dates are shown as empty or an error rather than the current date, and both development tables contain seed data.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.