Skip to content

Commit

Permalink
revert tags generator comparator change
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonaj committed Sep 26, 2024
1 parent dac6e5b commit 33de098
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions internal/generate/tags/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ var (
updateTagsFunc = flag.String("UpdateTagsFunc", defaultUpdateTagsFunc, "updateTagsFunc")
waitTagsPropagatedFunc = flag.String("WaitFunc", defaultWaitTagsPropagatedFunc, "waitFunc")
waitContinuousOccurence = flag.Int("WaitContinuousOccurence", 0, "ContinuousTargetOccurence for Wait function")
waitFuncComparator = flag.String("WaitFuncComparator", "Equal", "waitFuncComparator")
waitDelay = flag.Duration("WaitDelay", 0, "Delay for Wait function")
waitMinTimeout = flag.Duration("WaitMinTimeout", 0, `"MinTimeout" (minimum poll interval) for Wait function`)
waitPollInterval = flag.Duration("WaitPollInterval", 0, "PollInterval for Wait function")
Expand Down Expand Up @@ -215,7 +214,6 @@ type TemplateData struct {
WaitTagsPropagatedFunc string
WaitContinuousOccurence int
WaitDelay string
WaitFuncComparator string
WaitMinTimeout string
WaitPollInterval string
WaitTimeout string
Expand Down Expand Up @@ -372,7 +370,6 @@ func main() {
UpdateTagsFunc: *updateTagsFunc,
UpdateTagsIgnoreSystem: !*updateTagsNoIgnoreSystem,
WaitForPropagation: *waitForPropagation,
WaitFuncComparator: *waitFuncComparator,
WaitTagsPropagatedFunc: *waitTagsPropagatedFunc,
WaitContinuousOccurence: *waitContinuousOccurence,
WaitDelay: formatDuration(*waitDelay),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func {{ .WaitTagsPropagatedFunc }}(ctx context.Context, conn {{ .ClientType }},
output = output.IgnoreConfig(inContext.IgnoreConfig)
}

return output.{{ .WaitFuncComparator }}(tags), nil
return output.Equal(tags), nil
}
opts := tfresource.WaitOpts{
{{- if ne .WaitContinuousOccurence 0 }}
Expand Down
2 changes: 1 addition & 1 deletion internal/service/dynamodb/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: MPL-2.0

//go:generate go run ../../generate/tagresource/main.go
//go:generate go run ../../generate/tags/main.go -GetTag -ListTags -ListTagsOp=ListTagsOfResource -ServiceTagsSlice -UpdateTags -Wait -WaitContinuousOccurence 2 -WaitMinTimeout 1s -WaitTimeout 2m -WaitFuncComparator=ContainsAll -ParentNotFoundErrCode=ResourceNotFoundException
//go:generate go run ../../generate/tags/main.go -GetTag -ListTags -ListTagsOp=ListTagsOfResource -ServiceTagsSlice -UpdateTags -Wait -WaitContinuousOccurence 2 -WaitMinTimeout 1s -WaitTimeout 2m -ParentNotFoundErrCode=ResourceNotFoundException
//go:generate go run ../../generate/servicepackage/main.go
//go:generate go run ../../generate/listpages/main.go -ListOps=ListBackups -InputPaginator=ExclusiveStartBackupArn -OutputPaginator=LastEvaluatedBackupArn -- list_backups_pages_gen.go
//go:generate go run ../../generate/tagstests/main.go
Expand Down
2 changes: 1 addition & 1 deletion internal/service/dynamodb/tags_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 33de098

Please sign in to comment.