Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support blackout tests #651

Merged
merged 46 commits into from May 1, 2023
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
88c6a42
remove tests already present in v3
Flix6x Apr 25, 2023
f633cdb
move asset deletion test to v3
Flix6x Apr 25, 2023
3bcd8f1
move asset creation test to v3
Flix6x Apr 25, 2023
d7b0c39
remove last remaining asset test from v2
Flix6x Apr 25, 2023
c4e34c4
stop testing post_price_data and post_prognosis on v2
Flix6x Apr 25, 2023
c197cdf
move test scheduling with unknown prices from v1.3 to v3
Flix6x Apr 25, 2023
80bba2c
remove v1.3 test already present in v3
Flix6x Apr 25, 2023
66b374b
move test for wrong job id from v1.3 to v3
Flix6x Apr 25, 2023
5c21e2b
no tests worth moving in v1.2
Flix6x Apr 25, 2023
fea604a
remove test for posting weather data from v1.1
Flix6x Apr 25, 2023
0f3cee5
move test for posting data with incompatible resolution from v1.1 to v3
Flix6x Apr 25, 2023
e29d20a
move test for posting data with a user that is not properly set up as…
Flix6x Apr 25, 2023
a5236a9
move test for getting data for an empty period from v1.1 to v3
Flix6x Apr 25, 2023
a95864b
move v3 tests that just GET data to test module that uses db fixture …
Flix6x Apr 25, 2023
3f37be1
remove v1.1 test utils including old simulation script that uses one …
Flix6x Apr 25, 2023
900d9e2
salvage only 1 test from v1, which logs out a user
Flix6x Apr 25, 2023
73cfe29
add missing fixtures to let tests succeed on their own, too
Flix6x Apr 25, 2023
0a7fd46
remove v1.0 test utils
Flix6x Apr 25, 2023
316ed0b
add changelog warning
Flix6x Apr 25, 2023
62b0b34
update API documentation
Flix6x Apr 25, 2023
51e665d
Document public endpoints in v3
Flix6x Apr 25, 2023
62c5ef5
black
Flix6x Apr 25, 2023
928510b
Implement getService for API v3
Flix6x Apr 26, 2023
4c7780c
Document service listing for v3
Flix6x Apr 26, 2023
d94d780
Show quickref contents rather than summary line of docstring
Flix6x Apr 26, 2023
c966746
Fix removal of suffix and prefix, by not using rstrip and lstrip, res…
Flix6x Apr 26, 2023
250dd54
API changelog entry
Flix6x Apr 26, 2023
fe22428
Make getService more RESTful
Flix6x Apr 26, 2023
ee3d176
Add warning to API developer docs
Flix6x Apr 26, 2023
81b0600
More robust against spaces
Flix6x Apr 26, 2023
eb83957
Update main changelog entry
Flix6x Apr 26, 2023
1b8266d
Support blackout tests
Flix6x Apr 28, 2023
d6b6d05
black
Flix6x Apr 28, 2023
ade6713
Fix test
Flix6x Apr 28, 2023
25db921
More specific if statement
Flix6x Apr 28, 2023
9c56501
change default to activating the sunset
Flix6x Apr 28, 2023
733a244
Add sunset documentation for FlexMeasures hosts and make the config s…
Flix6x Apr 28, 2023
7d3ab42
shorten comment
Flix6x Apr 28, 2023
522634f
fix override from config setting
Flix6x Apr 28, 2023
9126a14
refactor
Flix6x Apr 28, 2023
5164c8f
Cross reference to snapshot version of API documentation
Flix6x Apr 28, 2023
5fee35c
We want to support blackout tests already from the version that annou…
Flix6x Apr 28, 2023
76284b4
black
Flix6x Apr 28, 2023
0d8e6cc
Add cross-reference and explanation, and add clarity
Flix6x May 1, 2023
1c2a181
Customize admonition
Flix6x May 1, 2023
79e2be2
Merge remote-tracking branch 'origin/main' into support-blackout-tests
Flix6x May 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions documentation/api/introduction.rst
Expand Up @@ -150,13 +150,17 @@ Here is a client-side code example in Python (this merely prints out the depreca
FlexMeasures hosts
^^^^^^^^^^^^^^^^^^

When upgrading to a FlexMeasures version that sunsets an API version, clients will receive ``HTTP status 410 (Gone)`` responses when calling corresponding endpoints.
After upgrading to one of the next FlexMeasures versions, they will receive ``HTTP status 404 (Not Found)`` responses.
When upgrading to a FlexMeasures version that sunsets an API version (e.g. ``flexmeasures==0.13.0`` sunsets API version 2), clients will receive ``HTTP status 410 (Gone)`` responses when calling corresponding endpoints.
After upgrading to one of the next FlexMeasures versions (e.g. ``flexmeasures==0.14.0``), they will receive ``HTTP status 404 (Not Found)`` responses.

Hosts should not expect every client to monitor response headers and proactively upgrade to newer API versions.
Please make sure that your users have upgraded before you upgrade to a FlexMeasures version that sunsets an API version.
You can do this by checking your server logs for warnings about users who are still calling deprecated endpoints.

In case you have users that haven't upgraded yet, and would still like to upgrade FlexMeasures, you can.
Just set the config setting ``FLEXMEASURES_API_SUNSET_ACTIVE = False`` and consider announcing some blackout tests to your users, during which you can set this setting to ``True`` to activate the sunset.
In addition, we recommend announcing blackout tests to your users, during which you can set the config setting ``FLEXMEASURES_API_SUNSET_ACTIVE = True`` to activate the sunset.
Preferably, you'd do this only after the original sunset date.
During such a blackout test, clients will receive ``HTTP status 410 (Gone)`` responses when calling corresponding endpoints.
nhoening marked this conversation as resolved.
Show resolved Hide resolved

In case you have users that haven't upgraded yet, and would still like to upgrade FlexMeasures (to the version that officially sunsets the API version), you can.
For a little while after sunset (usually one more minor version), we will continue to support "letting the sun unset".
To enable this, just set the config setting ``FLEXMEASURES_API_SUNSET_ACTIVE = False`` and consider announcing some more blackout tests to your users, during which you can set this setting to ``True`` to activate the sunset.