-
Notifications
You must be signed in to change notification settings - Fork 1
Wave9 #12
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
Conversation
more updates
This reverts commit 4213d76.
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.
Pull Request Overview
This PR enhances the AI Gateway and publishing workflow by adding wildcard/default hostnames, robust hostname validation, dynamic route generation for KServe models, and a new TestExecutionService with UI integration, while cleaning up outdated examples.
- Refactored hostname validation into
validateHostname
andvalidateHostnamePattern
for stricter public hostname checks. - Updated
PublishingService
to generate KServe-based hostnames and paths dynamically and applied URL rewrite filters. - Introduced
TestExecutionService
with new management API endpoints and integrated UI support for executing and viewing model tests.
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
scripts/bootstrap.sh | Bumped Envoy Gateway version and removed static routing application |
management/ui/src/contexts/ApiContext.js | Added AI Gateway service and test execution API methods |
management/ui/src/components/DeveloperConsole.js | Integrated test execution UI, history, and dynamic code sample generation |
management/types.go | Defined TestExecutionRequest , TestExecutionResponse , and history types |
management/test_execution.go | Implemented TestExecutionService endpoints and request execution logic |
management/server.go | Registered test execution and AI Gateway service routes |
management/publishing.go | Refactored route creation to use generated KServe hostname/path |
management/errors.go | Extracted and enhanced hostname validation logic |
management/admin.go | Added GetAIGatewayService endpoint |
configs/management/management.yaml | Updated RBAC to include envoyextensionpolicies |
configs/envoy-gateway/gateway/ai-gateway.yaml | Added wildcard and default hostnames for HTTP/HTTPS listeners |
examples/… | Removed outdated serverless and traffic scenario examples |
docs/getting-started.md, docs/architecture.md, README.md | Updated Envoy Gateway version documentation |
Comments suppressed due to low confidence (4)
management/test_execution.go:265
- The validation only checks CustomEndpoint when it's non-empty. To prevent runtime errors, enforce that CustomEndpoint must be non-empty if UseCustomConfig is true or add a validation error when it's missing.
if req.UseCustomConfig && req.CustomEndpoint != "" {
management/errors.go:287
- [nitpick] The new hostname validation logic covers many edge cases; consider adding unit tests for validateHostname and validateHostnamePattern to ensure all rules (length limits, invalid characters, patterns) behave as expected.
func (v *PublishingValidator) validateHostname(hostname string) *ValidationError {
management/test_execution.go:15
- [nitpick] The TestExecutionService and its handlers are new but lack corresponding unit or integration tests. Adding tests will improve confidence in the execution, error handling, and history retrieval functionality.
type TestExecutionService struct {
scripts/bootstrap.sh:483
- [nitpick] The static application of the HTTPRoute config was removed. Ensure that equivalent dynamic route provisioning is documented or integrated into this script so gateway routes are not missing during bootstrap.
kubectl apply -f ${PROJECT_DIR}/configs/envoy-gateway/security/jwt-security-policy.yaml
// If using custom configuration, use that | ||
if req.UseCustomConfig { |
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 UseCustomConfig is true and CustomEndpoint is empty, the code will attempt an HTTP request to an empty URL and fail. Consider validating that CustomEndpoint is provided when UseCustomConfig is enabled and returning a clear validation error.
// If using custom configuration, use that | |
if req.UseCustomConfig { | |
// If using custom configuration, validate and use that | |
if req.UseCustomConfig { | |
if req.CustomEndpoint == "" { | |
return TestExecutionResponse{ | |
Success: false, | |
Error: "CustomEndpoint must be provided when UseCustomConfig is enabled", | |
Request: req.TestData, | |
Endpoint: "", | |
Status: "Invalid Configuration", | |
StatusCode: 400, | |
} | |
} |
Copilot uses AI. Check for mistakes.
This pull request introduces several updates and improvements across multiple files, focusing on version upgrades, configuration changes, and new features for managing and validating resources. The most critical changes include updating the Envoy Gateway version, adding hostname and route configurations, removing deprecated configurations, and implementing new API endpoints and validation logic.
Version Upgrades and Documentation Updates:
v1.4.1
tov1.4.2
inREADME.md
,docs/architecture.md
, anddocs/getting-started.md
. [1] [2] [3]Configuration Changes:
configs/envoy-gateway/gateway/ai-gateway.yaml
. These changes support wildcard subdomains and specific hostnames for improved routing.configs/management/management.yaml
to includeenvoyextensionpolicies
under thegateway.envoyproxy.io
API group.Removal of Deprecated Configurations:
ai-gatewayroute.yaml
,httproute.yaml
, andexamples
directory files. These deletions reflect a shift to newer routing and deployment mechanisms. [1] [2] [3] [4] [5] [6]New API Endpoints and Features:
GetAIGatewayService
API endpoint inmanagement/admin.go
to retrieve details about the AI Gateway service, including external IP and hostname.EnvoyExtensionPolicy
management functions inmanagement/k8s.go
for creating and deleting extension policies dynamically.Validation Enhancements:
management/errors.go
to include stricter checks for format, length, and patterns. Added new helper methodsvalidateHostname
andvalidateHostnamePattern
for modular validation. [1] [2] [3]