Release Process & Rolling Distribution
Framework M adopts a Rolling Distribution model, enabled by its Hexagonal (Port/Adapter) Architecture. This ensures that the framework can evolve rapidly without forcing downstream applications into complex, version-locked upgrade migrations.
1. Rolling Distribution Model
Unlike traditional ERP frameworks that use version-specific long-lived branches (e.g., version-13, version-14), Framework M primarily operates on a single release/next pipeline.
Why no Version Forks?
- Reduced Overhead: Maintaining multiple version forks creates a massive maintenance burden for backporting security fixes and features.
- Continuous Upgrades: A rolling model encourages users to stay current, significantly reducing the "Upgrade Tax" paid every few years.
2. Port/Adapter Architecture (Stability Guard)
The core secret to Framework M's stability is its Port/Adapter structure.
- The Port (Protocol): Defines the interface (e.g.,
SecretProtocol,DatabaseProtocol). These change very rarely. - The Adapter: Implementation of the port. We can rewrite the internal logic of an adapter (e.g., swapping a regex-based parser for an AST-based one) without changing the Port.
- The Application: Only interacts with the Port. As long as the Port is stable, the application remains functional regardless of framework internal changes.
3. Migration Comparative Analysis
Common Pitfalls in Odoo/Frappe
Historically, Odoo and Frappe users face high friction during upgrades due to:
- Breaking Schema Changes: Dropping or renaming columns in core DocTypes.
- Path-Dependent Failures: Moving a module from one folder to another breaks imports in custom apps.
- Blocking Migrations: Production must be stopped while thousands of rows are backfilled.
The Framework-M Way
| Concern | Framework M Strategy | vs Odoo/Frappe |
|---|---|---|
| Schema Changes | Declarative sync identifies additive changes as safe; breaking changes require 2-Phase ZDM. | Often forces schema changes immediately, causing downtime. |
| Renames & Refs | Uses Shadow Tables or View Layers to maintain legacy API support while renaming internals. | Renames often break external integrations and reports. |
| Module Movements | Hexagonal structure ensures that business logic is resolved via the registry, not file paths. | Moving a python file breaks imports in custom overrides. |
| Data Migrations | 2-Phase ZDM (Schema first, then async backfill). | Blocking migrations are the default, leading to long downtime windows. |
4. Release Automation
Framework M uses a high-trust, automated CI/CD workflow to manage multi-package releases from the monorepo.
1. Feature Integration
- Developers fork
mainintofeat/branches and submit Merge Requests tomain. - Merging a feature into
maintriggers thecreate-release-mrjob.
2. Staging & Aggregation (release/next)
- The
create-release-mrjob automatically creates (or updates) arelease/nextbranch. - It scans all packages in the monorepo, determines version bumps, and prepares
CHANGELOG.mdupdates based on the new commits inmain. - It creates a single Merge Request from
release/nextback tomainthat tracks all pending version increases. - Aggregation: If multiple
featbranches are merged intomain, therelease/nextbranch keeps "piling up" the version bumps and changelog entries.
3. Final Release & Tagging
- Once the automated MR is reviewed, a developer merges
release/nextintomain. - This merge (with a
chore(release):message) triggers theauto-tag-releasejob. - The tagger script scans the local changelogs and creates Git tags for every package that was bumped (format:
package-name@vX.Y.Z).
4. Publishing
- The creation of these tags triggers the final
publishstage. - Automatic: Packages are instantly published to the GitLab Registry (PyPI/NPM) and TestPyPI.
- Manual: Final publishing to the official PyPI and NPM registries requires a manual trigger from the tag pipeline for human validation.
5. Stability Contract
The framework-m-core package carries a strict stability contract. Any breaking change to a public Protocol requires:
- Deprecation Period: A minimum of 3 minor releases where the old Port remains available with a warning.
- Migration Tooling: A
m migrate --fix-apior similar utility to help users update their code automatically.