Rename s3checker cmd flags (#4215)

<!-- PR description-->

* Rename some flags to bring parity with corso cli flags. `--bucket-prefix` to `--prefix`, `--prefix` to `--object-prefix`. This is so that we can avoid passing overrides until sometime later. 
* Ideally this change should not be needed. This is part of a stopgap solution to remove s3 coupling from corso cli package.
* A more architectural solution is [managing overrides using viper](https://github.com/alcionai/corso/issues/4219). That change is a bit more involved, so i'll be adding that later. 
---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [x] 🧹 Tech Debt/Cleanup

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Abhishek Pandey 2023-09-12 00:14:11 +05:30 committed by GitHub
parent c92ce44e10
commit e484fc8967
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -352,14 +352,14 @@ jobs:
# - x - index blobs # - x - index blobs
./s3checker \ ./s3checker \
--bucket ${{ secrets.CI_RETENTION_TESTS_S3_BUCKET }} \ --bucket ${{ secrets.CI_RETENTION_TESTS_S3_BUCKET }} \
--bucket-prefix ${{ env.PREFIX }} \ --prefix ${{ env.PREFIX }} \
--retention-mode ${{ env.RETENTION_MODE }} \ --retention-mode ${{ env.RETENTION_MODE }} \
--live-retention-duration "$((${{ env.RETENTION_DURATION }}-1))h" \ --live-retention-duration "$((${{ env.RETENTION_DURATION }}-1))h" \
--prefix "kopia.blobcfg" \ --object-prefix "kopia.blobcfg" \
--prefix "kopia.repository" \ --object-prefix "kopia.repository" \
--prefix "p" \ --object-prefix "p" \
--prefix "q" \ --object-prefix "q" \
--prefix "x" --object-prefix "x"
fi fi
########################################################################## ##########################################################################

View File

@ -52,12 +52,12 @@ func checkerCommand() (*cobra.Command, error) {
"Name of bucket to check") "Name of bucket to check")
fs.StringVar( fs.StringVar(
&f.bucketPrefix, &f.bucketPrefix,
"bucket-prefix", "prefix",
"", "",
"Prefix to add to all object lookups") "Prefix to add to all object lookups")
fs.StringSliceVar( fs.StringSliceVar(
&f.prefixes, &f.prefixes,
"prefix", "object-prefix",
nil, nil,
"Set of object prefixes to check. Pass multiple times for multiple prefixes") "Set of object prefixes to check. Pass multiple times for multiple prefixes")