-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: send client version to server #267
feat: send client version to server #267
Conversation
natthan-pigoux
commented
Jun 27, 2024
- create a middleware to check that the client version pass in header is recent enough from what is defined in the entry_point
closes #258 |
|
a2aee1f
to
d2ab06f
Compare
@chaen find how to add properly the header in the client: |
Do I need to add more unit tests ? |
|
last commits add these tests: 92fac94 |
7450962
to
672df6a
Compare
2b47b6e
to
5b55e88
Compare
Please tell me when review is ok, so that I can squash the commits. |
Alright, you can squash the commits, it looks good 👍 |
963941f
to
1551b0c
Compare
1551b0c
to
cbca461
Compare
@@ -0,0 +1 @@ | |||
DIRACX_MIN_CLIENT_VERSION = "0.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to have that constant in routers/__init__.py
. routers.version
is too misleading as a name I believe
|
||
def get_min_client_version(): | ||
"""Extracting min client version from entry_points and searching for extension.""" | ||
matched_entry_points: EntryPoints = entry_points(group="diracx.min_client_version") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just made me realize that it is only compatible with versioning the vanilla diracx client, and not the extension. You already spent a substantial amount of time on this PR, so I will not ask you to make it extension-compatible 😆 I'll just open an issue with it