Skip to content
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

VectorTileWorkerSource: fix reload for original's load parse would not pass the rawTileData and meta #2941

Merged

Conversation

ambientlight
Copy link
Sponsor Contributor

@ambientlight ambientlight commented Aug 5, 2023

Launch Checklist

Fixes #2923.

An unfortunate regression has been introduced in #1874, where when reloadTile would get called before the original load completes, the rawTileData won't get passed to the main thread, leading to #2923. The base loadTile will extend the parse result with previously fetched data at

callback(null, extend({rawTileData: rawTileData.slice(0)}, result, cacheControl, resourceTiming));

This PR will keep the original fetching state until the first parse completes and will pass it along as expected.

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Write tests for all new functionality.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (616e151) 74.63% compared to head (41a1e56) 74.64%.
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2941      +/-   ##
==========================================
+ Coverage   74.63%   74.64%   +0.01%     
==========================================
  Files         239      239              
  Lines       19042    19053      +11     
  Branches     4295     4298       +3     
==========================================
+ Hits        14212    14223      +11     
  Misses       4830     4830              
Files Changed Coverage Δ
src/source/vector_tile_worker_source.ts 96.59% <100.00%> (+0.48%) ⬆️

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

@HarelM
Copy link
Collaborator

HarelM commented Aug 5, 2023

Can you fix the lint warning?

@HarelM
Copy link
Collaborator

HarelM commented Aug 5, 2023

I see that a "else" part of this fix is not covered by a test, can you add one (see the linked coverage report)?

@HarelM
Copy link
Collaborator

HarelM commented Aug 5, 2023

Thanks a lot for taking care of it in such a short notice!!

@ambientlight
Copy link
Sponsor Contributor Author

@HarelM: done, thanks!

@HarelM HarelM enabled auto-merge (squash) August 5, 2023 20:19
@HarelM HarelM merged commit bd37870 into maplibre:main Aug 5, 2023
14 checks passed
ctharings added a commit to ctharings/maplibre-gl-js that referenced this pull request Aug 8, 2023
* main: (45 commits)
  Bump @typescript-eslint/eslint-plugin from 6.2.0 to 6.2.1 (maplibre#2952)
  Bump rollup from 3.27.0 to 3.27.2 (maplibre#2955)
  Bump devtools-protocol from 0.0.1173815 to 0.0.1179426 (maplibre#2950)
  Bump @types/node from 20.4.5 to 20.4.8 (maplibre#2953)
  Bump @typescript-eslint/parser from 6.2.0 to 6.2.1 (maplibre#2951)
  Bump puppeteer from 20.9.0 to 21.0.1 (maplibre#2949)
  Bump version to 3.2.2 (maplibre#2946)
  Added hidden modifier to "non interesting" classes (maplibre#2945)
  Properly check `ImageBitmap` (maplibre#2942)
  VectorTileWorkerSource: fix reload for original's load parse would not pass the rawTileData and meta (maplibre#2941)
  Bump eslint and @types/eslint (maplibre#2934)
  Bump @types/node from 20.4.4 to 20.4.5 (maplibre#2929)
  Bump tslib from 2.6.0 to 2.6.1 (maplibre#2932)
  Bump eslint-plugin-react from 7.33.0 to 7.33.1 (maplibre#2928)
  Bump jest from 29.6.1 to 29.6.2 (maplibre#2931)
  Bump typedoc-plugin-markdown from 3.15.3 to 3.15.4 (maplibre#2926)
  Bump @types/react from 18.2.15 to 18.2.17 (maplibre#2935)
  Bump eslint-plugin-import from 2.27.5 to 2.28.0 (maplibre#2933)
  Bump jest-environment-jsdom from 29.6.1 to 29.6.2 (maplibre#2930)
  Bump rollup from 3.26.3 to 3.27.0 (maplibre#2927)
  ...
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.

queryRenderFeature emits Out of bounds. Error in 3.2.1 version
3 participants