cloudfoundry/test-infra

Name: test-infra

Owner: Cloud Foundry

Description: null

Created: 2018-04-28 00:03:47.0

Updated: 2018-04-28 00:03:50.0

Pushed: 2018-04-30 18:37:08.0

Homepage: null

Size: 175140

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Istio Test Infra

Istio Test Infra

Testing Infrastructure

Istio's current testing infrastructure is based on Jenkins.

Jenkins listens on PRs for all modules that have a Jenkinsfile. For each protected branch, a set of required tests are defined. Only once tests are passing and after review approval can a PR be merged to master branch. If a stable branch exists for that module, a new fastForward branch (based on HEAD of master) will be created and a PR will be automatically created for the stable branch. This will trigger qualification jobs.

More details here.

Tests Types
Life of a PR
  1. PR on master: We build necessary artifacts for other tests and we tag them with the PR?s branch head SHA.

    Example:

    • istioctl: https://storage.googleapis.com/istio-artifacts/:${BRANCH_HEAD_SHA}/artifacts/istioctl
    • Docker images: gcr.io//istio-testing/manager:${BRANCH_HEAD_SHA}
  2. Postsubmit on Master: We usually run stuff like code coverage here.

  3. PR on stable: We build necessary artifacts for other tests and we tag them with PR?s master head SHA.

    Example:

    • istioctl: https://storage.googleapis.com/istio-artifacts/:${MASTER_SHA}/artifacts/istioctl
    • Docker Images: gcr.io//istio-testing/manager:${MASTER_SHA}
  4. Postsubmit on Stable: We rebuild artifacts with stable tag and we push docker images to official Docker Hubs ie gcr.io/istio-io and docker.io/istio.

    Example:

    • istioctl: https://storage.googleapis.com/istio-artifacts/:${STABLE_TAG}/artifacts/istioctl
    • Docker Images: gcr.io//istio-io/manager:${DATE}, docker.io.istio/manager:${DATE}

| | PR to Master | PR to stable | |:——————|:——————————|:——————————| | istio/manager | - Unit tests | - Longer integration tests | | | - Integration tests | - istio/istio e2e suite | | | - istio/istio e2e smoke test | | | istio/mixer | - Unit tests | - istio/istio e2e suite | | | - Manager Regression | | | | - istio/istio e2e smoke test | | | istio/proxy | - Unit tests | | | | - Manager Regression | | | | - istio/istio e2e smoke test | | | istio/mixerclient | - Unit tests | | | | - Proxy Regression | | | | - istio/istio e2e smoke test | | | istio/auth | - Unit tests | | | | - Manager Regression | | | | - istio/istio e2e smoke test | |

This diagram is just an example for Mixer. It is the responsibility of each module to listen to other modules that they depend on to prevent breakage. The test done on master branches and stable might be different across modules depending on the type of integration between modules.

The istio/istio module is where integration between all modules is tested.

Life of a PR

Breaking Change

Here are examples that will trigger e2e-smoketest failures:

  1. Template changes required on istio/istio
  2. Adding new artifacts which require change to istio/istio
  3. Incompatible binary change

Note that (3) can usually be avoided by creating compatibility glue code (Feature protected by a flag and enabled in the future). If possible, this should be used, and a maintenance issue should be created to remove the glue code once istio/istio module has been updated with a stable version.

For (1) and (2), force pushing the breaking change will be required. Once a breaking change is forced pushed, all subsequent PRs will require Admin approval. It is therefore in everyone?s interest to have a plan of action to limit impact on the module. If the breaking change impacts multiple modules, Admins of the impacted modules should come up with a plan to resolve the breakage before approving the breaking PR.

In this case, we assume that PR A is created on any of the istio/manager, istio/mixer and istio/auth, that module presubmit passed, but the module e2e-smoketest failed.

In that case follow this procedure

Breaking Change

Admin Responsibilities
  1. Force push the breaking change after checking that testing artifacts created by the PR are passing the smoke test.
  2. Working with the breaking change's author until the situation is resolved.
  3. During a breaking change, prevent other changes from going in, which will delay the process.
  4. Make sure that istio/istio is using latest stable version of module artifacts.
  5. Update bazel dependencies on other modules with latest stable one..
Build Cop Responsibilities
  1. Look at unassigned PRs.
  2. Investigate postsubmit issues and assign issues to Admins.
FAQ
My PR has required check but they did not start. Why ?

Are you part of the istio Github Organization? If not, you might need an Istio member to run tests for you, after they have reviewed the submitted code.

Org member can comment /ok-to-test on your PR to start testing.

How can I retest my PR ?

If you are part of the istio Github Organization, you can start a test by:

  1. Drop a comment on your PR: “test istio-presubmit” if prow/istio-presubmit is the required check that you want to start
I have a breaking change. How can I go about it ?

Follow the Breaking Change procedure.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.