Skip to content

Conversation

@sravotto
Copy link
Collaborator

@sravotto sravotto commented Sep 16, 2025

  • Extract validate.go methods into smaller focused functions
  • Add input parameter validation and improved error handling
  • Optimize goroutine management with dedicated worker methods
  • Add verbose flag support to CLI and environment configuration
  • Add worker count and duration as CLI parameters
  • Improve test configuration with better error reporting
  • Add --short-test flag for abbreviated test runs

Copy link
Collaborator

@BramGruneir BramGruneir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a bunch of questions and comments.

if fullCount != 1 {
return errors.Newf("expected exactly 1 full backup, got %d", fullCount)
if fullCount != expectedFullBackupCount {
return errors.Newf("expected exactly %d full backup, got %d", expectedFullBackupCount, fullCount)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: need to write backups if expectedFullBackupCount != 1

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand your comment

Endpoint string // the S3 endpoint
LookupEnv LookupEnv // allows injection of environment variable lookup for testing
Path string // the S3 bucket path
Short bool // Short validation, only guess params.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually do the work? It seems like it doesn't.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to "guess", it tries different params combination and suggest one. It uses only the AWS SDK, without requiring access to the CRDB cluster. (If guess = false, then we run the full validation test)

@sravotto
Copy link
Collaborator Author

Thanks, take another look please.

Copy link
Collaborator

@BramGruneir BramGruneir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cmd/root.go Outdated
f.StringVar(&envConfig.Path, "path", envConfig.Path, "destination path (e.g. bucket/folder)")
f.StringVar(&envConfig.Endpoint, "endpoint", envConfig.Path, "http endpoint")
f.StringVar(&envConfig.URI, "uri", envConfig.URI, "S3 URI")
f.BoolVar(&envConfig.Guess, "guess", false, "perform a short test to guess suggested parameters")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a little bit to the description that says it does not run any other tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

- Extract validate.go methods into smaller focused functions
- Add input parameter validation and improved error handling
- Optimize goroutine management with dedicated worker methods
- Add verbose flag support to CLI and environment configuration
- Add --worker count and --workload-duration as CLI parameters
- Add --short-test flag for abbreviated test runs
- Improve test configuration with better error reporting
@sravotto sravotto merged commit 8704aac into main Sep 19, 2025
6 checks passed
@sravotto sravotto deleted the sr8_refact branch September 29, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants