debian-forge-composer/internal
Tomas Hozza 3a0540dff0 test/api.sh: randomize used GCP zone from the region
The `api.sh` test currently always defaults to "<REGION>-a" zone when
creating instance using the built image. The resources in a zone may get
exhausted and the solution is to use a different zone. Currently even a
CI job retry won't help with mitigation of such error during a CI run.

Modify `api.sh` to pick random GCP zone for a given region when creating
a compute instance. Use only GCP zones which are "UP".

The `cloud-cleaner` relied on the behavior of `api.sh` to always choose
the "<REGION>-a" zone. Guessing the chosen zone in `cloud-cleaner` is
not viable, but thankfully the instance name is by default unique for
the whole GCP project. Modify `cloud-cleaner` to iterate over all
available zones in the used region and try to delete the specific
instance in each of them.

Make `ComputeZonesInRegion` method from the `internal/cloud/gcp` package
exported and use it in `cloud-cleaner` for getting the list of available
zones in a region.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-16 10:14:30 +02:00
..
blueprint weldr: Add distro field to blueprints 2021-07-12 08:58:42 +02:00
boot upload/aws: add support for session tokens 2021-06-28 13:14:19 +03:00
client Add 2nd distribution to the NewTestAPI function 2021-07-12 08:58:42 +02:00
cloud/gcp test/api.sh: randomize used GCP zone from the region 2021-07-16 10:14:30 +02:00
cloudapi cloudapi: check if metadata is nil before converting 2021-06-29 09:33:05 +01:00
common Move isStringInSlice to common.IsStringInSlice 2021-07-12 08:58:42 +02:00
crypt crypt: add automatic darwin support 2020-07-17 07:48:22 +02:00
disk osbuild: rename package to osbuild1 2021-03-17 18:12:17 +00:00
distro distro: drop Fedora 32 2021-07-05 11:16:08 +02:00
distroregistry distro: drop Fedora 32 2021-07-05 11:16:08 +02:00
jobqueue worker: Introduce heartbeats 2021-07-08 21:14:38 +01:00
jsondb jsondb: Allow passing nil as document to Read() 2020-05-13 16:45:09 +02:00
kojiapi worker: Move job tokens to the queue itself 2021-07-08 21:14:38 +01:00
mocks worker: Add identity filter and client oauth support 2021-06-17 10:08:35 +02:00
osbuild1 osbuild1: convert stage metadata from v2 2021-06-29 09:33:05 +01:00
osbuild2 osbuild2: add support for org.osbuild.authselect stage 2021-07-08 19:37:09 +02:00
ostree ostree: add test for VerifyRef() 2021-06-18 14:02:09 +01:00
reporegistry reporegistry: Add a DistroHasRepos helper function 2021-07-12 08:58:42 +02:00
rpmmd rhel85: distro and arch package sets 2021-07-01 12:48:32 +02:00
store api_test: Test compose with 2nd distribution 2021-07-12 08:58:42 +02:00
target New upload target: AWS S3 2021-06-18 14:02:09 +01:00
test worker: Add identity filter and client oauth support 2021-06-17 10:08:35 +02:00
upload spec: drop hacks for Fedora 32 2021-07-05 11:16:08 +02:00
weldr weldr: Filter the list of supported distributions 2021-07-12 08:58:42 +02:00
worker worker: Introduce heartbeats 2021-07-08 21:14:38 +01:00
tools.go go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00