Skip to content

fix: keep legacy 200/400 codes for older clients in schedule-related endpoints - #2429

Open
nhoening wants to merge 2 commits into
mainfrom
fix/backward-compatibility-switch-for-schedule-accepted-status
Open

fix: keep legacy 200/400 codes for older clients in schedule-related endpoints#2429
nhoening wants to merge 2 commits into
mainfrom
fix/backward-compatibility-switch-for-schedule-accepted-status

Conversation

@nhoening

@nhoening nhoening commented Aug 19, 2026

Copy link
Copy Markdown
Member

Description

There are users using flexmeasures-client before 0.9.2, and they will have trouble getting their schedules when we release v1.0.0.
We switched to the correct way of returning HTTP status 202 when the job is not done. An earlier version of FlexMeasures returned 503 and a "Retry-After" header. The client still supports this rather odd behavior.

  • get-schedule endpoint returns 400 for legacy clients
  • trigger-schedule endpoints return 200 for legacy clients
  • Added changelog item in documentation/changelog.rst

How to test

  • Give your asset both attributes, and call the get-schedule endpoint
  • Run the HEMS script, with one asset having this attribute
  • Run the QA workflow (I did that here)

…endpoints

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@read-the-docs-community

read-the-docs-community Bot commented Aug 19, 2026

Copy link
Copy Markdown

@nhoening nhoening added this to the 1.0.0 milestone Aug 19, 2026
@nhoening nhoening added the API label Aug 19, 2026
@nhoening
nhoening requested a review from BelhsanHmida August 19, 2026 17:40
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

Default: ``None``

FLEXMEASURES_LEGACY_SCHEDULEACCEPTED_STATUS_MAX_INCOMPATIBLE_CLIENT_VERSION

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest introducing one less configuration setting, by combining the two:

FLEXMEASURES_LEGACY_SCHEDULEACCEPTED_STATUS: {"v2g-liberty-version": "0.9.1"}

This also makes it possible to have more than one entry for matching.

Better would be to match the version with the actual v2g-liberty version, and only use the fm-client version if that's the actual attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants