Skip to content
This repository has been archived by the owner on Feb 16, 2025. It is now read-only.

Latest commit

 

History

History
53 lines (33 loc) · 2.16 KB

2022-06-cd-pipeline-project-reuse.md

File metadata and controls

53 lines (33 loc) · 2.16 KB

Use recycled GCP projects in Delivery CI pipeline

  • Status: approved
  • Last Updated: 2022-06-01
  • Objective: determine which Google Cloud (GCP) projects delivery testing systems should run against

Context & Problem Statement

Thoroughly testing our Delivery component requires having test projects that we can (attempt to) deploy Emblem to.

These projects must be created somehow.

Priorities & Constraints

  1. Some GCP environments have IAM policies prohibiting users from creating new projects.
  2. Testing against ephemeral projects might lead to:
    1. fewer flakes
    2. less dependence on pre-existing project state
  3. Creating ephemeral projects programmatically requires allowing non-human IAM principals (such as Service Accounts) to create new GCP projects.

Considered Options

  • Option 1: Pre-provision long-lived projects manually beforehand
  • Option 2: Create ephemeral projects programmatically at test time

Decision

We chose to pre-provision long-lived projects manually beforehand.

This was largely due to organization-level constraints that make it difficult (if not impossible) for our team to programmatically create new GCP projects.

Expected Consequences

Flakiness

This may cause a higher degree of CI pipeline flakiness, in both directions.

  • False passes may occur if tests depend on GCP resources within a project that are undeclared in Terraform.
  • False failures may occur if the project's previous state breaks our tools'/Terraform's attempts at automated state management.

Nightly builds only

In our experience as a team, we've found that managing pools of long-lived GCP projects can be complicated.

Without pooling or ephemeral project creation, there's no way to parallelize multiple presubmit builds.

Thus, we decided to avoid presubmit builds for Delivery testing and use nightly builds instead.

Revision Criteria

At the time of writing, the main reason to revise this decision would be if we decide that Delivery tests should be ran as presubmits.

Links

Related Issue