Changelog
Note
Below is the rendered version of the project’s CHANGELOG.md file, found at the
root of the code repository.
The format is based on Keep a Changelog. The project uses semantic versioning (see semver).
v0.20.0 - 2025-02-02
Added
New “deleter” PatchDriver, deletes file(s) specified if found.
Fixed
Uncaught exceptions of the CLI are no longer shamefully hidden.
Removed
The under-cooked “precommit” PatchDriver is removed, useless and left broken for a long time. If you need it, use a ShellDriver with
pre-commit autoupdatecommand instead
v0.19.0 - 2025-01-22
Added
Add
GlobFileEditor.before_run()to run arbitrary code before processing the first fileNew function
replace_manyinpatchdrivers.brick, to replace many patterns in a string at once. Perfect for the kind of filesedreplacementPatchDriverPydantic base class now allows extra fields (Pydantic Extra fields)
Fixed
ShellDrivercrash caused by incorrect construction ofPatchOutcomeobject.
v0.18.0 - 2023-11-21
Added
New
SingleFileEditor, derived fromPatchDriver, for editing single files.Parameter
target_file, will be fed its text content toprocess_file().Use via
from mass_driver.drivers.bricks import SingleFileEditor.
New
GlobFileEditor, similarly for editing multiple files from glob pattern.Use via
from mass_driver.drivers.bricks import GlobFileEditor.
v0.17.1 - 2023-11-13
Added
Update
pyGithubto2.1.1, now throttles Github API to avoid ratelimits
Fixed
Catch and log import errors during activity loading, previously silent crashes
v0.17.0 - 2023-11-12
Added
Completing an activity (source, migration, forge) now summarizes results
Breakdown of repo count per outcome type, then sorted list of repos per type
FASTER: Optional, experimental multi-threaded per-repo processsing! Handling of clone, scan, patching is done as individual thread per repo, with N=8 pooled threads.
Early data shows a x6 improvement in performance, as cloning one repo doesn’t block others anymore.
Enable via new experimental flag
run --parallel, defaulting toFalse
Changed
BREAKING: Renamed
RepotoSourcedRepoinmass_driver.models.repositoryThis exposes better the idea of “a Repo as it was Source-d”, in contrast to
ClonedRepo“a Repo after it was cloned”.Also avoids clashes with
git.Repoobject from gitpython dependency.
Replaced all
print()calls tologgingmoduleLoggers used are mostly nested:
from
root(default)to
run(or other file-activity-based)to
run.repo.<repo-id>for logs for a specific repo’s processingto subloggers like
run.repo.<repo-id>.driver.<driver-plugin-name>
PatchDrivernow has aloggerobj for such customized logging: Repo-processing setsPatchdriver.loggernamedrun.repo.<repo-id>.driver.<driver-plugin-name>ACTION: Please replace any
printwithself.logger.info!
v0.16.4 - 2023-11-04
Fixed
Attempting to run a Forge activity with
git_push_first=True, without migration or scan activity, no longer causes exit without processing any repos. Clone step invoked properly mean remote-clone URLs are now supported, converted to local filepaths internally.make docsnow works again withsphinx-autodoc2: Pinnedastroiddep to2.15.8(< 3.0.0) to avoid the regression caused by unpinnedastroid.
v0.16.3 - 2023-09-11
Fixed
ShellDriverno longer crashes due to irrelevant dataclass importUpdated
pyGithub, fixes “missing cryptography” errorError messages for bad config file for Sources no longer insist wrongly about “Forge config error”. Now detecting the validation error’s model properly.
Failing to load a scanner that was selected in config now throws
ImportErroron the first plugin-load failure, instead of silently skipping the scanner.
Changed
Updated to python-template v1.3.0 (from 1.1.0)
v0.16.2 - 2023-07-25
Fixed
github-appforge no longer crashes due to type confusion on a param.
v0.16.1 - 2023-07-15
Fixed
Formatting of the % of PR per status back to 2 digits precision not 11.
v0.16.0 - 2023-07-13
Breaking interface of Forge to facilitate new view-pr feature.
Added
New
view-prfeature for bulk reviewing the status of PRs that already exist.
Changed
BREAKING: New
Forge.get_pr_status(), required from derived classes, returning a string status, used as key to group PRs together for summary purposes.BREAKING: New
Forge.pr_statusesproperty, required from derived classes, returning a list of all possible string statuses ofForge.get_pr_status(), sorted from most complete (e.g. merged) to least complete (e.g. not merged, has merge-conflicts).
Removed
BREAKING: Removed
Forge.get_pr(), which had unclear return type anyway.
v0.15.0 - 2023-07-05
Changed
Major break of interface: Rework of the cloning system, merges migration/scan
codepaths, enabling use of Source-discovered information in PatchDriver.run.
BREAKING:
PatchDriver.run()passesClonedRepoobj, notpathlib.Path.Any use of
repoin yourPatchDriver.run()should userepo.cloned_path.See
ClonedRepodocs, contains information derived fromSource, such aspatch_datafield, arbitrary source-issued information dict.
BREAKING:
tests.fixtures.massdrive()now returns 3-item-tuple, not 2.Returned tuple:
PatchResult,ForgeResult,ScanResult(orNone)Any tests using
fixtures.massdriveshould now setmig, forge, scan =…Swap
fixtures.massdrive_scanwithfixtures.massdriveaccepting 2 junk arg
BREAKING:
mass-driver scanCLI removed, now part ofmass-driver run. Activity flow forruncommand is now:Source discovery phase (if any, or from CLI), generating
RepolistMain phase, iterating over each Repo, first to clone them =
ClonedRepolistInside main phase, scan (if any), generating
ScanResultInside main phase, migrate (if any), generating
MigrationResultAfter main phase, interactively pause for review if requested
Forge activity, iterating over each repo again, creating
ForgeResult
BREAKING:
models.sourcemodule renamed tomodels.repository.
Added
Scan+Migration+Forge can now ALL happen in one run command:
Clones one repo, then scanning it, then migrating it, then next repo
Can thus do all of Source -> [Clone] -> Scan -> Migrate -> Forge
New
csv-filelistSource for importing repos in CSV file formatNew
tests.fixture.massdrive_runlocal()func to enable source testing
Fixed
Secret tokens for Github plugins no longer leak on config dump (
--json-outfileflag), by replacingstrwithpydantic.SecretStr.Docs updated to warn downstream devs about this risk.
Pin
pydanticto1.*, as breaking version2.0was just released.
v0.14.0 - 2023-06-08
Added
New
sourcefeature for discovering what repos to patch/scan.Sources are plugins withdiscover()method, returningRepos by ID.Alternative
sourcessubcommand to list and detail themNew TOML file entry
[mass-driver.source], with subkeysource_nameused to select which source plugin to enable.Simple sources provided:
repo-listfor in-activity-file repository listrepo-filelistto point to a separate file listing repostemplate-filelistto expand a template against a file listing repos
github-searchandgithub-app-searchSources for Github Repository searchCLI args
--repo-pathand--repo-fileliststill available, overriding any source, so thatmassdriver.sourceis only required if lacking CLI args
CI (pytest, pre-commit) set up via Github Actions: PR #1
v0.13.2 - 2023-06-03
Added
New
file_ownershipparameter forstamper, defaulting to0664.
Fixed
Exit codes harmonized:
0for success1for failures during the main function2for argument parsing errors
stamperdriver now creates any missing parent folder to the targetRemove test depending on
git clonefrom Github: Faster, offline tests now
v0.13.1 - 2023-04-17
Fixed
scancommand now uses--json-outfileas expected
v0.13.0 - 2023-04-17
Added
New
scanfeature for scanning repos with arbitrary python functions. See new “Scanning” docs:Scanners are plugins declared under
mass-driver.scanners, linking to functions likemy_scanner(repo: Path) -> dict[str, Any]Alternative
scannerscommand to list out detected, available scannersNew TOML file entry
[mass-driver.scan], with subkeyscanner_namesused to select which scanner plugins to enable.Simple scanners
root-filesanddockerfile-fromprovided for referenceNew fixture
massdriver_scanandmassdriver_scan_checkfor testing scanners
New optional CLI parameter
--json-outfileforrunandscan, to save the activity outcome to JSON files for analysis
Changed
Test fixture
massdrive_check_filenow returns uncheckedresultandreferenceblobs for equality assertion (assert result == reference) to be done by the caller. This enables plugins likepytest-clarityto show colorful diff. Users ofmassdrive_check_fileneed to change (on pain of lack of test assertion):
- massdrive_check_file(workdir)
+ result, reference = massdrive_check_file(workdir)
+ assert result == reference, "Massdriver result should match reference"
v0.12.0 - 2023-04-05
Added
Auto-detect repo’s base branch for Forge: parameter
base_branchnow optional, defaulting to repo’s default branch
v0.11.0 - 2023-04-02
Added
New
github-appforge plugin for creating PRs on Github when running mass-driver as a Github AppNew Forge params:
forge_configdict, for Forge-specific non-sensitive config to keep in config file, complementing envvars. Similar todriver_configfor Migration.interactive_pause_everyint, for blocking the Forge, pausing for confirmation interactively every few PRs generated. Disabled by default, set to 1 to block every PR, or 5 every 5…
v0.10.0 - 2023-04-02
Removed
Unused
migration_namefield of Migration now removed
Added
Forgesubclasses can now grab config via envvars prefixedFORGE_. Observe thatForgenow derives frompydantic.BaseSettings, see BaseSettings docs.New, simpler testing fixture
massdrive_check_filefor PatchDriver that affect single files
v0.9.0 - 2023-03-12
Added
New optional Migration params:
commit_author_name+commit_author_email, used to override the git commit author.
v0.8.0 - 2023-02-24
Added
New file type
ActivitycombinesMigrationandForgeNew
Forgenameddummyfor testing purposesNew
git_push_firstboolean param in Forge to disable git pushing.New
ActivityOutcometo capture the full result of a migration/forge sequence
Changed
Replace commands
run-migration+run-forgeby newrun, using theActivityfile type with optionals.Internals refactored: all Pydantic objects now under
mass_driver.models(PatchDriver,Forge,Activity)
Removed
Options
--really-commit-changesand--dry-run
v0.7.0 - 2023-02-22
Added
New
ROADMAP.mdto clarify The Plan.
Changed
Upgrade minimum Python version to 3.11 to use
tomllibReplace
tomlkitwith stdlibtomllib
Fixed
Migrations, once loaded from TOML, are now proper dict again
PatchDriverinstance now independent across repos
v0.6.1 - 2023-02-06
Added
Upgrade pre-commit dependencies + poetry in Dockerfile
Update pyproject.toml for release to Pypi
v0.6.0 - 2023-02-04
Added
Forges now discovered via setuptools
New “run-forge” subcommand for creating PRs for on-disk branches
Implemented GithubForge for PR creation on Github
New “Stamper”
PatchDriverfor “stamping” new files on repos
Fixed
Incorrect Repo creation causing silent cloning errors on some devices
v0.5.0 - 2023-01-24
Added
New plugin system for including third-party PatchDrivers, based on the setuptools “entrypoints” system.
CLI Subcommands for inspecting drivers, running migrations…
PatchDriver test harness, for ease of plugin development.
Project objectives (gherkin features in
features/) now part of docs
Changed
PatchDrivernow inherits Pydantic BaseModel (allows serialization)PatchDriverfunc prototype:run(repo: Path) -> PatchResult
Removed
Complex PatchDrivers (the ones requiring package dependencies) removed, moved to separate “plugins” repo.
v0.4.0 - 2022-11-16
Added
New
JsonpatchDriver, for applying an RFC6902 JSON PatchNew
PreCommitDriver, for runningpre-commit autoupdateNew
ShellDriverfor running arbitrary shell commandsNew
mass-driver(1)man page output tomake docs
v0.3.1 - 2022-11-11
Changed
PatchDriver API simplified, now using single func for detect + patch: called via
PatchDriver.run(repo: Path, dry_run: bool).CLI simplified when exposing
PatchDriver.run(), now uses either--dry-run(the default setup) or--really-commit-changesfor committing (not pushing)
v0.3.0 - 2022-11-11
Added
Poetry Driver stub for major version of packages in
pyproject.toml. Showcases JSON Pointers (RFC6901) for structured fields modification.
v0.2.0 - 2022-11-11
Added
Basic clone/detect/patch/commit workflow, with basic Github support
v0.1.0 - 2022-11-10
Added
New python module
mass_driver, exposed as shell commandmass-driver