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

FlexMeasures / flexmeasures / 36191867000
86%

Build:
DEFAULT BRANCH: main
Ran 25 Sep 2026 09:43PM UTC
Jobs 1
Files 186
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

25 Sep 2026 09:29PM UTC coverage: 86.102% (-0.001%) from 86.103%
36191867000

push

github

web-flow
Support SQLAlchemy 2.1, upgrade dependencies, and show an error page on unexpected errors (#2596)

* Answer unexpected errors with a proper 500, instead of a broken status line

An exception that is not an HTTPException (e.g. a database error) went
through the same handling as HTTP errors. The HTML handler took its code
attribute as the response status, but SQLAlchemy errors carry codes like
"f405", so the response went out as "HTTP/1.1 0 f405". Behind a proxy,
browsers then reported ERR_HTTP2_PROTOCOL_ERROR (Chrome) or a failed
secure connection (Firefox), rather than showing our error page, and the
error was only visible in the logs.

Such exceptions are now logged in full as before, and then answered as an
InternalServerError: a 500 with our error page in HTML, and a 500 in
JSON. The response also no longer carries the exception's message, which
for a database error includes the SQL and its parameters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZsZTwYKqi3NBS2EfQVZMU
Signed-off-by: F.N. Claessen <felix@seita.nl>

* Recognise forbidden belief replacements by SQLSTATE, whatever the driver

catch_timed_belief_replacements checked for psycopg2's UniqueViolation class, so on psycopg 3 (the driver SQLAlchemy 2.1 picks for a plain postgresql:// URI) a forbidden replacement got a generic 500 instead of its explanation. Both drivers report SQLSTATE 23505, psycopg2 as pgcode and psycopg 3 as sqlstate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZsZTwYKqi3NBS2EfQVZMU
Signed-off-by: F.N. Claessen <felix@seita.nl>

* Connect through psycopg2 when the database URI names no driver

SQLAlchemy 2.1 connects a plain postgresql:// URI through psycopg 3 rather than psycopg2. psycopg 3 binds parameters on the server, which rejects comparisons FlexMeasures still makes, such as an integer id with an id string taken from a URL ("operator does not e... (continued)

65 of 85 new or added lines in 7 files covered. (76.47%)

3 existing lines in 2 files now uncovered.

20104 of 23349 relevant lines covered (86.1%)

0.86 hits per line

Uncovered Changes

Lines Coverage ∆ File
20
40.0
1.54% flexmeasures/cli/db_ops.py

Coverage Regressions

Lines Coverage ∆ File
2
40.0
1.54% flexmeasures/cli/db_ops.py
1
98.47
0.01% flexmeasures/conftest.py
Jobs
ID Job ID Ran Files Coverage
1 36191867000.1 25 Sep 2026 09:43PM UTC 186
86.1
GitHub Action Run
Source Files on build 36191867000
  • Tree
  • List 186
  • Changed 10
  • Source Changed 10
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36191867000
  • 3fa1079d on github
  • Prev Build on main (#36182029517)
  • Next Build on main (#36192278468)
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