Skip to content

Rename the automation API field schedule-revision to revision - #2859

Merged
Flix6x merged 2 commits into
mainfrom
fix/automation-revision-api-name
Nov 11, 2026
Merged

Flix6x merged 2 commits into
mainfrom
fix/automation-revision-api-name

Conversation

@Flix6x

@Flix6x Flix6x commented Nov 11, 2026

Copy link
Copy Markdown
Member

Description

v1.1.0 introduced schedule-revision in automation responses and in each run of their run-stats. It counts the resets of an automation's recurrence (a new cron string or timezone, or reactivation), which keep the durable runs from before and after a reset apart. It has nothing to do with schedules, a word FlexMeasures already uses for the result of scheduling (and for one type of automation), so on a forecast automation the name is misleading.

This renames the API field to revision, for a v1.1.1 patch release, while hardly anyone can rely on it yet: the field is read-only and only days old.

  • AutomationSchema: data_key="revision", with a description of what it counts
  • run-stats: each run reports revision
  • API docs examples, the regenerated OpenAPI specs, and the automation detail panel in the UI ("Revision")
  • Feature docs: "revision" instead of "schedule revision"
  • No database change: the column stays schedule_revision. Feat: edit automation config #2779 renames it, in a migration, for v1.2.

To be backported to 1.1.x, like #2838.

Look & Feel

GET /api/v3_0/assets/<id>/automations/<automation-id> now returns "revision": 1 where it returned "schedule-revision": 1, also in each run listed under run-stats.

How to test

pytest flexmeasures/api/v3_0/tests/test_automations_api.py

Further Improvements

None planned; #2779 follows up with the column rename.

Related Items

Sign-off

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

🤖 Generated with Claude Code

Flix6x and others added 2 commits November 11, 2026 10:32
v1.1.0 introduced schedule-revision in automation responses and their
run-stats. It counts resets of an automation's recurrence and has nothing
to do with schedules, so call it revision, in a v1.1.1 patch release while
hardly anyone relies on the read-only field yet. The column keeps its name;
#2779 renames it in a migration for v1.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 flexmeasures | 🛠️ Build #35808996 | 📁 Comparing 0fc93c4 against latest (e39d983)

  🔍 Preview build  

4 files changed
± changelog.html
± api/change_log.html
± api/v3_0.html
± features/automations.html

@Flix6x Flix6x self-assigned this Nov 11, 2026
@Flix6x Flix6x added this to the 1.1.1 milestone Nov 11, 2026
@Flix6x Flix6x mentioned this pull request Nov 11, 2026
14 tasks done
@Flix6x
Flix6x merged commit 588e9b9 into main Nov 11, 2026
11 checks passed
@Flix6x
Flix6x deleted the fix/automation-revision-api-name branch November 11, 2026 10:00
Flix6x added a commit that referenced this pull request Nov 11, 2026
Conflicts resolved:
- revision: keep this branch's column rename (main's #2859 renamed only the API name)
- execute_automation_job: main's return type and result docs, this branch's data source handling
- changelogs: main's versions, with this PR's entry moved to v1.2.0 New features
- feature docs: this branch's wording on what counts up the revision

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Flix6x added a commit that referenced this pull request Nov 11, 2026
The v1.1.1 patch release backports #2855, #2861, #2838, #2829, #2851, #2845, #2859, #2850 and #2860 to the 1.1.x branch.
Move their changelog bullets out of the v1.2.0 section into a new v1.1.1 section, worded and ordered as on 1.1.x,
so the same fixes are not listed as unreleased once 1.1.1 ships.
The bullet for #2861 takes the 1.1.x wording, which adds that Python 3.10 keeps the earlier Pillow, dnspython and filelock.
The API change log needs no split: v3.0-35 holds only #2859, which ships in v1.1.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Flix6x added a commit that referenced this pull request Nov 11, 2026
…to revision (#2859)

(cherry picked from commit 588e9b9, leaving out its changelog entry)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Flix6x added a commit that referenced this pull request Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant