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

There is no obvious way to deprecate a message schema #227

Closed
abompard opened this issue Oct 7, 2020 · 1 comment · Fixed by #276
Closed

There is no obvious way to deprecate a message schema #227

abompard opened this issue Oct 7, 2020 · 1 comment · Fixed by #276
Labels
enhancement New feature or request

Comments

@abompard
Copy link
Member

abompard commented Oct 7, 2020

When a message schema must be changed in a backwards-incompatible way, a new class & schema must be written, but there is no obvious way nor helper to mark the old class as deprecated. It's always possible to raise a DeprecationWarning in the constructor, but the sender app will get that warning for the duration of the transition period, which is not ideal.

There could be a class attribute that the get_message() function would test for and raise a DeprecationWarning when true, it would only raise the warning when the message is read from the broker, not produced.

@abompard abompard added the enhancement New feature or request label Oct 7, 2020
@abompard
Copy link
Member Author

abompard commented Oct 7, 2020

CC @Zlopez

abompard added a commit to abompard/fedora-messaging that referenced this issue Oct 14, 2022
Fixes: fedora-infra#227, fedora-infra#247
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
abompard added a commit to abompard/fedora-messaging that referenced this issue Oct 14, 2022
Fixes: fedora-infra#227, fedora-infra#247
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
abompard added a commit to abompard/fedora-messaging that referenced this issue Oct 14, 2022
Fixes: fedora-infra#227, fedora-infra#247

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
abompard added a commit that referenced this issue Oct 14, 2022
Fixes: #227, #247

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant