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

Return blank tiles from get_tile_data() #10829 #10834

Merged
merged 1 commit into from
Apr 27, 2024

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented Apr 25, 2024

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

Return blank tiles (holding only None values) from get_tile_data() rather than returning an implicit None. For example, return {node_id: None} rather than None.

Datatypes often drill into the result of get_type_data() expecting a dict, and do not check for None. (Perhaps they should, since there is still a code path that could return None after logging an exception. Or, we could elevate that logged exception to a runtime exception, but that's outside the scope here.)

Tiles might hold only None if a tile is added for a resource and then edited to remove all values. Or they might have been created in a data migration (#9704, 7.5.0).

Refs 4b02d35

History

4b02d35 changed the if/else logic so that tiles with only falsy values log an exception and return None implicitly (7.5.0)
e4a519e tightened that up to "only None values" to exempt falsy values like [] in the file-list datatype. (7.5.0)
be7a130 removed the logged exception for blank tiles but kept the implicit None return (7.5.2)

Targeting dev/7.5.x as this is a regression in 7.5.0.

Issues Solved

Closes #10829

Checklist

  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Ticket Background

@jacobtylerwalls jacobtylerwalls requested a review from aj-he April 25, 2024 13:41
@jacobtylerwalls jacobtylerwalls changed the title Return tiles holding only None from get_tile_data() #10829 Return blank tiles from get_tile_data() #10829 Apr 25, 2024
@aj-he
Copy link
Contributor

aj-he commented Apr 26, 2024

Seems to have fixed the initial error. I am running some load package tests.

Copy link
Contributor

@aj-he aj-he left a comment

Choose a reason for hiding this comment

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

this fixes the issue

@aj-he aj-he merged commit c146492 into dev/7.5.x Apr 27, 2024
2 checks passed
@jacobtylerwalls jacobtylerwalls deleted the jtw/fix-tiles-holding-only-none branch April 27, 2024 12:44
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.

Tiledata value where all jsonb values are null causes datatype.get_display_value to fail (7.5.x)
2 participants