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

Update.date_approved is always NULL (at least in JSON responses) #4171

Closed
decathorpe opened this issue Dec 1, 2020 · 2 comments · Fixed by #4838
Closed

Update.date_approved is always NULL (at least in JSON responses) #4171

decathorpe opened this issue Dec 1, 2020 · 2 comments · Fixed by #4838

Comments

@decathorpe
Copy link

Either I am doing something very weird, or the content of the Update.date_approved column is always None / NULL in JSON responses. I did some queries of the bodhi production instance, and I found zero updates where this value was not null.

Did those values get lost during a migration, or was that column always NULL? Or are the values not NULL internally and they're only mangled to NULL by JSON serialization? I see some code that uses this value, so I suspect the latter to be the case ...

https://github.com/fedora-infra/bodhi/search?q=date_approved

@mattiaverga
Copy link
Contributor

Indeed, date_approved isn't set nowhere.
We record a lot of dates for every update, I'm not sure what date_approved was intended for:

        date_submitted (DateTime): The date that the update was created.
        date_modified (DateTime): The date the update was last modified or ``None``.
        date_approved (DateTime): The date the update was approved or ``None``.
        date_pushed (DateTime): The date the update was pushed or ``None``.
        date_testing (DateTime): The date the update was placed into the testing repository
            or ``None``.
        date_stable (DateTime): The date the update was placed into the stable repository or
            ``None``.

@decathorpe
Copy link
Author

Okay, so those values really are unused ... thanks for confirming my sanity!

Looks like they're at least checked against though:
https://github.com/fedora-infra/bodhi/blob/57135db/bodhi/server/services/updates.py#L284

So querying something with approved_before or approved_since actually never actually yields any results (because no updates have any values for date_approved) 😆

But thanks for confirming, I will ignore that column now. 👍

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 a pull request may close this issue.

2 participants