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

0.9.1 date comparisons not working #124

Closed
goodwinb99 opened this issue Mar 3, 2017 · 2 comments
Closed

0.9.1 date comparisons not working #124

goodwinb99 opened this issue Mar 3, 2017 · 2 comments

Comments

@goodwinb99
Copy link

From https://gitter.im/jmespath/chat:

aws ec2 describe-snapshots --owner-id self --query 'Snapshots[?StartTime>='2017--02-01']'
The above command returns and empty set ( '[]' ) when run with v0.9.1, and a list of appropriate snapshots with run with v0.9.0.

I have the same problem fetching AMIs by date. It appears Date comparisons (except ==) are broken in 0.9.1 (and work fine in 0.9.0)

@jamesls
Copy link
Member

jamesls commented Mar 10, 2017

I'll add this behavior back.

What's going on here is that the spec only defines comparisons as valid on numbers (http://jmespath.org/specification.html#ordering-operators). In 0.9.1, validation was added to enforce this requirement, so things that implicitly worked before now no longer work.

Given this is affecting multiple people I'll add back the support for strings now. I'll also work on getting the spec updated.

jamesls added a commit to jamesls/jmespath that referenced this issue Mar 10, 2017
The validation added in 0.9.1 to make this compliant with the
spec actually broke a number of people.  I've added this back
and will work on getting the spec updated.

Fixes jmespath#124.
@ozhyrenkov
Copy link

Hey guys!
I know this is closed, but maybe another issue is connected?
This one: jmespath/jmespath.rb#47

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

No branches or pull requests

3 participants