Skip to content

Commit 10ee6d3

Browse files
PettitWesleyedsiper
authored andcommitted
aws: fix broken s3 key test
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
1 parent 5445e19 commit 10ee6d3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/aws/flb_aws_util.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,8 @@ flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag, char
798798
/* A match against "$TAG[" indicates an invalid or out of bounds tag part. */
799799
if (strstr(s3_key, tmp)){
800800
flb_warn("[s3_key] Invalid / Out of bounds tag part: At most 10 tag parts "
801-
"($TAG[0] - $TAG[9]) can be processed. tag=%s, format=%s", tag, format);
801+
"($TAG[0] - $TAG[9]) can be processed. tag=%s, format=%s, delimiters=%s",
802+
tag, format, tag_delimiter);
802803
}
803804

804805
/* Find all occurences of $TAG and replace with the entire tag. */

tests/internal/aws_util.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define S3_KEY_FORMAT_SPECIAL_CHARCATERS_TAG "logs/my.great_photos-2020:jan/$TAG/%Y/%m/%d"
1616
#define S3_OBJECT_KEY_SPECIAL_CHARCATERS_TAG "logs/my.great_photos-2020:jan/aa.bb.ccc/2020/08/15"
1717

18-
#define S3_OBJECT_KEY_INVALID_DELIMITER "logs/aa.bb-ccc/aa.bb-ccc[0]/2020/08/15"
18+
#define S3_OBJECT_KEY_INVALID_DELIMITER "logs/aa.bb-ccc[2]/aa.bb-ccc/2020/08/15"
1919

2020
#define S3_KEY_FORMAT_INVALID_TAG "logs/$TAG[2]/$TAG[-1]/%Y/%m/%d"
2121
#define S3_OBJECY_KEY_INVALID_TAG "logs/ccc/aa.bb.ccc[-1]/2020/08/15"

0 commit comments

Comments
 (0)