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

fix(events): correct token resolution in RuleTargetInput #3127

Merged
merged 2 commits into from
Jun 30, 2019

Conversation

jogold
Copy link
Contributor

@jogold jogold commented Jun 28, 2019

Fixes #3119


Please read the contribution guidelines and follow the pull-request checklist.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@jogold jogold requested a review from a team as a code owner June 28, 2019 14:43
@ghost ghost requested a review from eladb June 28, 2019 14:43
@eladb eladb merged commit a20c841 into aws:master Jun 30, 2019
@jogold jogold deleted the fix-target-input-token branch June 30, 2019 16:31
@@ -148,7 +148,7 @@ class FieldAwareEventInput extends RuleTargetInput {
}

public resolveToken(t: Token, _context: IResolveContext) {
if (!isEventField(t)) { return t; }
if (!isEventField(t)) { return Token.asString(t); }
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, it used to inherit a working toString(). Implementing that on the Token would also have worked. I think I would feel safer if we did that... but that can wait until we uncover a new failing case maybe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would it have worked with token encoded as numbers?

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.

Incorrect token resolution with RuleTargetInput/FieldAwareEventInput
3 participants