Repository navigation
Conversation
Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #858
LambdaFunction.LastModifiedwas stored as the raw string fromListFunctions, which Lambda returns as2019-08-14T22:32:35.183+0000. That is not RFC 3339 (no colon in the offset) and is none of the layouts libnuke'sparseDateaccepts, so anydateOlderThan/dateOlderThanNowfilter onLastModified(the use case from #818) fails withunable to parse time ....The lister now parses the value with Lambda's layout into a
*time.Time(UTC).NewPropertiesFromStructalready renderstime.Timeas RFC 3339, so the property becomes2019-08-14T22:32:35Zand the date filters work. If the value cannot be parsed, the property is left empty instead of carrying an unusable string.Testing
New
resources/lambda-function_mock_test.goruns the realLambdaFunctionListeragainst anhttptestserver that returns aListFunctions/ListTagsresponse with the exact Lambda timestamp format, then checks the property value and runs adateOlderThanNowfilter on it.go test ./resources/andgolangci-lint run ./resources/report nothing new for the changed files.This change was prepared with help from an AI coding assistant; I reviewed and tested it.