correct versions order and show only indexed versions#1284
Conversation
|
☔ The latest upstream changes (presumably #1282) made this pull request unmergeable. Please resolve the merge conflicts. |
3861aa3 to
3ca7268
Compare
|
Although test have passed and they are correct, we still need to figure out why they were failing previously. It is exactly what was making #1281 fail (travis build link). This is all I know so far and I don't know where to go with this. |
|
☔ The latest upstream changes (presumably #1286) made this pull request unmergeable. Please resolve the merge conflicts. |
|
The code looks good. I'm not sure about the Travis failures, and we should figure that out, but I think we should proceed with this anyway. |
|
Here, we are ordering just by @fotanus git blame says its you 🔮 |
|
@indirect @segiddins might know |
|
I'm in a run right now, but the orderings should be consistent across both bundler-api and rubygems.org. If is not the case, it is wrong. |
|
Regarding data leaking between tests. We should be using transactional fixtures , which should not let data leaky. Can you check if we have a test that disable it, and dont clean the data afterwards? |
@sonalkr132 I think it is a good idea to maintain that order. |
|
Now with a bit more of time, I think that we should keep the most restrictive order possible, trying to avoid a database update to break the order and cause trouble. So I suggest copy the order from bundler-api. I have something pending already for bundler, so if you guys are in rush feel free to fix this! |
I am getting more and more inclined towards using raw sql in report: https://jsfiddle.net/pudg03g7/ |
|
I think @dwradcliffe can help with the code style. I'm good either way. |
|
@sonalkr132 I am totally for it to use raw SQL here.. As long as we sanitize the parameters for security reasons, thats what we should do IMO. |
9eaada5 to
6241ec8
Compare
|
I have updated it to the exact code of bundler-api, except I have dropped ordering of nested SELECT query. We were ordering again at end so nested ordering didn't make any difference other than slowing the query. This has one more difference, angle brackets
|
|
☔ The latest upstream changes (presumably #1293) made this pull request unmergeable. Please resolve the merge conflicts. |
9689eae to
0d99580
Compare
|
☔ The latest upstream changes (presumably #1294) made this pull request unmergeable. Please resolve the merge conflicts. |
raw sql insures ordering consistent with bundler-api, ie versions are ordered by created_at, number(version) and platform, and deps are ordered by name. Add tests for filtering of indexed versions and listing of dependency.
| 'ruby_version' => '>= 2.0.0', | ||
| 'checksum' => 'tdQEXD9Gb6kf4sxqvnkjKhpXzfEE96JucW4KHieJ33g=', | ||
| 'created_at' => '2016-05-24T00:00:00.000Z', | ||
| 'created_at' => '2016-05-24 00:00:00', |
There was a problem hiding this comment.
This is closer but still not exactly what the current format is.
Currently I'm seeing: 2016-05-24 00:00:00 +0000

Looks like I have found more tests which fail only on travis 😓
preserve order test on bunder-api.
Indexed test on bundler-api.