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

Add a "Releases" dropdown to the toplevel navbar. #388

Merged
merged 4 commits into from Aug 27, 2015

Conversation

ralphbean
Copy link
Contributor

Provide the data in the template for this by hanging another lazily
evaluated
'reified' property to the request that returns the same data that the
bodhi.services.releases cornice service does.

Provide the data in the template for this by hanging another lazily evaluated
'reified' property to the request that returns the same data that the
``bodhi.services.releases`` cornice service does.

* Fixes #350.
@@ -78,6 +75,10 @@ def get_buildinfo(request):
return defaultdict(dict)


def get_releases(request):
import bodhi.services.releases
return bodhi.services.releases.query_releases_html(request)['releases']
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this mean every time any page is rendered, it has to go through the releases cornice Service, the ListReleaseSchema, 3 different validators, and then a db query? Seems a bit heavyweight. Can't we do a simple @classmethod+ class-level-cache hack like we do with Release.get_tags? https://github.com/fedora-infra/bodhi/blob/develop/bodhi/models/models.py#L316-L330

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, let's do that.

@lmacken
Copy link
Contributor

lmacken commented Aug 27, 2015

Pushed a commit to optimize this with a new Release.all_releases class method.

ralphbean added a commit that referenced this pull request Aug 27, 2015
Add a "Releases" dropdown to the toplevel navbar.
@ralphbean ralphbean merged commit badacb2 into develop Aug 27, 2015
@ralphbean ralphbean deleted the feature/list-releases branch August 27, 2015 16:22
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.

None yet

2 participants