-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add DataPlane API Support #936
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #936 +/- ##
========================================
+ Coverage 7.04% 7.09% +0.04%
========================================
Files 282 284 +2
Lines 65329 65542 +213
========================================
+ Hits 4602 4648 +46
- Misses 60418 60584 +166
- Partials 309 310 +1 ☔ View full report in Codecov by Sentry. |
{{.Comment " // " 80}} | ||
{{.Name}} {{.Package.Name}}.{{.Name}}Interface | ||
{{end}}{{end}} | ||
} | ||
|
||
// Returns a new OAuth scoped to the authorization details provided. | ||
// It will return an error if the CredentialStrategy does not support OAuth tokens. | ||
// |
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.
We don't need this on the WorkspaceClient, but the Client itself.
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.
@hectorcast-db, I left a few Go-style suggestions — please have a look. Happy to discuss these offline.
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.
Looking really good! Some feedback but I think we're close to the final cut here.
return nil, err | ||
} | ||
if response.{{(index .DataPlaneInfoFields 0).PascalName}} == nil { | ||
return nil, errors.New("resource does not support direct Data Plane access") |
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.
When would this case happen? Is this a bug in the API definition? Or is it possible that some model serving endpoints support direct-to-dataplane access and others don't?
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.
DataPlane access needs to be enabled on a resource level. If you call this method for a Model which is not "optimized" (their flag for DataPlane), this field won't be set (the endpointURL does not exists)
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.
Two small notes, otherwise LGTM!
### Internal Changes * Improve Changelog by grouping changes ([#962](#962)). ### Other Changes * Add ChangelogConfig to Generator struct ([#967](#967)). * Add DataPlane API Support ([#936](#936)). * Add a credentials provider for Github Azure OIDC ([#965](#965)). * Added more error messages for retriable errors (timeouts, etc.) ([#963](#963)). * Parse API Error messages with `int` error codes ([#960](#960)).
## 0.43.1 ### Major Changes and Improvements: * Add a credentials provider for Github Azure OIDC ([#965](#965)). * Add DataPlane API Support ([#936](#936)). * Added more error messages for retriable errors (timeouts, etc.) ([#963](#963)). ### Internal Changes * Add ChangelogConfig to Generator struct ([#967](#967)). * Improve Changelog by grouping changes ([#962](#962)). * Parse API Error messages with `int` error codes ([#960](#960)).
Changes
Add DataPlane API Support
Tests
Manual test:
make test
passingmake fmt
applied