Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: Add --gpg-auto-import-keys to avoid SLES flakes #1442

Merged
merged 3 commits into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion integration_test/gce/gce_testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -966,10 +966,13 @@ func prepareSLES(ctx context.Context, logger *log.Logger, vm *VM) error {

backoffPolicy = backoff.WithContext(backoff.WithMaxRetries(backoff.NewConstantBackOff(5*time.Second), 120), ctx) // 10 minutes max.
err = backoff.Retry(func() error {
// --gpg-auto-import-keys is included to fix a rare flake where (due to
// a policy being installed already) there is a new key that needs to
// be imported.
// timezone-java was selected arbitrarily as a package that:
// a) can be installed from the default repos, and
// b) isn't installed already.
_, zypperErr := RunRemotely(ctx, logger, vm, "", "sudo zypper refresh && sudo zypper -n install timezone-java")
_, zypperErr := RunRemotely(ctx, logger, vm, "", "sudo zypper --non-interactive --gpg-auto-import-keys refresh && sudo zypper --non-interactive install timezone-java")
return zypperErr
}, backoffPolicy)
if err != nil {
Expand Down
Loading