- added:
- all kubernetes API Objects targeting fixtures have now a function scoped counterpart named `*_function_scope`
- package `flux` was added to deal with Flux CRs
- changed:
- all fixture factories that create objects and delete them after they are out of scope, now
actively wait for the object to be gone. Previously, only `delete()` request was sent without
checking if the object is gone, which was causing a bunch of race conditions between test runs.
- All recursively-required missing resources are now automatically created. This usually means
that if the `Namespace` you want to put your resource in doesn't exist, it will be created
automatically for you. The same applies to `App` and the required `Catalog`.
- switch from `Callable` to `Protocol` for factory types (much better type hinting)
- all functions making API objects take now optional `extra_metadata` and `extra_spec` arguments,
which are merged with object definitions without any restrictions nor validation
- `wait_for_apps_to_run` accepts now a new parameter `fail_fast: bool = False`; when it's `True` and the App's
status ever reaches `failed`, the wait fails as well, without waiting for subsequent state changes.
- cleanups:
- all methods creating objects, but not submitting them to k8s API, match now `make-*-object` pattern
- `HTTPClient` connection object is always the first method parameter
- removed the `namespaceConfig*` arguments of `make_app_object`, as they can be now included
using the `extra-*` args
- multiple classes were moved across modules and packages to match the following rules:
- every Resource / CustomResource is a single module
- groups of API Resources (like giant swarm app platform or flux - in the future) go to packages
- `wait_for_namespaced_objects_condition` function is renamed to `wait_for_objects_condition` as it now supports
both cluster-scope and namespace-scope resources. Additionally, it allows now to pass a function for checking for
fail fast conditions in objects awaited.
- fixed:
- namespaces requested from `namespace_factory*` fixtures are now deleted only if they were created by the fixture
(and not already existing in the cluster)