Skip to content

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

Merged
merged 15 commits into from
Jul 17, 2025
Merged

Wave9 #12

merged 15 commits into from
Jul 17, 2025

Conversation

smarunich
Copy link
Owner

@smarunich smarunich commented Jul 16, 2025

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:

  • Updated Envoy Gateway version from v1.4.1 to v1.4.2 in README.md, docs/architecture.md, and docs/getting-started.md. [1] [2] [3]

Configuration Changes:

  • Added hostname and route configurations for HTTP and HTTPS in configs/envoy-gateway/gateway/ai-gateway.yaml. These changes support wildcard subdomains and specific hostnames for improved routing.
  • Extended permissions in configs/management/management.yaml to include envoyextensionpolicies under the gateway.envoyproxy.io API group.

Removal of Deprecated Configurations:

  • Removed outdated configurations for AI Gateway routes, HTTP routes, and model inference services in multiple files, including ai-gatewayroute.yaml, httproute.yaml, and examples directory files. These deletions reflect a shift to newer routing and deployment mechanisms. [1] [2] [3] [4] [5] [6]

New API Endpoints and Features:

  • Added a new GetAIGatewayService API endpoint in management/admin.go to retrieve details about the AI Gateway service, including external IP and hostname.
  • Introduced EnvoyExtensionPolicy management functions in management/k8s.go for creating and deleting extension policies dynamically.

Validation Enhancements:

  • Refactored hostname validation logic in management/errors.go to include stricter checks for format, length, and patterns. Added new helper methods validateHostname and validateHostnamePattern for modular validation. [1] [2] [3]

smarunich and others added 6 commits July 16, 2025 21:13
@smarunich smarunich requested a review from Copilot July 16, 2025 22:01
Copilot

This comment was marked as outdated.

@smarunich smarunich requested a review from Copilot July 16, 2025 22:29
Copilot

This comment was marked as outdated.

@smarunich smarunich requested a review from Copilot July 17, 2025 16:42
Copilot

This comment was marked as outdated.

@smarunich smarunich requested a review from Copilot July 17, 2025 17:02
Copilot

This comment was marked as outdated.

@smarunich smarunich requested a review from Copilot July 17, 2025 17:07
Copilot

This comment was marked as outdated.

@smarunich smarunich requested a review from Copilot July 17, 2025 19:03
Copy link
Contributor

@Copilot Copilot AI left a 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 and validateHostnamePattern 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

Comment on lines +72 to +73
// If using custom configuration, use that
if req.UseCustomConfig {
Copy link
Preview

Copilot AI Jul 17, 2025

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.

Suggested change
// 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.

@smarunich smarunich merged commit af99223 into main Jul 17, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant