Skip to content

Commit

Permalink
ci: Fix broken tests (envoyproxy#20754)
Browse files Browse the repository at this point in the history
* [backport/v1.18] ci: Fix broken tests

- partial fix for macOS (VM)
- fix for windows VM
- fix cache verify example
- fix VRP verify example

Signed-off-by: Ryan Northey <ryan@synca.io>

* ci: speed up OSX CI (envoyproxy#17351)

This should give very basic sanity coverage.

Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax committed Apr 13, 2022
1 parent 1010a28 commit 59e83f5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .azure-pipelines/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ stages:
- job: test
timeoutInMinutes: 180
pool:
vmImage: "macos-latest"
vmImage: "macos-10.15"
steps:
- script: ./ci/mac_ci_setup.sh
displayName: "Install dependencies"
Expand Down Expand Up @@ -441,7 +441,7 @@ stages:
- job: release
timeoutInMinutes: 120
pool:
vmImage: "windows-latest"
vmImage: "windows-2019"
steps:
- task: Cache@2
inputs:
Expand Down Expand Up @@ -476,7 +476,7 @@ stages:
- job: clang_cl
timeoutInMinutes: 120
pool:
vmImage: "windows-latest"
vmImage: "windows-2019"
steps:
- task: Cache@2
inputs:
Expand Down Expand Up @@ -512,7 +512,7 @@ stages:
dependsOn: ["release"]
timeoutInMinutes: 120
pool:
vmImage: "windows-latest"
vmImage: "windows-2019"
steps:
- task: DownloadBuildArtifacts@0
inputs:
Expand Down
2 changes: 1 addition & 1 deletion ci/docker_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ for BUILD_TYPE in "${BUILD_TYPES[@]}"; do
build_images "${BUILD_TYPE}" "$image_tag"

if ! is_windows; then
if [[ "$BUILD_TYPE" == "" || "$BUILD_TYPE" == "-alpine" ]]; then
if [[ "$BUILD_TYPE" == "" || "$BUILD_TYPE" == "-alpine" || "$BUILD_TYPE" == "-google-vrp" ]]; then
# verify_examples expects the base and alpine images, and for them to be named `-dev`
dev_image="envoyproxy/envoy${BUILD_TYPE}-dev:latest"
docker tag "$image_tag" "$dev_image"
Expand Down
15 changes: 11 additions & 4 deletions ci/mac_ci_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,23 @@ BAZEL_BUILD_OPTIONS=(
# is somewhat more deterministic (rather than interleaving the build
# and test steps).

DEFAULT_TEST_TARGETS=(
"//test/integration:integration_test"
"//test/integration:protocol_integration_test"
"//test/integration:tcp_proxy_integration_test"
"//test/integration:extension_discovery_integration_test"
"//test/integration:listener_lds_integration_test")

if [[ $# -gt 0 ]]; then
TEST_TARGETS=$*
TEST_TARGETS=("$@")
else
TEST_TARGETS='//test/integration/...'
TEST_TARGETS=("${DEFAULT_TEST_TARGETS[@]}")
fi

if [[ "$TEST_TARGETS" == "//test/..." || "$TEST_TARGETS" == "//test/integration/..." ]]; then
if [[ "${TEST_TARGETS[*]}" == "${DEFAULT_TEST_TARGETS[*]}" ]]; then
bazel build "${BAZEL_BUILD_OPTIONS[@]}" //source/exe:envoy-static
fi
bazel test "${BAZEL_BUILD_OPTIONS[@]}" "${TEST_TARGETS}"
bazel test "${BAZEL_BUILD_OPTIONS[@]}" "${TEST_TARGETS[@]}"

# Additionally run macOS specific test suites
bazel test "${BAZEL_BUILD_OPTIONS[@]}" //test/common/network:apple_dns_impl_test
5 changes: 4 additions & 1 deletion examples/cache/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ def get(service_number, response_id):

# response.make_conditional() will change the response to a 304 response
# if a 'if-none-match' header exists in the request and matches the etag
return response.make_conditional(request)
conditional_response = response.make_conditional(request)
# hacky workaround for flask's dodgy header handling
del conditional_response.headers["Date"]
return conditional_response


if __name__ == "__main__":
Expand Down

0 comments on commit 59e83f5

Please sign in to comment.