-
-
Notifications
You must be signed in to change notification settings - Fork 707
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
Allow raster source tile updates to re-trigger tile request that failed previously #4890
Allow raster source tile updates to re-trigger tile request that failed previously #4890
Conversation
Can you better describe the scenario that you would change the raster source definition and expect it to be reloaded? Wouldn't removing the source and adding a different one is a better approach? |
…reserved-in-source-cache
Sure. Updating a date (or any attribute) filter for an existing source. For instance going from this: https://<some-base-url>/tiles/WebMercatorQuad/4/5/5?datetime=2024-10-03T16:30:00Z/2024-10-03T17:30:00Z To this: https://<some-base-url>/tiles/WebMercatorQuad/4/5/5?datetime=2024-10-04T16:30:00Z/2024-10-04T17:30:00Z
That's a valid question but possibly beyond the scope of this PR. This PR is just attempting to fix behavior that effectively derails a raster tile source from showing any further tiles once it gets a |
Yeah, it might have been that the original design expected the source to be immutable or sometime similar, which we broke with the addition of setTiles. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4890 +/- ##
=======================================
Coverage 90.21% 90.22%
=======================================
Files 265 265
Lines 37974 37977 +3
Branches 2569 2567 -2
=======================================
+ Hits 34257 34263 +6
+ Misses 2848 2846 -2
+ Partials 869 868 -1 ☔ View full report in Codecov by Sentry. |
Please add a changelog entry and I'll merge this. |
Can you resolve conflict? Probably related to changelog file... |
Events where tile sources are updated should be handled differently from other types of source updates. Currently if a tile errors, it won't be re-requested presumably on account of not wanting to waste traffic on a previously failed fetch. The fetch may no longer be pointless however if the "source's source" has been updated. In this situation, old tile requests that failed are no longer relevant. It's in effect like a new source in the old source's place.
This PR fixes a bug where fetches that previously failed prevent further fetches with with new tile URLs.
This could likely be applied to vector tiles as well if the approach makes sense!
A map loaded with failed tile requests. Previously a change to the date wouldn't trigger new fetches. With this change in place, new tiles are requested as expected:
Screencast.from.2024-10-24.16-25-07.webm
Launch Checklist
CHANGELOG.md
under the## main
section.