Commit Graph

141 Commits

Author SHA1 Message Date
Patrick Ohly
3e2b26ce52 e2e: revise complete report creation
The previous approach was based on the observation that some Prow jobs use the
--report-dir parameter instead of the E2E_REPORT_DIR env variable. Parsing the
command line was necessary to use the --json-report and --junit-report
parameters.

But that is complex and can be avoided by triggering the creation of complete
reports in the E2E test suite. The paths are hard-coded and relative to the
report directory to keep the code simple.

There was a report that k8s-triage started processing more data after
6db4b741dd was merged. It's unclear whether
that was because of the new <report-dir>/ginkgo_report.xml file. To avoid
this potential problem, the reports are now in a "ginkgo" sub-directory.

While at it, error checking gets enhanced:
- Create directories at the start of
  the suite and bail out early if that fails.
- *All* e2e suites using the framework do this, not just test/e2e.
- Added missing error checking of truncated JUnit report writing.
2023-02-10 10:20:20 +01:00
Patrick Ohly
1c66b708ec ginkgo-e2e.sh: remove deprecated --slow-spec-threshold
From the warning message that ginkgo now emits:

  --slow-spec-threshold is deprecated --slow-spec-threshold has been deprecated
  and will be removed in a future version of Ginkgo.  This feature has proved
  to be more noisy than useful.  You can use --poll-progress-after, instead, to
  get more actionable feedback about potentially slow specs and understand
  where they might be getting stuck.

We already use --poll-progress-after.
2022-12-21 07:55:07 +01:00
Patrick Ohly
6db4b741dd e2e: dump full report information
The Ginkgo CLI output no longer has the full output. We need the reports
generated by Ginkgo for that.
2022-12-21 07:55:07 +01:00
Patrick Ohly
460f796bb7 e2e: fix ginkgo parameter setup
This is a fix for 104aab81a4: because
the default was not set for E2E_TEST_DEBUG_TOOL, all parameters were always
also passed to the E2E suite.

That wasn't wrong for the parameters so far, but breaks when using something
like --output-dir which is only understood by the CLI.
2022-12-20 07:56:27 +01:00
Patrick Ohly
b39e56b475 e2e: fix ginkgo-e2e.sh with no arguments
If the script was called with no arguments, it passed "${@:-}" to the suite,
which expands to one empty argument. That's not right, "${@}" should be used
instead because it expands to nothing when empty.
2022-12-20 07:56:27 +01:00
Andrew Sy Kim
ae1e93bfbe remove TEST_IGNORE_CLOUDPROVIDER_TAINT from hack/ginkgo-e2e.sh
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-11-05 22:04:37 -04:00
Patrick Ohly
104aab81a4 hack: pass Ginkgo arguments more intelligently
Most parameters can be passed to both the CLI and the suite, but some
(for example, --ginkgo.slow-spec-threshold) had no effect when only
passed to the suite.
2022-10-21 19:57:53 +02:00
Kubernetes Prow Robot
2126509ab2
Merge pull request #111339 from chendave/debugoptions
e2e: Remove ginkgo option `output-interceptor-mode`
2022-10-17 03:35:09 -07:00
Walter Fender
4f6894d206 Adding flag for testing to ignore cloud provider taint.
Adding the ability to ignore no schedule flags in testing.
Specifically node.cloudprovider.kubernetes.io/uninitialized:NoSchedule
Fix shellcheck complaint.
2022-10-06 10:54:35 -07:00
Patrick Ohly
b4e0804764 e2e: poll state of test
The new support in ginkgo for progress reports while a test runs dumps
information about where a test is stuck when it runs too long. This can provide
additional insights into what the test is waiting for.

For the Kubernetes jobs using ginkgo-e2e.sh, such dumps are now enabled after
300 seconds and then get repeated every 20 seconds. The initial delay is
intentionally the same as for warning about a slow test. The rationale is that
such test runtimes are unexpected and may need further information to diagnose
why they are slow.

With -ginkgo.source-root, Ginkgo is able to locate the Kubernetes source code
and display small source code snippets for functions that are related to the
test, determined through a heuristic that assumes that all files under the test
suite are for the tests in it.
2022-09-18 10:11:22 +02:00
Dave Chen
3db3ad0778 e2e: Remove ginkgo option output-interceptor-mode
Set intercept mode to none will help to reveal more information when the
test hangs,
- https://github.com/onsi/ginkgo/issues/970

