sadpandajoe commented on code in PR #43523:
URL: https://github.com/apache/superset/pull/43523#discussion_r4390280590
##########
superset/dashboards/api.py:
##########
@@ -2478,11 +2478,27 @@ def get_generation(
),
)
+ def force_needs_new_generation(cache_payload: ScreenshotCachePayload)
-> bool:
+ """A forced download cannot join a generation carrying an older
capture."""
+ if not force or cache_payload.is_updated():
Review Comment:
The `not force` gate in `force_needs_new_generation` is only exercised by
forced follow-ups: `test_force_does_not_join_refresh_carrying_previous_image`
makes its second and third POSTs with `force=True`, and the force-less carry
tests never make a second request. If that gate were dropped, a force-less POST
that lands on an in-progress (or fresh-error) retained-image generation would
rotate generations and enqueue again, and the suite would stay green. Could we
add a force-less follow-up POST on the same permalink asserting the same
`cache_key`, the retained bytes still readable, and an unchanged `task.delay`
count for both the in-progress and fresh-`ERROR` cases?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]