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

FlexMeasures / flexmeasures / 36438469167
85%

Build:
DEFAULT BRANCH: main
Ran 28 Sep 2026 02:59PM UTC
Jobs 1
Files 188
Run time 2min
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

28 Sep 2026 02:46PM UTC coverage: 84.874% (-1.2%) from 86.083%
36438469167

push

github

web-flow
Fix: concurrent identical scheduling requests no longer create duplicate data sources (#2612)

* Reuse the oldest data source when duplicates exist

Concurrent calls to get_or_create_source can each insert the same source,
because the unique constraint on data_source treats NULL user and account IDs as distinct.
Every later lookup then raised MultipleResultsFound, failing all schedules under that configuration (#2611).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Share one job between concurrent identical calls to a job-cached function

The job cache checked for a cached job, and only stored a new one after creating it,
so two identical calls arriving together both missed the cache and each created their own job.
For scheduling, the two jobs then each created their own data source for the same configuration (#2611).
Hold a Redis lock on the hash of the call's arguments while checking the cache and creating the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Add changelog entry for PR #2612

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Read the cached job ID once, as the key can expire between two reads

Checking that the job cache key exists and then getting it could return None if the key expired in between,
failing on .decode().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Name the duplicate source IDs in the warning, and empty the queue after the concurrency test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Join the concurrency test's threads with a timeout, and stop shadowing the source argument

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <claessen@seita.nl>

---------

Signed-off-by: F.N. C... (continued)

25 of 28 new or added lines in 2 files covered. (89.29%)

3984 of 4694 relevant lines covered (84.87%)

4.39 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
86.67
-0.75% flexmeasures/data/services/utils.py
Jobs
ID Job ID Ran Files Coverage
1 36438469167.1 28 Sep 2026 02:59PM UTC 188
86.08
GitHub Action Run
Source Files on build 36438469167
  • Tree
  • List 188
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36438469167
  • a2c1431e on github
  • Prev Build on main (#36433025795)
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