• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FlexMeasures / flexmeasures / 30828312771
83%
main: 84%

Build:
Build:
LAST BUILD BRANCH: feat/internal-commodity-balance
DEFAULT BRANCH: main
Ran 03 Aug 2026 03:51PM UTC
Jobs 1
Files 173
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Aug 2026 03:36PM UTC coverage: 83.464% (-0.002%) from 83.466%
30828312771

Pull #2382

github

Flix6x
Install the trigger before backfilling, so concurrent inserts are not lost

The migration backfilled sensor_data_source and only then created the trigger,
both inside Alembic's transaction.
That loses data.
The backfill reads a snapshot taken when its statement begins,
so beliefs inserted while it runs are not in it,
and a trigger created afterwards in the same transaction is not visible to the
sessions doing that inserting either,
so nothing ever records those pairs.
On a large table the backfill takes minutes, so the window is not theoretical.

Create the trigger first and commit it, then backfill.
The two then overlap rather than leaving a gap between them,
and ON CONFLICT DO NOTHING absorbs the overlap.
Because the steps now commit as they go, a run that fails during the backfill leaves
the table and trigger behind, so creating the table is guarded and a retry gets past it.

Demonstrated both ways by stepping two connections explicitly,
with the second inserting a new pair between the backfill and the trigger creation.
The first attempt used a sleep and failed to reproduce the loss,
which would have made the problem look theoretical;
sequencing the connections instead shows the old order dropping the pair and the new
order keeping it.

Also merges the base branch, whose only conflict was the changelog:
this branch still carried the pre-correction "three indexes" wording alongside its own
entry, so the resolution keeps both entries with the base's wording.

flexmeasures/data: 256 passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Pull Request #2382: Summarise which sources recorded for which sensors

19 of 22 new or added lines in 2 files covered. (86.36%)

16611 of 19902 relevant lines covered (83.46%)

0.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
87.7
-0.17% flexmeasures/data/models/time_series.py
1
88.99
-0.2% flexmeasures/data/models/data_sources.py
Jobs
ID Job ID Ran Files Coverage
1 30828312771.1 03 Aug 2026 03:51PM UTC 173
83.46
GitHub Action Run
Source Files on build 30828312771
  • Tree
  • List 173
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30828312771
  • Pull Request #2382
  • PR Base - feat/timed-belief-pk-column-order (#30825158467)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc