Skip to content

Conversation

@testower
Copy link
Contributor

@testower testower commented Oct 10, 2025

Summary

This PR adds support for keeping ETag header values from GBFS datasource responses, and passing them to subsequent requests, in order for the server to respond with 304 Not Modified when the content hasn't changed.

If the responses don't have an ETag header, there is no change in behavior.

Issue

Closes #6927

Unit tests

All existing tests pass. No additional tests added as changes are mostly based around the http client. The ETag/if-not-modified behavior has been manually tested against Entur's gbfs aggregator.

@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 44.11765% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.23%. Comparing base (4182f3e) to head (544e487).

Files with missing lines Patch % Lines
...le_rental/datasources/gbfs/GbfsFeedLoaderImpl.java 44.11% 12 Missing and 7 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6963      +/-   ##
=============================================
- Coverage      72.24%   72.23%   -0.01%     
- Complexity     19968    19972       +4     
=============================================
  Files           2163     2163              
  Lines          80365    80394      +29     
  Branches        8114     8120       +6     
=============================================
+ Hits           58061    58076      +15     
- Misses         19443    19452       +9     
- Partials        2861     2866       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@testower testower force-pushed the improve/support-caching-mechanisms-in-gbfs-sources branch 4 times, most recently from 6bea580 to bc8363a Compare October 14, 2025 19:54
@t2gran t2gran changed the title gbfs updater with etag / if-not-modified support Support for etag and if-not-modified in GBFS updater Oct 16, 2025
@t2gran t2gran added this to the 2.9 (next release) milestone Oct 16, 2025
@testower testower force-pushed the improve/support-caching-mechanisms-in-gbfs-sources branch 2 times, most recently from a8592cf to b04c334 Compare October 16, 2025 18:08
@testower testower force-pushed the improve/support-caching-mechanisms-in-gbfs-sources branch from b04c334 to 5d61f8b Compare October 25, 2025 20:05
@testower testower force-pushed the improve/support-caching-mechanisms-in-gbfs-sources branch from 5d61f8b to 544e487 Compare October 27, 2025 20:39
@testower testower marked this pull request as ready for review October 27, 2025 20:48
@testower testower requested a review from a team as a code owner October 27, 2025 20:48
@testower testower added the Entur Test This is currently being tested at Entur label Oct 27, 2025
@testower testower marked this pull request as draft October 28, 2025 07:19
@testower testower marked this pull request as ready for review October 28, 2025 07:58
@habrahamsson-skanetrafiken habrahamsson-skanetrafiken marked this pull request as draft October 28, 2025 09:50
@testower testower marked this pull request as ready for review October 28, 2025 10:17
@t2gran t2gran requested a review from vpaturet October 28, 2025 11:32
@leonardehrenfried leonardehrenfried changed the title Support for etag and if-not-modified in GBFS updater Support for ETag and If-Not-Modified in GBFS updater Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Entur Test This is currently being tested at Entur

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support ETag and If-None-Match headers in GBFS source for vehicle rental updater

3 participants