Skip to content

feat: 1325 add global and per feed configurationintegrate feeds download#1363

Merged
davidgamez merged 17 commits into
mainfrom
1325-add-global-and-per-feed-configurationintegrate-feeds-download
Sep 25, 2025
Merged

feat: 1325 add global and per feed configurationintegrate feeds download#1363
davidgamez merged 17 commits into
mainfrom
1325-add-global-and-per-feed-configurationintegrate-feeds-download

Conversation

@qcdyx

@qcdyx qcdyx commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

Summary:

Closes #1325

This PR fixes the STM bug #1341, adding a header per feed allow us to download the STM zip file and unzip it accordingly.
Next steps: fill up ConfigValueFeed table manually.

Expected behavior:
https://www.stm.info/sites/default/files/gtfs/gtfs_stm.zip returns an html page and blocks scripts.
adding a header in the ConfigValueFeed table solves the problem.
image

Testing tips:

Provide tips, procedures and sample files on how to test the feature.
Testers are invited to follow the tips AND to try anything they deem relevant outside the bounds of the testing tips.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@qcdyx qcdyx linked an issue Sep 18, 2025 that may be closed by this pull request
@qcdyx
qcdyx marked this pull request as ready for review September 23, 2025 15:00
@qcdyx
qcdyx requested a review from davidgamez September 24, 2025 16:11

@davidgamez davidgamez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great work. Before merging we must address #1061 otherwise SQL script will fail.

Comment on lines +151 to +161
headers = get_config_value(
namespace="feed_download", key="http_headers", feed_id=feed_id
)
if headers is None:
headers = {
"User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/126.0.0.0 Mobile Safari/537.36",
"Referer": url,
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

❤️

@@ -0,0 +1,25 @@
ALTER TABLE feed ADD CONSTRAINT feed_stable_id_unique UNIQUE (stable_id);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Before merging this PR, we must fix => #1061

@davidgamez davidgamez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a minor feature that will open the door to a lot of fixed per-feed levels. Great work!

@davidgamez
davidgamez merged commit 10eb0d0 into main Sep 25, 2025
2 of 3 checks passed
@davidgamez
davidgamez deleted the 1325-add-global-and-per-feed-configurationintegrate-feeds-download branch September 25, 2025 20:27
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.

Add global and per feed configuration(integrate feeds download)

2 participants