-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release-23.1: roachtest: codify longer ttl external storage buckets
Previously, the only codified external buckets for roachtests to back up to was the `cockroachdb-backup-testing` buckets in s3 and gcs which each had a ttl of 1 day. This low ttl is not suitable for roachtests that produce backups that the test failure investigator may want to inspect. This patch codifies the new `cockroachdb-backup-testing-long-ttl` buckets in s3 and gcs, which currently have a ttl of 20 days, the same ttl that team city artifacts have. This patch also points the c2c, backup-restore/mixed-version, and disagg-rebalance roachtests to use these new buckets. Note this PR only points roachtests that run in public TC environments to the new buckets. A future PR will set the BACKUP_TESTING_BUCKET_LONG_TTL env var for private roacttests to a new bucket with a longer ttl. Epic: none Release note: none
- Loading branch information
Showing
3 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright 2023 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package testutils | ||
|
||
import ( | ||
"github.com/cockroachdb/cockroach/pkg/util/envutil" | ||
) | ||
|
||
const ( | ||
defaultBackupBucket = "cockroachdb-backup-testing" | ||
longTTLBackupTestingBucket = "cockroachdb-backup-testing-long-ttl" | ||
backupTestingBucketEnvVar = "BACKUP_TESTING_BUCKET" | ||
backupTestingBucketLongTTLEnvVar = "BACKUP_TESTING_BUCKET_LONG_TTL" | ||
) | ||
|
||
// BackupTestingBucket returns the name of the external storage bucket that | ||
// should be used in a test run. Most times, this will be the regular public | ||
// bucket. In private test runs, the name of the bucket is passed through an | ||
// environment variable. | ||
func BackupTestingBucket() string { | ||
return envutil.EnvOrDefaultString(backupTestingBucketEnvVar, defaultBackupBucket) | ||
} | ||
|
||
// BackupTestingBucketLongTTL returns the name of the external storage bucket | ||
// that should be used in a test run where the bucket's content may inform a | ||
// debugging investigation. At the time of this comment, the ttl for the s3 and | ||
// gcs buckets is 20 days. | ||
// | ||
// In private test runs, the name of the bucket is passed through an environment | ||
// variable. | ||
func BackupTestingBucketLongTTL() string { | ||
return envutil.EnvOrDefaultString(backupTestingBucketLongTTLEnvVar, longTTLBackupTestingBucket) | ||
} |