Skip to content

Commit 0772c3f

Browse files
authored
chore: split snapshot tests from main API tests (#4929)
The failures of the snapshot tests being lumped in with the other API tests lead to error fatigue. I'm splitting these up, and having separate Cloud Build jobs for everything.
1 parent c110b9b commit 0772c3f

3 files changed

Lines changed: 41 additions & 9 deletions

File tree

cloudbuild.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ steps:
3434

3535
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:slim'
3636
id: 'api-tests'
37-
# Need custom service account for api tests access to oss-vdb-test datastore
38-
args: ['gcloud', 'builds', 'submit', '--region=${LOCATION}', '--config=gcp/api/cloudbuild.yaml', '--service-account=projects/oss-vdb/serviceAccounts/api-e2e-tester@oss-vdb.iam.gserviceaccount.com', '.']
37+
args: ['gcloud', 'builds', 'submit', '--region=${LOCATION}', '--config=gcp/api/cloudbuild.yaml', '.']
3938
waitFor: ['init']
4039

4140
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:slim'

gcp/api/cloudbuild.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ steps:
4141
args: ['bash', '-ex', 'run_tests.sh', '/workspace/dummy.json']
4242
waitFor: ['init', 'sync']
4343

44-
- name: 'gcr.io/oss-vdb/ci'
45-
id: 'api-snapshot-tests'
46-
dir: gcp/api
47-
args: ['bash', '-ex', 'run_tests_e2e.sh', '/workspace/dummy.json']
48-
# Don't run at the same time as api-tests
49-
waitFor: ['init', 'sync', 'api-tests']
50-
5144
timeout: 7200s
5245
serviceAccount: 'projects/oss-vdb/serviceAccounts/api-e2e-tester@oss-vdb.iam.gserviceaccount.com'
5346
options:

gcp/api/snapshot_tests.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# api e2e test runner
16+
# This should be triggered on changes to the following:
17+
# gcp/api/poetry.lock
18+
# gcp/api/run_tests_e2e.sh
19+
# gcp/api/*.py
20+
# gcp/api/**/*.py
21+
# osv/*.py
22+
# osv/**/*.py
23+
# tools/apitester/**
24+
steps:
25+
- name: 'gcr.io/oss-vdb/ci'
26+
id: 'sync'
27+
dir: gcp/api
28+
args: ['poetry', 'sync']
29+
30+
- name: 'gcr.io/oss-vdb/ci'
31+
id: 'api-snapshot-tests'
32+
dir: gcp/api
33+
args: ['bash', '-ex', 'run_tests_e2e.sh', '/workspace/dummy.json']
34+
35+
timeout: 7200s
36+
serviceAccount: 'projects/oss-vdb/serviceAccounts/api-e2e-tester@oss-vdb.iam.gserviceaccount.com'
37+
options:
38+
logging: CLOUD_LOGGING_ONLY
39+
env:
40+
- CLOUDBUILD=1

0 commit comments

Comments
 (0)