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

Ensure order is qualified by table name for rss feeds #15112

Merged
merged 1 commit into from May 17, 2017

Conversation

@imtayadeway
Copy link
Contributor

imtayadeway commented May 16, 2017

BEFORE:

SELECT "vms"."id" [...] ORDER BY created_on DESC

This is problematic because if we later join another table to this
scope and execute the query, if that table has a created_on field
Postgres will complain and throw an error for the ambiguous statement.

AFTER:

SELECT "vms"."id" [...] ORDER BY "vms"."created_on" DESC

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1451180

Note: I tried to bisect but had great difficulty (because you need to check out all the git gems to be concurrent with the revision you're checking out in core), but since this seemed to be a good idea anyway (and works), I was satisfied.

@miq-bot add-label bug, core
@miq-bot assign @gtanzillo

BEFORE:

```
SELECT "vms"."id" [...] ORDER BY created_on DESC
```

This is problematic because if we later join another table to this
scope and execute the query, if that table has a `created_on` field
Postgres will complain and throw an error for the ambiguous statement.

AFTER:

```
SELECT "vms"."id" [...] ORDER BY "vms"."created_on" DESC
```

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1451180
@miq-bot

This comment has been minimized.

Copy link
Member

miq-bot commented May 16, 2017

Checked commit imtayadeway@74ec0da with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks fine. 🍪

@imtayadeway

This comment has been minimized.

Copy link
Contributor Author

imtayadeway commented May 17, 2017

@miq-bot add-label blocker

@miq-bot miq-bot added the blocker label May 17, 2017
Copy link
Member

gtanzillo left a comment

LGTM 👍

@gtanzillo gtanzillo merged commit 0974ffc into ManageIQ:master May 17, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.004%) to 41.705%
Details
@simaishi simaishi added the fine/yes label May 17, 2017
simaishi added a commit that referenced this pull request May 17, 2017
Ensure order is qualified by table name for rss feeds
(cherry picked from commit 0974ffc)

https://bugzilla.redhat.com/show_bug.cgi?id=1451925
@simaishi

This comment has been minimized.

Copy link
Contributor

simaishi commented May 17, 2017

Fine backport details:

$ git log -1
commit a4bf78fc24c566cc3f2834cbc0d5ac5c84cacdac
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date:   Wed May 17 14:50:23 2017 -0400

    Merge pull request #15112 from imtayadeway/fix/rss-feeds
    
    Ensure order is qualified by table name for rss feeds
    (cherry picked from commit 0974ffc67358219e47e27f08976c85eccf6a3986)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1451925
@simaishi simaishi added fine/backported and removed fine/yes labels May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.