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

Move Kubernetes 410 exception handling outside generator #15755

Closed
wants to merge 4 commits into from

Conversation

kevingrismore
Copy link
Contributor

The previous implementation tried to catch 410 exceptions inside the _job_events generator, but continued reports of 410s indicate that it's likely that strategy would only detect a 410 if raised on the initial call to stream. This moves handling and retrying the watch to the caller.

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

@kevingrismore
Copy link
Contributor Author

kevingrismore commented Oct 21, 2024

Hoping to get a check on whether this change is sensible and actually makes a difference. The original test still passes since the watch is being restarted, but I'm wondering if there's a better way to test this that proves moving the handling up a layer matters, and when the exception is raised by the stream has a real impact.

@kevingrismore kevingrismore marked this pull request as ready for review October 21, 2024 18:02
Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

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

thanks @kevingrismore

is there some sort of integration test we can use to sanity check things here? perhaps a new CI job that could run when paths in src/prefect_kubernetes/** change?

we might be able to use this as inspiration. not saying it needs to happen here, just saying in general it might be nice to have for these cases where mocks come up a bit short

Copy link
Contributor

github-actions bot commented Nov 7, 2024

This pull request is stale because it has been open 14 days with no activity. To keep this pull request open remove stale label or comment.

@kevingrismore
Copy link
Contributor Author

The updated test passes on both the original and changed location of the try-except, so I think it's possible this always worked as intended starting with the async version of the worker. This would just be a more accurate test and some code simplification, then.

@zzstoatzz zzstoatzz added integrations Related to integrations with other services development Tech debt, refactors, CI, tests, and other related work. labels Nov 11, 2024
Copy link
Contributor

github-actions bot commented Dec 6, 2024

This pull request is stale because it has been open 14 days with no activity. To keep this pull request open remove stale label or comment.

Copy link
Contributor

This pull request was closed because it has been stale for 14 days with no activity. If this pull request is important or you have more to add feel free to re-open it.

@github-actions github-actions bot closed this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Tech debt, refactors, CI, tests, and other related work. integrations Related to integrations with other services status:stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants