-
Notifications
You must be signed in to change notification settings - Fork 116
feat: updates rss feed #5402
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
feat: updates rss feed #5402
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds RSS feed functionality to the Snapcraft webapp, allowing users to get recently updated snaps through an RSS feed endpoint.
- Implements a new RSS feed generator using feedgen library for recently updated snaps
- Adds a
/feeds/updates
endpoint that accepts size and page parameters - Includes comprehensive test coverage for both successful API responses and error handling
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
webapp/feeds/feeds.py | New module implementing RSS feed generation with API integration and error handling |
webapp/app.py | Registers the feeds blueprint to enable the RSS endpoints |
tests/tests_feeds.py | Comprehensive test suite covering successful feed generation and API error scenarios |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
webapp/feeds/feeds.py
Outdated
|
||
except Exception as e: | ||
flask.current_app.logger.error(f"Failed to add snap to RSS feed: {e}") | ||
raise |
Copilot
AI
Oct 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The raise
statement will halt processing of all remaining snaps when one fails. Consider using continue
instead to skip problematic snaps and still generate a feed with the valid ones.
raise | |
continue |
Copilot uses AI. Check for mistakes.
tests/tests_feeds.py
Outdated
content = response.get_data(as_text=True) | ||
self.assertIn('<?xml version="1.0" encoding="UTF-8"?>', content) | ||
self.assertIn('<rss version="2.0">', content) | ||
self.assertIn('<title>Snapcraft – recently updated applications</title>', content) |
Copilot
AI
Oct 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test assertion expects title 'Snapcraft – recently updated applications' but the actual feed title is 'Snapcraft - recently updated Snaps' (line 62 in feeds.py). The test will fail due to this mismatch.
Copilot uses AI. Check for mistakes.
tests/tests_feeds.py
Outdated
content = response.get_data(as_text=True) | ||
self.assertIn('<?xml version="1.0" encoding="UTF-8"?>', content) | ||
self.assertIn('<rss version="2.0">', content) | ||
self.assertIn('<title>Snapcraft – recently updated applications</title>', content) |
Copilot
AI
Oct 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test assertion expects title 'Snapcraft – recently updated applications' but the actual feed title is 'Snapcraft - recently updated Snaps' (line 62 in feeds.py). The test will fail due to this mismatch.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a couple of small things caught my eye though
Done
/feed/updates
How to QA
https://snapcraft-io-5402.demos.haus/feeds/updates
Testing