or circumvent cases where the code grabbing the stdout/stderr pipe
is not under the framework control and may cause hangs,
- https://github.com/onsi/ginkgo/issues/851

The flag `output-interceptor-mode` is set to `none` as we were trying to
figure out of the rootcase of the test flaky, it's only intended for debugging.
- https://github.com/kubernetes/kubernetes/issues/111086

But this set also has some side effect, since it will turn off stdout/stderr
capture completely, any output to stdout/stderr will be lost.

Now that the root cause is not caused by Ginkgo bump nor how the intercept
mode was set, we'd better to follow the default value.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-09-15 10:01:07 +08:00
Patrick Ohly
9ff8bdbd25 ginkgo: disable color escape sequences by default when not connected to a terminal
This applies to all jobs using hack/ginkgo-e2e.sh. This is done because
Spyglass does not render the escape sequences, making test output harder to
read.

It is done here because then we don't need to set GINKGO_NO_COLOR in all the
different Prow job configs.
2022-08-02 14:19:10 +02:00
Antonio Ojea
fbc39f9c02 set ginkgo interncepto mode to none to avoid hangs 2022-07-19 09:15:11 +02:00
Antonio Ojea
e3ded9c8d6 migrate deprecate flags from ginkgo v1 to v2 2022-07-11 00:11:35 +02:00
Dave Chen
2f3028c00d Define the timeout to 24h for Ginkgo V2
Default timeout setting has been reduced from `24h` down to `1h` in
Ginkgo V2, but for some long running test this is too short.

How long to abort the test was controlled by the the linux command `timeout`
in V1. e.g. `'timeout -k 30s 150m ...`, and is configured in the file
like `sig-network-misc.yaml`.

Set the timeout manually for Ginkgo V2 to avoid the early aborting.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-08 10:46:11 +08:00
Dave Chen
ace64c0138 Switch to use the DBG flag to build debug binaries
With the merging of #108371, the old way to build the debug binaries
won't work anymore.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-03-09 14:57:59 +08:00
Ciprian Hacman
d01e9cedb1 Clean up logic for deprecated flag --container-runtime in scripts
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-01-20 11:19:08 +02:00
Claudiu Belu
35e23afa50 tests: Prepull images commonly used test images
Some tests have a short timeout for starting the pods (1 minute), but if
those tests happen to be the first ones to run, and the images have to be
pulled, then the test could timeout, especially with larger images. This
commit will allow us to prepull commonly used E2E test images, so this issue
can be avoided.
2021-11-05 14:22:50 -07:00
Mauricio Poppe
5f4f322ad4 make program an array and keep ginkgo_args as it is 2021-04-01 22:33:14 +00:00
Mauricio Poppe
f301e3189a enable debug mode of E2E tests 2021-03-18 02:52:09 +00:00
Kubernetes Prow Robot
219c856ce2
Merge pull request #91555 from daixiang0/scr
*.sh: cleanup all white noise
2020-06-20 05:26:53 -07:00
Davanum Srinivas
1731cb30f5
Use containerd as default in kube-up.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-06-07 14:34:50 -04:00
Xiang Dai
e09bc312cb *.sh: cleanup all white noise
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
2020-05-29 09:56:00 +08:00
Claudiu Belu
1a8183d262 tests: Adds configurable docker conf for test
The image "gcr.io/authenticated-image-pulling/windows-nanoserver:v1" is not a
manifest list, and it is only useful for Windows Server 1809, which means that the
test "should be able to pull from private registry with secret" will fail for
environments with Windows Server 1903, 1909, or any other future version we might
want to test.

This commit adds the the ability to have an alternative private image to pull by
using a configurable docker config file which contains the necessary credentials
needed to pull the image.
2020-02-22 22:21:28 -08:00
Jin Hase
e992ec0d59 Add comments in several hack/*.sh 2020-01-28 09:27:40 +09:00
Marek Siarkowicz
31fb04fa98 Remove cluster-monitoring
Heapster is deprecated and no longer supported
2019-12-09 11:25:20 +01:00
Kubernetes Prow Robot
a8e819746d
Merge pull request #83442 from serathius/remove-prometheus-addon
Remove prometheus addon
2019-10-29 01:34:43 -07:00
ianlang
3359577d42 set default value of KUBE_MASTER_URL to empty 2019-10-22 10:08:55 +08:00
Marek Siarkowicz
887e84e330 Remove Prometheus addon and it's tests
Prometheus addon was developed for exterimental and test purpose only.
As readme states it should not be used by anyone.
2019-10-03 14:15:58 +02:00
aaa
2fb859db42 Fix shellcheck failures on
update pull request

update pull request
2019-04-21 12:40:12 -04:00
Roy Lenferink
a5d0616bdc Improving syntax for bash scripts 2019-01-18 19:17:16 +01:00
Pradeep Murugesan
adf33a63c2 68907 added the slow spec threshold option to ginkgo 2019-01-08 20:53:07 +01:00
Sandeep Rajan
4c8a65ac01 configure cluster domain via flags 2018-11-01 12:27:54 -04:00
Kubernetes Submit Queue
5686fcfcf8
Merge pull request #62328 from serathius/monitoring-default-none
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Deprecate InfluxDB cluster monitoring

InfluxDB cluster monitoring addon will no longer be supported and will be removed in k8s 1.12.
Default monitoring solution will be changed to `standalone`.
Heapster will still be deployed for backward compatibility of `kubectl top`

```release-note
Stop using InfluxDB as default cluster monitoring
InfluxDB cluster monitoring is deprecated and will be removed in v1.12
```
cc @piosz
2018-05-16 07:07:05 -07:00
Marek Siarkowicz
c21aeacc36 Remove InfluxDB from default cluster monitoring 2018-04-19 16:17:55 +02:00
Matthias Bertschy
9b15af19b2 Update all script to use /usr/bin/env bash in shebang 2018-04-19 13:20:13 +02:00
Marek Siarkowicz
9544222e91 Test e2e prometheus addon 2018-04-13 11:12:10 +02:00
Mike Danese
4961065562 cluster: remove unused functions 2018-02-01 07:23:50 -08:00
Marian Lobur
ba313796f1 Fix influxdb e2e test failure.
In scalability testing influxdb was recently disabled, but we still
trying to execute corresponidng test, as a result it fails all the time.
Skip test if influxdb is disabled.
2017-11-10 09:16:45 +01:00
Maru Newby
adc338d330 Remove all traces of federation 2017-10-26 13:37:37 -07:00
Ken'ichi Ohmichi
c39e231c29 Fix indent of ginkgo-e2e.sh
The condition of GINKGO_UNTIL_IT_FAILS didn't contain a valid indent.
So this PR fixes it for readable code.
2017-07-31 15:10:56 -07:00
Maciej Borsz
7822b5d9fd Add a support for GKE regional clusters in e2e tests. 2017-07-28 11:42:54 +02:00
Kubernetes Submit Queue
6507a94d8e Merge pull request #49001 from fejta/ginkgo
Automatic merge from submit-queue (batch tested with PRs 49043, 49001, 49057, 49066, 48102)

Explicitly set --cluster-ip-range --clean-start --minStartupPods

ref https://github.com/kubernetes/test-infra/pull/3535 https://github.com/kubernetes/test-infra/pull/3375

Also remove unused `GINKGO_PARALLELISM`

/assign @krzyzacy @ixdy
2017-07-17 22:21:15 -07:00
Zach Loafman
3a2e9d51bb cluster/gke: If NODE_INSTANCE_GROUP is set, don't execute any bash
Transitional part of kubernetes/test-infra#3307, should be eliminated
by kubernetes/test-infra#3330: Allow NODE_INSTANCE_GROUP to be set
before we get here, which eliminates any cluster/gke use if
KUBERNETES_CONFORMANCE_PROVIDER is set to "gke".
2017-07-17 14:26:10 -07:00
Erick Fejta
46bcc330b7 Explicitly set --cluster-ip-range --clean-start --minStartupPods 2017-07-16 18:18:43 -07:00
Shyam Jeedigunta
c1a76fbb57 Make cluster IP range an argument to ginkgo to fix firewall test 2017-06-30 16:18:18 +02:00
Zihong Zheng
0acdc89d96 Pipe in GCE master/node tags through flags for e2e test 2017-06-06 17:27:07 -07:00
Huamin Chen
165d46a0a8 e2e test: test azure disk volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-04-28 18:51:34 +00:00
Jan Safranek
a327302200 e2e tests should be multizone aware
Pass MULTIZONE=true env. variable to e2e test framework.
2017-04-06 13:28:29 +02:00
joseph-lanoux
b2560666fa Update ginkgo-e2e.sh 2017-03-28 15:18:18 +01:00