A backfill finishing after the nightly overwrites it with older state

Open
#1,848 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
57/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start by locating the backfill code that writes seal_criterion and the nightly job that updates it; the issue does not name files or tests. Check whether updated_at reflects execution time, then trace how the backfill chooses its end date based on whether the nightly has run. Done means the backfill ends today in that case and yesterday otherwise, without overwriting newer nightly state.

Written by the indexing model from the issue text.

Description

When the backfill runs, it currently finishes yesterday, then writes the seal_criterion row.
If the nightly already ran today, its resulting seal_criterion is overwritten by yesterday's result of the backfill, which is wrong.

Possible consequences
Relatively minor. If the nightly resulted in a change of status, the backfill will put back the old status This will last for a day, then correct itself.
But it could result in grace period of probation to be shifted by a day.

To fix
To correct this, we should first make sure seal_criterion.updated_at is really set to the time the code ran, not a backdated date.
Then use it to determine if the nightly already ran,
If it did, end the backfill today.
If it did not, end it yesterday. The nightly will fill with the correct day's value when it runs.

Dominant language
Python
Stars
34
Forks
7
Avg merge
2d 22h
Merged PRs (30d)
21

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MobilityData/mobility-feed-api

All issues in MobilityData/mobility-feed-api

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.