-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor validation logic and add verbose logging support #13
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
Conversation
BramGruneir
left a comment
There was a problem hiding this 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.
internal/validate/validate.go
Outdated
| 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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
internal/env/env.go
Outdated
| 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
1223f51 to
74381f0
Compare
|
Thanks, take another look please. |
BramGruneir
left a comment
There was a problem hiding this 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") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
74381f0 to
2be2662
Compare
Uh oh!
There was an error while loading. Please reload this page.