firecracker-microvm / firecracker-microvm/firecracker

Use Python generated client in the testing framework

Open
#2,304 6 comments 0 reactions 0 assignees View on GitHub
python Roadmap: New Request Status: Parked Type: Enhancement
Dominant language
Rust
Stars
36.7k
Forks
2.6k
Avg merge
3d 2h
Merged PRs (30d)
53

Description

We need to generate the Python API client to use inside the testing framework instead of writing our own API request classes.

This effort would help in making sure that any YAML change is reflected in the way that API requests are done and reducing framework code.

Things to keep in mind:
- The python client would have to be generated each time the YAML file is changed. This would add a few problems since the codegen step could take a while to finish, so some investigation would initially have to be done to make sure that we don't spend a lot of time here. Some ideas to speed up things would be to check the YAML version or store a hash of the last checked YAML file.
- The [`resources.py`](https://github.com/firecracker-microvm/firecracker/blob/master/tests/framework/resources.py) file would be replaced.
- API requests should be timed - see decorators [here](https://github.com/firecracker-microvm/firecracker/blob/master/tests/framework/http.py#L47).
- The [MicroVM](https://github.com/firecracker-microvm/firecracker/blob/master/tests/framework/microvm.py#L40) class will suffer a lot of changes, so it would be a good opportunity to clean up some of the things there.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.