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

Deprecation notice for API versions 1.0 to 2.0 #544

Closed
2 tasks done
Flix6x opened this issue Nov 30, 2022 · 5 comments · Fixed by #554
Closed
2 tasks done

Deprecation notice for API versions 1.0 to 2.0 #544

Flix6x opened this issue Nov 30, 2022 · 5 comments · Fixed by #554

Comments

@Flix6x
Copy link
Contributor

Flix6x commented Nov 30, 2022

  • Start logging warnings whenever users call endpoints in the API blueprints 1.0, 1.1, 1.2, 1.3 and 2.0.
  • Add release notice for FlexMeasures hosts (example follows).

With flexmeasures==0.12 we start logging warnings whenever users call endpoints in the API blueprints 1.0, 1.1, 1.2, 1.3 and 2.0. With flexmeasures==0.13 users still calling these endpoint will receive a deprecation notice.

@Flix6x Flix6x added this to the 0.12.0 milestone Nov 30, 2022
@nhoening
Copy link
Contributor

I'd aim to remove the endpoints in 0.13, so in 0.12 I'd send both notices, to API users and to hosts (per log)

@Flix6x
Copy link
Contributor Author

Flix6x commented Nov 30, 2022

How would you send notices to API users?

One option is to add it as a message to the response, but I suspect that such messages will not be noticed, unless the response causes a failure down the line.

Or would you email the user?

@nhoening
Copy link
Contributor

The former solution. Hosts can mail users they see in the logs, otherwise they get too many emails. We should use Sentry for our logging as well, that's easy to filter.

@Flix6x
Copy link
Contributor Author

Flix6x commented Nov 30, 2022

Just to be clear, I don't want responses in 0.12 to cause failures down the line. Just adding the notice as an extra message to the response already seems fine, though.

@Flix6x Flix6x self-assigned this Dec 12, 2022
@Flix6x Flix6x added this to To do in Deprecate old database models via automation Dec 12, 2022
@Flix6x Flix6x changed the title Warn for deprecation notice for API versions 1.0 to 2.0 Deprecation notice for API versions 1.0 to 2.0 Dec 13, 2022
@Flix6x Flix6x linked a pull request Dec 13, 2022 that will close this issue
6 tasks
@Flix6x
Copy link
Contributor Author

Flix6x commented Dec 14, 2022

While putting in the work for this PR, I discovered that the recommended way of adding deprecation notices is not through the response message, but rather through the response headers. There are dedicated fields for deprecation and sunsetting, which are at various levels of maturity of becoming an Internet Standard.

Eric Wilde published on the matter: https://goodapi.co/insights/deprecation-and-sunsetting

Deprecate old database models automation moved this from To do to Done Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants