Code Monkey home page Code Monkey logo

test-infra's People

Contributors

adrcunha avatar bbolroc avatar cardil avatar chaodaig avatar chizhg avatar coryrc avatar dependabot[bot] avatar dprotaso avatar dushyanthsc avatar ericklawitter avatar haubenr avatar joshua-bone avatar knative-automation avatar knative-prow-robot avatar knative-prow-updater-robot avatar krsna-m avatar markusthoemmes avatar mattmoor avatar mattmoor-sockpuppet avatar mdafsanhossain avatar nader-ziada avatar nak3 avatar pierdipi avatar psschwei avatar slinkydeveloper avatar srinivashegde86 avatar steuhs avatar trevorfarrelly avatar upodroid avatar yt3liu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

test-infra's Issues

presubmit tests in build-templates are broken

Prow fails running any test on knative/build-templates#50

https://gubernator.knative.dev/build/knative-prow/pr-logs/pull/knative_build-templates/50/pull-knative-build-templates-unit-tests/1029758946673430529/

I0815 15:57:40.426] Call:  /workspace/./test-infra/jenkins/../scenarios/kubernetes_execute_bazel.py -- ./test/presubmit-tests.sh --unit-tests
W0815 15:57:40.449] Run: ('./test/presubmit-tests.sh', '--unit-tests')
W0815 15:57:40.547] Traceback (most recent call last):
W0815 15:57:40.547]   File "/workspace/./test-infra/jenkins/../scenarios/kubernetes_execute_bazel.py", line 66, in <module>
W0815 15:57:40.547]     main(ARGS.cmd + ARGS.args)
W0815 15:57:40.548]   File "/workspace/./test-infra/jenkins/../scenarios/kubernetes_execute_bazel.py", line 54, in main
W0815 15:57:40.548]     return_code = call(*cmd)
W0815 15:57:40.548]   File "/workspace/./test-infra/jenkins/../scenarios/kubernetes_execute_bazel.py", line 40, in call
W0815 15:57:40.548]     return subprocess.call(cmd)
W0815 15:57:40.548]   File "/usr/lib/python2.7/subprocess.py", line 522, in call
W0815 15:57:40.548]     return Popen(*popenargs, **kwargs).wait()
W0815 15:57:40.548]   File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
W0815 15:57:40.549]     errread, errwrite)
W0815 15:57:40.549]   File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
W0815 15:57:40.549]     raise child_exception
W0815 15:57:40.549] OSError: [Errno 2] No such file or directory
E0815 15:57:40.552] Command failed
I0815 15:57:40.552] process 648 exited with code 1 after 0.0m
E0815 15:57:40.553] FAIL: pull-knative-build-templates-unit-tests

Does the Prow config for the build-templates repo need to be updated?

/assign @adrcunha

GitHub notification for Knative actions

This came up from scaling working group with @josephburnett.

PR owners often need to wait for approve/lgtm to close on a PR. However, from the reviewer side, they also have difficulty knowing when something needs their attention. It's normal for folks to get like a bazillion emails about Knative each day. We have an internal chrome pluggin for our google code review tool that gives me a little red flag in the corner of my browser when a cr needs my attention. something like that would be useful for knative. so individuals don't have to ping each person on slack.

Perhaps git notification can help. Let's discuss options.

Integration tests are failing

Internal Prow switched to timestamp-indexed builds, which cause resource names to be too long:

W0803 18:42:07.634] ERROR: (gcloud.container.clusters.create) ResponseError: code=400, message=cluster.name must be less than 40 characters.
W0803 18:42:07.682] 2018/08/03 18:42:07 process.go:152: Step 'gcloud container clusters create --quiet --enable-autoscaling --min-nodes=1 --max-nodes=3 --scopes=cloud-platform --project=gke-gerrit-boskos-02 --zone=us-central1-a --machine-type=n1-standard-4 --image-type=cos --num-nodes=3 --network=kbuild-templates-e2e-net1025451389398028288 --cluster-version=1.10.5-gke.3 kbuild-templates-e2e-cls1025451389398028288' finished in 657.926618ms
W0803 18:42:09.506] 2018/08/03 18:42:09 main.go:309: Something went wrong: starting e2e cluster: error creating cluster: error during gcloud container clusters create --quiet --enable-autoscaling --min-nodes=1 --max-nodes=3 --scopes=cloud-platform --project=gke-gerrit-boskos-02 --zone=us-central1-a --machine-type=n1-standard-4 --image-type=cos --num-nodes=3 --network=kbuild-templates-e2e-net1025451389398028288 --cluster-version=1.10.5-gke.3 kbuild-templates-e2e-cls1025451389398028288: exit status 1

Properly configure testgrid bucket in gubernator

Currently the testgrid bucket in gubernator is hardcoded, thus the version deployed is locally modified. Proper bucket definition (flag? yaml?) and deploy command (Makefile) needs to be done.

PROW_JOB_ID should not be required

Running the update-codegen.sh script from eventing fails because PROW_JOB_ID is unbounded. This var should have a default automatically set when not running on prow.

$ ./hack/update-codegen.sh
./hack/../vendor/github.com/knative/test-infra/scripts/library.sh: line 32: PROW_JOB_ID: unbound variable

Add /want-lgtm to Prow

Sometimes you want multiple reviewers to weigh in before a change is merged, but Prow always merges as soon as the minimum set is satisfied (AFAIK).

Internally, we have the concept of WANT_LGTM to enumerate those you want an /lgtm from before merging a change. I feel like such a concept would be useful in Prow as well.

e.g. I'd like to write:

/want-lgtm @fejta
/want-lgtm @cjwagner

To have tide block merges until both have given the /lgtm, this should also implicitly /assign them.

I think it would also be useful to have /want-lgtm all that waits for /lgtm from all assigned reviewers.

cc @cjwagner @fejta @grantr @adrcunha @jessiezcc WDYT?

Support Issue priority

Git issue doesn't support priority. Would be nice to support P0, P1, P2 for issues opened.

  • people can assign priority when open issue or during triage
  • we can query issues with priority label

Create helpers for build/unit/integration tests

This will simplify presubmit tests in the repos, unify features and increase coverage.

  • Build tests helper should:

    • build all go code, plus any e2e tests;
    • check for 3rd party licenses and also up-to-date depencencies (if vendor present);
    • check go formatting;
    • check links and formatting of markdown files (meaning that build tests won't be totally skipped anymore for documentation-only PRs)
  • Unit test helper should

    • run all unit tests (but NOT e2e tests) and report each test;
    • properly identify non-fatal errors that cause the test job to fail (but NO test to fail), like
    W0905 20:12:53.535] # github.com/knative/pkg/test
    W0905 20:12:53.535] test/e2e_flags.go:28:2: imported and not used: "github.com/knative/pkg/test/logging"
    
  • Integration test helper should

    • run all E2E tests and report each test;
    • properly take care of the --emit-metrics flag, like
    local options=""
    (( EMIT_METRICS )) && options="--emit-metrics"
    ./test/e2e-tests.sh ${options}
    

The coverage report does not report on files that has no corresponding *_test.go files

The go coverage report only looks at files that have *_test.go files. This provides wrong coverage outputs and also bumps up the coverage numbers. It is not reflective of the current state.

go test does specify that the package has no test files and we should capture this behaviour in our report.

For eg. in knative/pkg/test, we have some go files but no _test files.
knative/pkg/test$ go test
? github.com/knative/pkg/test [no test files]

Run tests concurrently to reduce overall test duration

As we drive up code coverage numbers, # of tests (especially unit tests) increase significantly.
@evankanderson reported overall it's taking 30+min to run the tests, we should look at how much we can save if we run tests concurrently. go test has a parallel option that supports concurrency.

We can start with unit tests first.

Google CLA bot issues

Expected Behavior

No bot issues. :)

Actual Behavior

We've seen PRs where the bot complains that the CLA was not signed (even though it was before), like in knative/serving#1435; or where a PR created with pair programming like in knative/serving#1390 or knative/serving#1352.

Steps to Reproduce the Problem

  1. Creating a PR with two different commiters is probably the easiest way to reproduce.

Additional Info

For knative/serving#1352, an adming was able to solve the problem by temporarily disabling and then re-enabling a setting about admins being able to edit PRs.

Correctly identify changed files in PR in presubmit

Current approach using git frequently produces wrong results.

Now that we have prow-tests image, we can add a tool to it that would query GitHub about the changes and report the changes files in the current PR.

Rename test-infra to productivity

Since this will be our primary repo for productivity related projects, is it feasible to rename the repo to Productivity? "test-infra" is a bit limited in terms of scope.

e2e tests are trying to create an unsupported k8s cluster

In knative/build#335 the e2e tests report (https://gubernator.knative.dev/build/knative-prow/pr-logs/pull/knative_build/335/pull-knative-build-integration-tests/1039211002157076480/):

W0910 17:56:49.696] Fetching server config for us-central1
I0910 17:56:49.811] Latest GKE is 1.10.7, from [1.10.7-gke.1, /1.10.6-gke.3, /1.10.6-gke.2, /1.9.7-gke.6, /1.9.7-gke.5, /1.9.6-gke.2]

However, cluster creation fails with:

W0910 17:57:41.815] 2018/09/10 17:57:41 process.go:152: Step 'gcloud container clusters create --quiet --enable-autoscaling --min-nodes=1 --max-nodes=3 --scopes=cloud-platform --project=knative-boskos-05 --zone=us-central1-a --machine-type=n1-standard-4 --image-type=cos --num-nodes=3 --network=kbuild-e2e-net1039211002157076480 --cluster-version=1.10.7 kbuild-e2e-cls1039211002157076480' finished in 681.070848ms
W0910 17:57:42.751] 2018/09/10 17:57:42 main.go:309: Something went wrong: starting e2e cluster: error creating cluster: error during gcloud container clusters create --quiet --enable-autoscaling --min-nodes=1 --max-nodes=3 --scopes=cloud-platform --project=knative-boskos-05 --zone=us-central1-a --machine-type=n1-standard-4 --image-type=cos --num-nodes=3 --network=kbuild-e2e-net1039211002157076480 --cluster-version=1.10.7 kbuild-e2e-cls1039211002157076480: exit status 1

Use --gcp_service_account instead of GOOGLE_APPLICATION_CREDENTIALS with kubetest

In the prow logs, when creating a knative cluster with kubetest, we see:
util.go:132: Please use kubetest --gcp-service-account=/etc/service-account/service-account.json (instead of deprecated GOOGLE_APPLICATION_CREDENTIALS=/etc/service-account/service-account.json)

We should heed that warning and update our kubetest args

Knartive releases failing since 8/3

Root cause:

2018/08/07 08:28:18 error processing import paths in "config/webhook.yaml": no token in bearer response:
W0807 08:48:47.729] {"errors":[{"code":"DENIED","message":"Token exchange failed for project 'knative-releases'. Caller does not have permission 'storage.buckets.get'. To configure permissions, follow instructions at: https://cloud.google.com/container-registry/docs/access-control"}]}

Investigate using kind for e2e tests on Prow

kind (kubernetes in docker) might make e2e tests faster since there's no need to create an external cluster. However, it needs to be taken into consideration that we have to start a k8s cluster with a known, public version (e.g. 1.11.1).

Allow clone issues for knative repos

When I open code coverage issues for each repo, I wish we can clone an existing issue, and just need to do minor updates to create a new issue.

Make conformance and e2e test images public

/area test-and-release
/kind dev

Expected Behavior

There is no reason folks should have to build and push the e2e images and conformance test images whenever they want to run the tests, the images hardly ever change and they don't do much. They should be available publicly so folks can get up and running with the tests faster, and they should be regularly updated.

Note this will have to play nicely with a person's $DOCKER_REPO_OVERRIDE.

Actual Behavior

The tests expect anyone running the e2e or conformance tests to have built and pushed the images to their own repo.

Steps to Reproduce the Problem

n/a

Additional Info

Thanks @jonjohnsonjr !

Surface metrics for test flakiness such as /test /retest

This came up from discussion with Matt.
Number of (/test, /retest) is a good measurement for test flakiness. Let's include it as part of project health metric.

FlakinessSignal: Number of (/test, /retest) / Number of PR

Ideally, as number of PR grows, we'd like above ratio not to go up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.