Repository: envoyproxy/gateway

Issue:
docs: “Response Compression” missing prereq boilerplate
*Description*:
Page is missing prereq boilerplate.

Page: https://gateway.envoyproxy.io/docs/tasks/traffic/response-compression/



Discussion:

Solution patch:
diff --git a/internal/gatewayapi/envoyextensionpolicy.go b/internal/gatewayapi/envoyextensionpolicy.go
index 7b27adbf0..079fdced2 100644
--- a/internal/gatewayapi/envoyextensionpolicy.go
+++ b/internal/gatewayapi/envoyextensionpolicy.go
@@ -614,12 +614,16 @@ func (t *Translator) buildWasms(
 	policy *egv1a1.EnvoyExtensionPolicy,
 	resources *resource.Resources,
 ) ([]ir.Wasm, error) {
+	var wasmIRList []ir.Wasm
+
+	if len(policy.Spec.Wasm) == 0 {
+		return wasmIRList, nil
+	}
+
 	if t.WasmCache == nil {
 		return nil, fmt.Errorf("wasm cache is not initialized")
 	}
 
-	var wasmIRList []ir.Wasm
-
 	if policy == nil {
 		return nil, nil
 	}
diff --git a/release-notes/current.yaml b/release-notes/current.yaml
index 8f4ef39f4..d704edba9 100644
--- a/release-notes/current.yaml
+++ b/release-notes/current.yaml
@@ -15,6 +15,7 @@ new features: |
   Added XDS metadata for clusters and endpoints from xRoutes and referenced backend resources (Backend, Service, ServiceImport).
 
 bug fixes: |
+  Fixed issue where WASM cache init failure caused routes with WASM-less EnvoyExtensionPolicies to have 500 direct responses.
 
 # Enhancements that improve performance.
 performance improvements: |
diff --git a/site/content/en/v1.4/tasks/traffic/response-compression.md b/site/content/en/v1.4/tasks/traffic/response-compression.md
index 249c7a5e1..02ad572ff 100644
--- a/site/content/en/v1.4/tasks/traffic/response-compression.md
+++ b/site/content/en/v1.4/tasks/traffic/response-compression.md
@@ -4,10 +4,9 @@ title: "Response Compression"
 
 Response Compression allows you to compress the response from the backend before sending it to the client. This can be useful for scenarios where the backend sends large responses that can be compressed to reduce the network bandwidth. However, this comes with a trade-off of increased CPU usage on the Envoy side to compress the response.
 
-## Installation
+## Prerequisites
 
-Follow the steps from the [Quickstart](../../quickstart) to install Envoy Gateway and the example manifest.
-Before proceeding, you should be able to query the example backend using HTTP.
+{{< boilerplate prerequisites >}}
 
 ## Testing Response Compression
 



Test patch:
diff --git a/internal/cmd/egctl/testdata/translate/out/backend-endpoint.all.yaml b/internal/cmd/egctl/testdata/translate/out/backend-endpoint.all.yaml
index e9816d345..1e913ac3d 100644
--- a/internal/cmd/egctl/testdata/translate/out/backend-endpoint.all.yaml
+++ b/internal/cmd/egctl/testdata/translate/out/backend-endpoint.all.yaml
@@ -77,9 +77,7 @@ envoyExtensionPolicies:
         namespace: envoy-gateway-system
       conditions:
       - lastTransitionTime: null
-        message: |-
-          Wasm: wasm cache is not initialized
-          ExtProc: service envoy-gateway-system/grpc-ext-proc not found.
+        message: 'ExtProc: service envoy-gateway-system/grpc-ext-proc not found.'
         reason: Invalid
         status: "False"
         type: Accepted
diff --git a/site/content/en/latest/tasks/traffic/response-compression.md b/site/content/en/latest/tasks/traffic/response-compression.md
index 249c7a5e1..02ad572ff 100644
--- a/site/content/en/latest/tasks/traffic/response-compression.md
+++ b/site/content/en/latest/tasks/traffic/response-compression.md
@@ -4,10 +4,9 @@ title: "Response Compression"
 
 Response Compression allows you to compress the response from the backend before sending it to the client. This can be useful for scenarios where the backend sends large responses that can be compressed to reduce the network bandwidth. However, this comes with a trade-off of increased CPU usage on the Envoy side to compress the response.
 
-## Installation
+## Prerequisites
 
-Follow the steps from the [Quickstart](../../quickstart) to install Envoy Gateway and the example manifest.
-Before proceeding, you should be able to query the example backend using HTTP.
+{{< boilerplate prerequisites >}}
 
 ## Testing Response Compression
 
diff --git a/test/e2e/tests/weighted_backend.go b/test/e2e/tests/weighted_backend.go
index bea61448f..154c6f5fb 100644
--- a/test/e2e/tests/weighted_backend.go
+++ b/test/e2e/tests/weighted_backend.go
@@ -66,6 +66,9 @@ func runWeightedBackendTest(t *testing.T, suite *suite.ConformanceTestSuite, rou
 		suite.ControllerName,
 		kubernetes.NewGatewayRef(SameNamespaceGateway), weightEqualRoute)
 
+	// Make sure all test resources are ready
+	kubernetes.NamespacesMustBeReady(t, suite.Client, suite.TimeoutConfig, []string{ConformanceInfraNamespace})
+
 	expectedResponse := http.ExpectedResponse{
 		Request: http.Request{
 			Path: path,
diff --git a/test/e2e/tests/zone_aware_routing.go b/test/e2e/tests/zone_aware_routing.go
index 77958dcdb..5ac6edc0f 100644
--- a/test/e2e/tests/zone_aware_routing.go
+++ b/test/e2e/tests/zone_aware_routing.go
@@ -10,7 +10,6 @@ package tests
 import (
 	"testing"
 
-	"sigs.k8s.io/gateway-api/conformance/utils/kubernetes"
 	"sigs.k8s.io/gateway-api/conformance/utils/suite"
 )
 
@@ -24,9 +23,6 @@ var ZoneAwareRoutingTest = suite.ConformanceTest{
 	Manifests:   []string{"testdata/zone-aware-routing.yaml"},
 	Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {
 		t.Run("only local zone should get requests", func(t *testing.T) {
-			// Let's make sure that all the deployments are ready.
-			kubernetes.NamespacesMustBeReady(t, suite.Client, suite.TimeoutConfig, []string{"gateway-conformance-infra"})
-
 			// Pods from the backend-local deployment have affinity
 			// for the Envoy Proxy pods so should receive all requests.
 			expected := map[string]int{