Skip to content

Commit

Permalink
Don't use preemptible VMs for presubmit + other fixes (#230)
Browse files Browse the repository at this point in the history
* Don't use prempible VMs for presubmit

* wait in redistribution

* fix

* foo

* foo

* Set test sizes

* fix sizes
  • Loading branch information
DanG100 authored Aug 17, 2023
1 parent 37dba34 commit 3dd319b
Show file tree
Hide file tree
Showing 30 changed files with 33 additions and 5 deletions.
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ go_library(

go_test(
name = "lemming_test",
size = "medium",
srcs = ["lemming_test.go"],
embed = [":lemming"],
deps = [
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ load-operator:
.PHONY: load
load:
bazel build //cmd/lemming:image-tar
kind load image-archive bazel-bin/cmd/lemming/image-tar/tarball.tar --name kne
docker load -i bazel-bin/cmd/lemming/image-tar/tarball.tar
kind load docker-image us-west1-docker.pkg.dev/openconfig-lemming/release/lemming:ga --name kne

.PHONY: buildfile
buildfile:
Expand All @@ -27,11 +28,11 @@ load-debug:
## Run integration tests
.PHONY: itest
itest:
bazel test --test_output=errors --cache_test_results=no //integration_tests/...
bazel test --test_output=errors --cache_test_results=no $(shell bazel query 'tests("//...") except (attr(size, small, tests("//...")) + attr(size, medium, tests("//..."))) ')

.PHONY: test
test:
bazel test --test_output=errors $(shell bazel query 'tests("//...") except "//integration_tests/..."')
bazel test --test_output=errors $(shell bazel query 'attr(size, small, tests("//...")) + attr(size, medium, tests("//..."))')

.PHONY: test-race
test-race:
Expand Down
2 changes: 1 addition & 1 deletion bgp/tests/local_tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "local_tests_test",
size = "medium",
size = "large",
srcs = [
"policy_test.go",
"prefix_set_test.go",
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild/presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ steps:
- USERNAME=user
- SSH_ARGS=--internal-ip --ssh-key-expire-after=1d
- INSTANCE_NAME=kne-presubmit-$BUILD_ID
- INSTANCE_ARGS=--network cloudbuild-workers --image-project gep-kne --image-family kne --machine-type e2-standard-16 --preemptible --scopes=cloud-platform
- INSTANCE_ARGS=--network cloudbuild-workers --image-project gep-kne --image-family kne --machine-type e2-standard-16 --scopes=cloud-platform
- ZONE=us-central1-a
- REMOTE_WORKSPACE=/tmp/workspace
- COMMAND=sh -c "BUILD=$BUILD_ID /tmp/workspace/cloudbuild/presubmit.sh"
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/fwdaction/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ go_library(

go_test(
name = "fwdaction_test",
size = "small",
srcs = ["action_test.go"],
embed = [":fwdaction"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/fwdaction/actions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ go_library(

go_test(
name = "actions_test",
size = "small",
srcs = [
"debug_test.go",
"drop_test.go",
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/fwdport/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ go_library(

go_test(
name = "fwdport_test",
size = "small",
srcs = ["port_test.go"],
embed = [":fwdport"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/fwdport/ports/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ go_library(

go_test(
name = "ports_test",
size = "small",
srcs = [
"cpu_test.go",
"fake_test.go",
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/fwdtable/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ go_library(

go_test(
name = "fwdtable_test",
size = "small",
srcs = ["table_test.go"],
embed = [":fwdtable"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/fwdtable/bridge/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ go_library(

go_test(
name = "bridge_test",
size = "small",
srcs = ["bridge_test.go"],
embed = [":bridge"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/fwdtable/exact/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ go_library(

go_test(
name = "exact_test",
size = "small",
srcs = [
"exact_test.go",
"exactutil_test.go",
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/fwdtable/flow/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ go_library(

go_test(
name = "flow_test",
size = "small",
srcs = ["flow_test.go"],
embed = [":flow"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/fwdtable/prefix/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ go_library(

go_test(
name = "prefix_test",
size = "small",
srcs = [
"prefix_test.go",
"prefixkey_test.go",
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/infra/fwdflowcounter/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ go_library(

go_test(
name = "fwdflowcounter_test",
size = "small",
srcs = ["flow_counter_test.go"],
embed = [":fwdflowcounter"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/infra/fwdobject/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ go_library(

go_test(
name = "fwdobject_test",
size = "small",
srcs = [
"object_id_test.go",
"object_table_test.go",
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/infra/fwdpacket/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ go_library(

go_test(
name = "fwdpacket_test",
size = "small",
srcs = ["field_test.go"],
embed = [":fwdpacket"],
deps = ["//proto/forwarding"],
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/infra/fwdset/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ go_library(

go_test(
name = "fwdset_test",
size = "small",
srcs = ["set_test.go"],
embed = [":fwdset"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/protocol/packet/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "packet_test",
size = "small",
srcs = [
"arp_test.go",
"ethernet_test.go",
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/util/frame/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(

go_test(
name = "frame_test",
size = "small",
srcs = ["frame_test.go"],
embed = [":frame"],
)
1 change: 1 addition & 0 deletions dataplane/forwarding/util/hash/crc16/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ go_library(

go_test(
name = "crc16_test",
size = "small",
srcs = ["crc16_test.go"],
embed = [":crc16"],
deps = ["//dataplane/forwarding/util/hash/hash16"],
Expand Down
1 change: 1 addition & 0 deletions dataplane/forwarding/util/hash/csum16/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(

go_test(
name = "csum16_test",
size = "small",
srcs = ["csum16_test.go"],
embed = [":csum16"],
)
1 change: 1 addition & 0 deletions dataplane/forwarding/util/queue/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ go_library(

go_test(
name = "queue_test",
size = "small",
srcs = ["queue_test.go"],
embed = [":queue"],
)
1 change: 1 addition & 0 deletions dataplane/forwarding/util/stats/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(

go_test(
name = "stats_test",
size = "small",
srcs = ["stats_test.go"],
embed = [":stats"],
)
1 change: 1 addition & 0 deletions dataplane/internal/kernel/kerneltest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ go_library(

go_test(
name = "kerneltest_test",
size = "small",
srcs = ["kernel_test.go"],
embed = [":kerneltest"],
deps = select({
Expand Down
1 change: 1 addition & 0 deletions gnmi/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ go_library(

go_test(
name = "gnmi_test",
size = "small",
srcs = [
"gnmi_bench_test.go",
"gnmi_test.go",
Expand Down
1 change: 1 addition & 0 deletions gnmi/reconciler/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ go_library(

go_test(
name = "reconciler_test",
size = "small",
srcs = ["reconciler_test.go"],
embed = [":reconciler"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions gnsi/acltrie/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ go_library(

go_test(
name = "acltrie_test",
size = "small",
srcs = ["trie_test.go"],
embed = [":acltrie"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions gnsi/pathz/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ go_library(

go_test(
name = "pathz_test",
size = "small",
srcs = ["pathz_test.go"],
embed = [":pathz"],
deps = [
Expand Down
1 change: 1 addition & 0 deletions integration_tests/twodut_tests/bgp_establish/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "bgp_establish_test",
size = "enormous",
srcs = ["bgp_establish_test.go"],
data = ["//integration_tests/twodut_tests:topology_testbed"],
tags = [
Expand Down
1 change: 1 addition & 0 deletions operator/controllers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ go_library(

go_test(
name = "controllers_test",
size = "small",
srcs = ["lemming_controller_test.go"],
embed = [":controllers"],
deps = [
Expand Down

0 comments on commit 3dd319b

Please sign in to comment.