Skip to content

Conversation

M7mdisk
Copy link
Contributor

@M7mdisk M7mdisk commented Oct 8, 2025

Done

  • Add recently updated RSS feed under /feed/updates

How to QA

  • Go to https://rssatom.com/
  • paste the feed url https://snapcraft-io-5402.demos.haus/feeds/updates
  • see RSS feed
  • If you have another reader installed, try it on there too

Testing

  • This PR has tests
  • No testing required (explain why):

@Copilot Copilot AI review requested due to automatic review settings October 8, 2025 07:10
@webteam-app
Copy link

Copy link
Contributor

@Copilot Copilot AI left a 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.


except Exception as e:
flask.current_app.logger.error(f"Failed to add snap to RSS feed: {e}")
raise
Copy link

Copilot AI Oct 8, 2025

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.

Suggested change
raise
continue

Copilot uses AI. Check for mistakes.

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)
Copy link

Copilot AI Oct 8, 2025

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.

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)
Copy link

Copilot AI Oct 8, 2025

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.

Copy link
Contributor

@steverydz steverydz left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@edisile edisile left a 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

@M7mdisk M7mdisk requested review from bartaz and edisile October 9, 2025 11:30
@M7mdisk M7mdisk merged commit 78a8408 into main Oct 13, 2025
13 checks passed
@M7mdisk M7mdisk deleted the RSS-feeds branch October 13, 2025 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants