Skip to content

Bugs/container submit 409#94

Open
msherman64 wants to merge 6 commits intomasterfrom
bugs/container_submit_409
Open

Bugs/container submit 409#94
msherman64 wants to merge 6 commits intomasterfrom
bugs/container_submit_409

Conversation

@msherman64
Copy link
Contributor

This adds unit-tests to cover some of the edge cases of container.submit()
there's a lot of branching logic, and the return types vary per branch, but this covers the most important current behavior and known issues.

@msherman64 msherman64 force-pushed the bugs/container_submit_409 branch from 93c1db3 to e3d419f Compare February 12, 2026 17:22
The root cause of submit() returning null container id was because
_wait_for_status can raise inside create_container, between the zun
creation and returning the zun object.

By adding the zun container to a custom exception inside create_container,
submit() can still populate self.id and self._status from the zun object.

This also makes it possible to set details from the zun container
status_reason and status_detail fields.

Needs Review: submit() now raises a ContainerCreateWaitError, not
ResourceError, which may break existing code which depends on handling
that error. We might want to instead reraise a ResourceError from the new
custom error.
Small change, container.submit() now raises a ResourceError, with
the human readable cause from the zun container.

For debugging, the traceback includes the original WaitError with
more info. This should preserve compatability with anything that
currently calls "submit" inside a try except block.
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.

2 participants