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

fixing incorrect status on failed tiles #39

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

jtblack-aws
Copy link
Contributor

Description of changes:
fixing case where status monitor shows success when tiles fail and updating tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jtblack-aws jtblack-aws merged commit 30b8ce9 into dev Nov 3, 2023
@jtblack-aws jtblack-aws deleted the fix/model_exception_handling branch November 3, 2023 14:07
@@ -90,7 +90,7 @@ def process_tiles(
raster_dataset: gdal.Dataset,
metrics: MetricsLogger = None,
sensor_model: Optional[SensorModel] = None,
) -> int:
) -> Tuple[int, int]:
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: Update docstring to match new return type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add this to the unit test follow up PR as well

region_status = RegionRequestStatus.SUCCESS
if total_tile_count == tile_error_count:
region_status = RegionRequestStatus.FAILED
if tile_error_count > 0 and tile_error_count > total_tile_count:
Copy link
Contributor

Choose a reason for hiding this comment

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

The second half of this if statement looks broken. When would the tile_error_count ever be greater than the total_tile_count? Wouldn't this function default to SUCCESS for a failure count > 0 but less than the total_tile_count?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, the last line of that should be if tile_error_count > 0 and tile_error_count < total_tile_count. I'll fix that in the unit test PR. I was planning to add a test specifically for his function anyway.

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.

3 participants