cacheRoutesGmap: read raw plist to avoid nska_deserialize 'unhashable' warnings#1626
Merged
Merged
Conversation
The artifact walks the raw $objects array itself, but read files via get_plist_file_content, which runs nska_deserialize on NSKeyedArchiver plists. These CachedRoutes archives contain unhashable NSDictionary keys, so the deserializer floods the log with 'unhashable' warnings -- and it strips the $objects array this artifact actually needs. Read the raw plist with plistlib.load instead: no deserializer, no warnings, $objects available as intended. Also re-enables KML output (output_types 'all'), which was reverted out of the KML batch (#1624) specifically because of these warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running Google Maps Cache Routes floods the log with
unhashableNSKeyedArchiver warnings — one per CachedRoutes file.Root cause
The artifact walks the raw
$objectsarray itself (entry['_coordinateLat']), but it read each file viaget_plist_file_content, which — for NSKeyedArchiver plists — routes throughnska_deserialize(ilapfuncs.py:641):These CachedRoutes archives contain unhashable NSDictionary keys, so the deserializer emits the
unhashablewarnings. Worse, that call is counterproductive: deserialization strips the$objectsarray, which is exactly what this artifact reads — so the deserialize step is pure cost.Fix
Read the raw plist directly with
plistlib.loadand skip the deserializer entirely. Nonska_deserializecall ⇒ no warnings, and$objectsis present as the code already expects (so it's also more correct, not just quieter).Also
Re-enables KML output (
output_types: "all"). cacheRoutesGmap was pulled out of the KML batch (#1624) solely because of these warnings; with the warnings fixed, it rejoins. It has exactLatitude/Longitudecolumns, sokmlgennow produces a KML.Verify
pylint 10.00/10, py_compile OK, audit confirms it's KML-producing. Note:
get_plist_file_content/nskanow appear only in an explanatory code comment, not in any code path.