Firecracker Python Improvement/Stabilty#1
Merged
0xR35tu merged 8 commits intohysnsec:mainfrom Jan 28, 2026
Merged
Conversation
- Add AGENTS.md with project overview and development guidelines - Add QUICKSTART.md for quick setup instructions - Add FIRECRACKER_SETUP.md with detailed Firecracker setup guide - Add docs/testing-in-docker.md for Docker-based testing - Add tests/README.md with testing documentation
- Format firecracker/microvm.py with ruff for consistency - Update network.py and utils.py with code style improvements - Add _version.py module for version tracking - Improve error handling and validation in MicroVM class - Enhance snapshot loading with better error messages and recovery
- Add comprehensive test suite for API client - Add Docker integration tests - Add error handling tests - Add networking tests - Add port forwarding tests - Add process manager tests - Add snapshot tests - Add utility tests - Add VM configuration tests - Add VMM manager tests - Add microVM initialization tests - Update conftest.py and test_microvm.py
- Add Makefile for common development commands - Add Dockerfile.test for containerized testing - Add docker-compose.test.yml for test orchestration - Update pyproject.toml with dependencies and configuration - Update .gitignore to exclude SSH keys and Firecracker files - Add uv.lock for reproducible builds with uv package manager
- Add sample.py example script for microVM creation - Add scripts/ directory with utility scripts - Add assets/ directory with Firecracker setup files - Add verify-setup.py script for environment validation
- Add quick start section using official setup script - Update installation instructions with uv support - Update image path from img/ to assets/img/ - Remove old img/firecracker.png file
- Add *.bak pattern for backup files - Add *.old pattern for old file versions - Add *.backup pattern for backup files - Add *.squashfs* pattern for squashfs images - Add vmlinux-* pattern for kernel files
- Add timeout parameter support to API client for better request handling - Convert MicroVM helper methods to static methods for better code organization - Add NetworkManager.close() method for proper resource cleanup - Improve process iteration using psutil.pids() for better performance - Add comprehensive error handling tests across multiple modules - Implement session-scoped cleanup fixtures for test isolation - Add cleanup utilities for Firecracker processes and resources - Update Makefile with new cleanup targets and test failure handling - Update pytest configuration with coverage and marker settings
yashdiq-pdso
approved these changes
Jan 28, 2026
Collaborator
yashdiq-pdso
left a comment
There was a problem hiding this comment.
all good from my side.
next TO-DOs:
- Implement clean up on vm delation (singular defunct deletion)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several important improvements to the Firecracker Python project, focusing on documentation, developer tooling, and test environment setup. The main changes include new and updated documentation for quick start and rootfs setup, a comprehensive
Makefilefor development workflows, a dedicated Dockerfile for running tests with KVM support, and enhancements to the README for clarity and ease of onboarding.Documentation improvements:
QUICKSTART.mdguide with step-by-step instructions for verifying prerequisites, running the official setup script, enabling networking, running the sample script, troubleshooting, and VM cleanup.FIRECRACKER_SETUP.md, detailing how to build a Firecracker-compatible Ubuntu 24.04 rootfs, including Dockerfile usage, kernel download, networking setup, and integration with the SDK.README.mdto reference the new quick start and setup guides, clarify installation steps (includinguvusage), and provide clearer instructions for enabling networking and running the sample script. [1] [2] [3]Developer tooling and test environment:
Makefilewith targets for installing dependencies, running various test suites (unit, integration, coverage), linting, formatting, type checking, cleaning, and Docker-based testing. This streamlines development and CI workflows.Dockerfile.testfor building a test environment with KVM access, Python tooling, Firecracker binary, and all necessary dependencies for running unit and integration tests inside Docker.Other improvements:
README.mdto use the new location underassets/img.These changes collectively enhance onboarding, documentation clarity, developer productivity, and ensure robust testing across environments.This pull request introduces comprehensive improvements to the developer experience and documentation for working with Firecracker microVMs in Python. It adds detailed setup guides, a robust Makefile for development workflows, and a Dockerfile for running tests with KVM support. The documentation now clearly explains both the quickstart and advanced rootfs setup, and provides troubleshooting advice for common issues.
Documentation and User Guides:
QUICKSTART.mdfor a fast setup and usage guide, including prerequisites, setup script usage, networking, running and connecting to VMs, troubleshooting, and cleanup instructions.FIRECRACKER_SETUP.mdwith step-by-step instructions for building a custom Ubuntu 24.04 rootfs image for Firecracker, including Dockerfile details, kernel info, and integration with the Python SDK.README.mdwith new image path, instructions for using the official setup script, manual setup alternatives, and prerequisite checks for a smoother onboarding process. [1] [2] [3]Development and Testing Workflow:
Makefilewith targets for installing dependencies, running various types of tests (unit, integration, coverage), linting, formatting, type checking, cleaning, and Docker-based test workflows.Dockerfile.testfor running unit tests in a containerized environment with KVM and Firecracker support, including all necessary system and Python dependencies.