Skip to content

Releases: tuxpeople/python-ipam

v1.1.5

21 Jan 20:38

Choose a tag to compare

Python IPAM v1.1.5

🐛 Bug Fixes

  • Fix container startup by building the venv at the runtime path (gunicorn shebang)

🧹 CI

  • Align Black formatting with CI (Black 26.1.0)

v1.1.4

09 Jan 07:41

Choose a tag to compare

Python IPAM v1.1.4

Critical bugfix release that resolves migration conflicts with existing databases.

🐛 Bug Fixes

  • Migration Conflicts: Fixed sqlite3.OperationalError: table networks already exists when deploying to existing databases
  • Smart Migration Detection: Startup now detects databases created with db.create_all() and automatically stamps them with the current migration version
  • Application Factory: Removed db.create_all() from application factory to prevent conflicts with Alembic migrations

🔧 Technical Changes

Migration Strategy

The application now uses a single, consistent migration strategy:

  • Production: Alembic migrations (via startup.py)
  • Tests: db.create_all() in test fixtures (isolated, in-memory databases)
  • Existing Databases: Automatically detected and stamped with current version

Backward Compatibility

This release automatically handles databases created by previous versions:

  1. Detects if database has tables but no alembic_version table
  2. Stamps the database with the current migration version
  3. Future migrations will run normally

📦 Container Image

docker pull ghcr.io/tuxpeople/python-ipam:1.1.4
docker pull ghcr.io/tuxpeople/python-ipam:1.1
docker pull ghcr.io/tuxpeople/python-ipam:1
docker pull ghcr.io/tuxpeople/python-ipam:latest

🔄 Migration Notes

  • No breaking changes
  • Drop-in replacement for v1.1.3
  • Existing databases will be automatically detected and stamped
  • No manual migration required for existing deployments

⚡ Quick Start

For new deployments, the database will be initialized automatically on first start via Alembic migrations.

For existing deployments, the startup will detect your existing database and stamp it with the current version, then continue with normal startup.

📝 Full Changelog

v1.1.3...v1.1.4

v1.1.3

09 Jan 07:25

Choose a tag to compare

Python IPAM v1.1.3

Critical bugfix release that resolves startup errors in Kubernetes deployments with the new migration system.

🐛 Bug Fixes

  • Migration Startup: Fixed FileNotFoundError: migrations/alembic.ini doesn't exist error during container startup
  • Container Compatibility: Updated env.py to gracefully handle missing alembic.ini file (common in container deployments)
  • The migration system now works correctly in both development (with alembic.ini) and production containers (without alembic.ini)

✅ Testing Improvements

  • Startup Tests: Added comprehensive tests for startup.py to catch configuration errors early
    • Migration flag handling (IPAM_RUN_MIGRATIONS environment variable)
    • Gunicorn argument building and execution
    • Main() function behavior with various configurations
  • Migration Tests: Added tests for migrations directory structure
    • Validates env.py has proper file existence checks
    • Ensures migrations work without alembic.ini
    • Verifies migration files are present

🔧 Technical Details

The issue occurred because the new startup.py mechanism runs Alembic migrations on container start, but migrations/env.py attempted to load alembic.ini unconditionally. In container environments, this file is not needed (configuration comes from environment variables), causing a FileNotFoundError. The fix adds a file existence check before attempting to load the config file.

📦 Container Image

docker pull ghcr.io/tuxpeople/python-ipam:1.1.3
docker pull ghcr.io/tuxpeople/python-ipam:1.1
docker pull ghcr.io/tuxpeople/python-ipam:1
docker pull ghcr.io/tuxpeople/python-ipam:latest

🔄 Migration Notes

  • No breaking changes
  • Drop-in replacement for v1.1.2
  • Existing databases are not affected
  • Kubernetes deployments will now start correctly with automatic migrations

📝 Full Changelog

v1.1.2...v1.1.3

v1.1.2

09 Jan 07:06

Choose a tag to compare

Python IPAM v1.1.2

Critical bugfix release that resolves database initialization issues in Kubernetes deployments.

🐛 Bug Fixes

  • Database Initialization: Fixed "no such table: networks" error by ensuring SQLAlchemy models are imported before db.create_all() call
  • Models are now properly registered with SQLAlchemy metadata before table creation

🔧 Technical Details

The issue occurred because the application factory called db.create_all() before importing model classes. SQLAlchemy requires model classes to be imported first so they can be registered with the metadata. This was particularly problematic in Kubernetes deployments with fresh databases.

📦 Container Image

docker pull ghcr.io/tuxpeople/python-ipam:1.1.2
docker pull ghcr.io/tuxpeople/python-ipam:1.1
docker pull ghcr.io/tuxpeople/python-ipam:1
docker pull ghcr.io/tuxpeople/python-ipam:latest

🔄 Migration Notes

  • No breaking changes
  • Drop-in replacement for v1.1.1
  • Existing databases are not affected
  • New deployments will now properly initialize the database schema

📝 Full Changelog

v1.1.1...v1.1.2

v1.1.1

28 Dec 16:49

Choose a tag to compare

Python IPAM v1.1.1

This release fixes upgrades where DHCP ranges were missing from existing
SQLite databases.

🐛 Bug Fixes

  • Add migration to create the dhcp_ranges table for existing databases
  • Document upgrade steps for pre-Alembic installs

✅ Tests

  • Cover DHCP ranges table schema and relationships

📦 Container Image

docker pull ghcr.io/tuxpeople/python-ipam:1.1.1
docker pull ghcr.io/tuxpeople/python-ipam:1.1
docker pull ghcr.io/tuxpeople/python-ipam:1
docker pull ghcr.io/tuxpeople/python-ipam:latest

📝 Full Changelog

v1.1.0...v1.1.1

v1.1.0

28 Dec 15:35

Choose a tag to compare

Python IPAM v1.1.0

This release adds API token authentication with rate limiting, and introduces
backup and restore tooling for safer operations.

🚀 Features

  • API token authentication for /api/v1 with Bearer or X-API-Key headers
  • Configurable API rate limiting (Flask-Limiter)
  • Backup/restore CLI and API endpoints with integrity checks

🔒 Security

  • CI now limits the latest container tag to release builds

📦 Container Image

docker pull ghcr.io/tuxpeople/python-ipam:1.1.0
docker pull ghcr.io/tuxpeople/python-ipam:1.1
docker pull ghcr.io/tuxpeople/python-ipam:1
docker pull ghcr.io/tuxpeople/python-ipam:latest

📝 Full Changelog

v1.0.12...v1.1.0

v1.0.12

28 Dec 12:39

Choose a tag to compare

Docs: enforce green CI requirement before tagging and releasing.

v1.0.11

28 Dec 11:58

Choose a tag to compare

Security: bump pip to 25.3 to address CVE-2025-8869 in the build environment.

v1.0.10

28 Dec 11:04

Choose a tag to compare

Fix Docker build on distroless images by setting /tmp permissions as root in the build stage.\n\nCI: format hosts API to satisfy Black.

v1.0.9

28 Dec 10:38

Choose a tag to compare

Add host discovery metadata (last_seen, discovery_source) and assignment flag (is_assigned).\n\nConfig: HOST_ASSIGN_ON_CREATE controls default assignment for new hosts.\n\nDocs: update API and schema to include new fields and filters.