Skip to content

Commit

Permalink
code spell check (vmware-tanzu#5230)
Browse files Browse the repository at this point in the history
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
  • Loading branch information
Lyndon-Li committed Aug 18, 2022
1 parent a36736e commit 775943c
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: codespell-project/actions-codespell@master
with:
# ignore the config/.../crd.go file as it's generated binary data that is edited elswhere.
skip: .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico,./config/crd/v1beta1/crds/crds.go,./config/crd/v1/crds/crds.go,./go.sum
skip: .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico,./config/crd/v1beta1/crds/crds.go,./config/crd/v1/crds/crds.go,./go.sum,./LICENSE
ignore_words_list: iam,aks,ist,bridget,ue
check_filenames: true
check_hidden: true
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ Instead, a new method for 'Progress' will be added to interface. Velero server r

But, this involves good amount of changes and needs a way for backward compatibility.

As volume plugins are mostly K8s native, its fine to go ahead with current limiation.
As volume plugins are mostly K8s native, its fine to go ahead with current limitation.

### Update Backup CR
Instead of creating new CRs, plugins can directly update the status of Backup CR. But, this deviates from current approach of having separate CRs like PodVolumeBackup/PodVolumeRestore to know operations progress.
Expand Down
2 changes: 1 addition & 1 deletion hack/release-tools/tag-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ eval $(go run $DIR/chk_version.go)
printf "To clarify, you've provided a version string of $VELERO_VERSION.\n"
printf "Based on this, the following assumptions have been made: \n"

# $VELERO_PATCH gets populated by the chk_version.go scrip that parses and verifies the given version format
# $VELERO_PATCH gets populated by the chk_version.go script that parses and verifies the given version format
# If we've got a patch release, we assume the tag is on release branch.
if [[ "$VELERO_PATCH" != 0 ]]; then
printf "*\t This is a patch release.\n"
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions pkg/repository/udmrepo/repo-options.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,50 +89,50 @@ type StoreOptionsGetter interface {
GetStoreOptions(param interface{}) (map[string]string, error)
}

func NewRepoOptions(options ...func(*RepoOptions) error) (*RepoOptions, error) {
ro := &RepoOptions{}
for _, o := range options {
err := o(ro)
func NewRepoOptions(optionFuncs ...func(*RepoOptions) error) (*RepoOptions, error) {
options := &RepoOptions{}
for _, optionFunc := range optionFuncs {
err := optionFunc(options)
if err != nil {
return nil, err
}
}

return ro, nil
return options, nil
}

func WithPassword(getter PasswordGetter, param interface{}) func(*RepoOptions) error {
return func(ro *RepoOptions) error {
return func(options *RepoOptions) error {
password, err := getter.GetPassword(param)
if err != nil {
return err
}

ro.RepoPassword = password
options.RepoPassword = password

return nil
}
}

func WithConfigFile(workPath string, repoID string) func(*RepoOptions) error {
return func(ro *RepoOptions) error {
ro.ConfigFilePath = getRepoConfigFile(workPath, repoID)
return func(options *RepoOptions) error {
options.ConfigFilePath = getRepoConfigFile(workPath, repoID)
return nil
}
}

func WithGenOptions(genOptions map[string]string) func(*RepoOptions) error {
return func(ro *RepoOptions) error {
return func(options *RepoOptions) error {
for k, v := range genOptions {
ro.GeneralOptions[k] = v
options.GeneralOptions[k] = v
}

return nil
}
}

func WithStoreOptions(getter StoreOptionsGetter, param interface{}) func(*RepoOptions) error {
return func(ro *RepoOptions) error {
return func(options *RepoOptions) error {
storeType, err := getter.GetStoreType(param)
if err != nil {
return err
Expand All @@ -143,19 +143,19 @@ func WithStoreOptions(getter StoreOptionsGetter, param interface{}) func(*RepoOp
return err
}

ro.StorageType = storeType
options.StorageType = storeType

for k, v := range storeOptions {
ro.StorageOptions[k] = v
options.StorageOptions[k] = v
}

return nil
}
}

func WithDescription(desc string) func(*RepoOptions) error {
return func(ro *RepoOptions) error {
ro.Description = desc
return func(options *RepoOptions) error {
options.Description = desc
return nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func GetKubeconfigContext() error {
func TestE2e(t *testing.T) {
// Skip running E2E tests when running only "short" tests because:
// 1. E2E tests are long running tests involving installation of Velero and performing backup and restore operations.
// 2. E2E tests require a kubernetes cluster to install and run velero which further requires ore configuration. See above referenced command line flags.
// 2. E2E tests require a kubernetes cluster to install and run velero which further requires more configuration. See above referenced command line flags.
if testing.Short() {
t.Skip("Skipping E2E tests")
}
Expand Down

0 comments on commit 775943c

Please sign in to comment.