Deprecate calling kubetest2 via kntest #4991
knative-verify.yaml
on: pull_request
verify
/
Verify Deps and Codegen
8m 16s
Annotations
5 errors and 1 warning
verify / Verify Deps and Codegen:
vendor/knative.dev/hack/e2e-tests.sh#L1
Please run ./hack/update-codegen.sh.
diff --git a/vendor/knative.dev/hack/e2e-tests.sh b/vendor/knative.dev/hack/e2e-tests.sh
index 331511c..96290f9 100644
--- a/vendor/knative.dev/hack/e2e-tests.sh
+++ b/vendor/knative.dev/hack/e2e-tests.sh
@@ -19,6 +19,8 @@
source "$(dirname "${BASH_SOURCE[0]:-$0}")/infra-library.sh"
+readonly TEST_RESULT_FILE=/tmp/${REPO_NAME}-e2e-result
+
# Tear down the test resources.
function teardown_test_resources() {
header "Tearing down test environment"
@@ -131,7 +133,6 @@ E2E_SCRIPT=""
function initialize() {
local run_tests=0
local custom_flags=()
- local extra_gcloud_flags=()
local parse_script_flags=0
E2E_SCRIPT="$(get_canonical_path "$0")"
local e2e_script_command=( "${E2E_SCRIPT}" "--run-tests" )
@@ -176,12 +177,16 @@ function initialize() {
shift
done
+ if [[ "${CLOUD_PROVIDER}" == "gke" ]]; then
+ custom_flags+=("--addons=NodeLocalDNS")
+ fi
+
readonly SKIP_DUMP_ON_FAILURE
readonly TEARDOWN
readonly CLOUD_PROVIDER
if (( ! run_tests )); then
- create_test_cluster "${CLOUD_PROVIDER}" custom_flags extra_gcloud_flags e2e_script_command
+ create_test_cluster "${CLOUD_PROVIDER}" custom_flags e2e_script_command
else
setup_test_cluster
fi
|
verify / Verify Deps and Codegen:
vendor/knative.dev/hack/infra-library.sh#L1
Please run ./hack/update-codegen.sh.
diff --git a/vendor/knative.dev/hack/infra-library.sh b/vendor/knative.dev/hack/infra-library.sh
index 4782d09..84a87e2 100644
--- a/vendor/knative.dev/hack/infra-library.sh
+++ b/vendor/knative.dev/hack/infra-library.sh
@@ -91,7 +91,7 @@ function create_test_cluster() {
fi
case "$1" in
- gke) create_gke_test_cluster "$2" "$3" "$4" "${5:-}" ;;
+ gke) create_gke_test_cluster "$2" "$3" "${4:-}" ;;
kind) create_kind_test_cluster "$2" "$3" "${4:-}" ;;
*) echo "unsupported provider: $1"; exit 1 ;;
esac
@@ -117,50 +117,29 @@ function create_kind_test_cluster() {
}
# Create a GKE test cluster with kubetest2 and run the test command.
-# Parameters: $1 - custom flags defined in kubetest2
-# $2 - custom flags to pass directly to gcloud
-# $3 - test command to run after the cluster is created (optional)
+# Parameters: $1 - custom flags defined in kntest
+# $2 - test command to run after the cluster is created (optional)
function create_gke_test_cluster() {
local -n _custom_flags=$1
- local -n _extra_gcloud_flags=$2
- local -n _test_command=$3
+ local -n _test_command=$2
# We are disabling logs and metrics on Boskos Clusters by default as they are not used. Manually set ENABLE_GKE_TELEMETRY to true to enable telemetry
# and ENABLE_PREEMPTIBLE_NODES to true to create preemptible/spot VMs. VM Preemption is a rare event and shouldn't be distruptive given the fault tolerant nature of our tests.
+ local extra_gcloud_flags=""
if [[ "${ENABLE_GKE_TELEMETRY:-}" != "true" ]]; then
- _extra_gcloud_flags+=("--logging=NONE --monitoring=NONE")
- fi
-
- if [[ "${CLOUD_PROVIDER}" == "gke" ]]; then
- extra_gcloud_flags+=("--addons=NodeLocalDNS")
+ extra_gcloud_flags="${extra_gcloud_flags} --logging=NONE --monitoring=NONE"
fi
if [[ "${ENABLE_PREEMPTIBLE_NODES:-}" == "true" ]]; then
- _extra_gcloud_flags+=("--preemptible")
+ extra_gcloud_flags="${extra_gcloud_flags} --preemptible"
fi
-
- _extra_gcloud_flags+=("--quiet")
if ! command -v kubetest2 >/dev/null; then
tmpbin="$(mktemp -d)"
echo "kubetest2 not found, installing in temp path: ${tmpbin}"
GOBIN="$tmpbin" go install sigs.k8s.io/kubetest2/...@latest
export PATH="${tmpbin}:${PATH}"
fi
- if [[ ! " ${_custom_flags[*]} " =~ "--machine-type=" ]]; then
- _custom_flags+=("--machine-type=e2-standard-4")
- fi
- kubetest2 gke "${_custom_flags[@]}" \
- --rundir-in-artifacts \
- --up \
- --down \
- --boskos-heartbeat-interval-seconds=20 \
- --v=1 \
- --network=e2e-network \
- --boskos-acquire-timeout-seconds=1200 \
- --region="${E2E_CLUSTER_REGION},us-east1,us-west1" \
- --gcloud-extra-flags="${_extra_gcloud_flags[*]}" \
- --retryable-error-patterns='.*does not have enough resources available to fulfill.*,.*only \\d+ nodes out of \\d+ have registered; this is likely due to Nodes failing to start correctly.*,.*All cluster resources were brought up.+ but: component .+ from endpoint .+ is unhealthy.*' \
- --test=exec \
- -- \
- "${_test_command[@]}"
+ run_kntest kubetest2 gke "${_custom_flags[@]}" \
+ --test-command="${_test_command[*]}" \
+ --extra-gcloud-flags="${extra_gcloud_flags}"
}
|
verify / Verify Deps and Codegen:
vendor/knative.dev/hack/performance-tests.sh#L1
Please run ./hack/update-codegen.sh.
diff --git a/vendor/knative.dev/hack/performance-tests.sh b/vendor/knative.dev/hack/performance-tests.sh
index 23e17e5..440668d 100644
--- a/vendor/knative.dev/hack/performance-tests.sh
+++ b/vendor/knative.dev/hack/performance-tests.sh
@@ -17,7 +17,7 @@
# This is a helper script for Knative performance test scripts.
# See README.md for instructions on how to use it.
-source "$(dirname "${BASH_SOURCE[0]}")"/library.sh
+source $(dirname "${BASH_SOURCE[0]}")/library.sh
# Configurable parameters.
# If not provided, they will fall back to the default values.
@@ -76,8 +76,7 @@ EOF
update_knative || abort "failed to update knative"
fi
# get benchmark name from the cluster name
- local benchmark_name
- benchmark_name=$(get_benchmark_name "$1")
+ local benchmark_name=$(get_benchmark_name "$1")
if function_exists update_benchmark; then
update_benchmark "${benchmark_name}" || abort "failed to update benchmark"
fi
@@ -93,16 +92,13 @@ function get_benchmark_name() {
# Update the clusters related to the current repo.
function update_clusters() {
header "Updating all clusters for ${REPO_NAME}"
- local all_clusters
- all_clusters=$(gcloud container clusters list --project="${PROJECT_NAME}" --format="csv[no-heading](name,zone)")
+ local all_clusters=$(gcloud container clusters list --project="${PROJECT_NAME}" --format="csv[no-heading](name,zone)")
echo ">> Project contains clusters:" "${all_clusters}"
for cluster in ${all_clusters}; do
- local name
- name=$(echo "${cluster}" | cut -f1 -d",")
+ local name=$(echo "${cluster}" | cut -f1 -d",")
# the cluster name is prefixed with "${REPO_NAME}--", here we should only handle clusters belonged to the current repo
[[ ! ${name} =~ ^${REPO_NAME}-- ]] && continue
- local zone
- zone=$(echo "${cluster}" | cut -f2 -d",")
+ local zone=$(echo "${cluster}" | cut -f2 -d",")
# Update all resources installed on the cluster
update_cluster "${name}" "${zone}"
@@ -113,7 +109,7 @@ function update_clusters() {
# Run the perf-tests tool
# Parameters: $1..$n - parameters passed to the tool
function run_perf_cluster_tool() {
- perf-tests "$@"
+ perf-tests $@
}
# Delete the old clusters belonged to the current repo, and recreate them with the same configuration.
|
verify / Verify Deps and Codegen:
vendor/knative.dev/hack/presubmit-tests.sh#L1
Please run ./hack/update-codegen.sh.
diff --git a/vendor/knative.dev/hack/presubmit-tests.sh b/vendor/knative.dev/hack/presubmit-tests.sh
index d210dc7..1c6e5a8 100644
--- a/vendor/knative.dev/hack/presubmit-tests.sh
+++ b/vendor/knative.dev/hack/presubmit-tests.sh
@@ -17,7 +17,7 @@
# This is a helper script for Knative presubmit test scripts.
# See README.md for instructions on how to use it.
-source "$(dirname "${BASH_SOURCE[0]}")"/library.sh
+source $(dirname "${BASH_SOURCE[0]}")/library.sh
# Custom configuration of presubmit tests
readonly PRESUBMIT_TEST_FAIL_FAST=${PRESUBMIT_TEST_FAIL_FAST:-0}
|
verify / Verify Deps and Codegen
Process completed with exit code 1.
|
verify / Verify Deps and Codegen
Restore cache failed: Dependencies file is not found in /home/runner/work/eventing/eventing. Supported file pattern: go.sum
|