-
Notifications
You must be signed in to change notification settings - Fork 223
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
fix: post should handle version properly #441
Conversation
Codecov Report
@@ Coverage Diff @@
## main #441 +/- ##
==========================================
+ Coverage 84.93% 86.62% +1.69%
==========================================
Files 134 134
Lines 6466 6477 +11
==========================================
+ Hits 5492 5611 +119
+ Misses 974 866 -108
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Why not instead of pattern matching version
just check if there are more /
than expected, and u just extract the last part as the endpoint, and everything before as the host where u apply some extra logic?
@JoanFM do you think check extra |
it is much easier to mantain |
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.
LGTM, please make sure it is clear in documentation
Context
Not a big fan of the solution, but the current implementation of
post
is not usable:v0.9.1-gpu
is commonly used while using an executor. The current implementation only allow us to use default, which islatest
. This result inhost
parsing not correctly parse the executor versions.Executor
, such asuses_with
,volumes
.This could be better handled by unifying
jina.hubble.helper.parse_hub_uri
, or even better to create an extraon
argument to thepost
method, but it will introduce breaking change, so i did not implement it.It is already working. But i would do a bit more refactoring, move the logic of urlparsing out of
post
, to make it unit testable.Why this is needed?