Skip to content

Commit 9ce4564

Browse files
authored
Fix: skip quote in the case that "filter" is empty (#1009)
- If adding qoutes to filter with a empty string, "\"\"" will be returned, which is invalid as cloudwatch filter pattern
1 parent ce1ffe3 commit 9ce4564

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pkg/cli/client/byoc/aws/byoc.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,10 @@ func (b *ByocAws) makeLogGroupARN(name string) string {
723723
func (b *ByocAws) getLogGroupInputs(etag types.ETag, projectName, service, filter string, logType logs.LogType) []ecs.LogGroupInput {
724724
// Escape the filter pattern to avoid problems with the CloudWatch Logs pattern syntax
725725
// See https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html
726-
pattern := strconv.Quote(filter) // TODO: add etag to filter
726+
var pattern string // TODO: add etag to filter
727+
if filter != "" {
728+
pattern = strconv.Quote(filter)
729+
}
727730

728731
var groups []ecs.LogGroupInput
729732
// Tail CD and kaniko

0 commit comments

Comments
 (0)