Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Refactor aws dynamodb scaler #5961

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dttung2905
Copy link
Contributor

Provide a description of what has been changed

Checklist

Relates to #5797

Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
@dttung2905 dttung2905 requested a review from a team as a code owner July 14, 2024 19:46
Comment on lines +35 to +36
ExpressionAttributeNames map[string]string `keda:"name=expressionAttributeNames, order=triggerMetadata"`
ExpressionAttributeValues map[string]types.AttributeValue `keda:"name=expressionAttributeValues, order=triggerMetadata"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wozniakjan Do you have any advice on how to deal with this data type?
Currently, with this setup, keda is having these similar error when i run the unit test locally

=== RUN   TestParseDynamoMetadata/no_targetValue_given
    aws_dynamodb_scaler_test.go:333: 
        	Error Trace:	/home/tung/go/src/keda/pkg/scalers/aws_dynamodb_scaler_test.go:333
        	Error:      	Error "error parsing DynamoDb metadata: unable to set param \"expressionAttributeNames\" value \"{ \\\"#yr\\\" : \\\"year\\\" }\": expected format key=value, got \"{ \\\"#yr\\\" : \\\"year\\\" }\"\nunable to set param \"expressionAttributeValues\" value \"{\\\":yyyy\\\": {\\\"N\\\": \\\"1994\\\"}}\": expected format key=value, got \"{\\\":yyyy\\\": {\\\"N\\\": \\\"1994\\\"}}\"" does not contain "no targetValue given"
        	Test:       	TestParseDynamoMetadata/no_targetValue_given

I think it is expecting input value something like {yyyy=1994} instead 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant