feat(cli): test only the minimal covering set of modules by default - #1680
Merged
Conversation
test-packages gave every module its own database and re-deployed its whole dependency closure there, so a workspace of 89 modules performed 1575 module deploys and ast alone was deployed 26 times. Default to the modules nothing else in the workspace requires (89 -> 16 databases, 1575 -> 339 deploys); --force-all restores the old behavior, which is the only mode that proves a module's own requires is complete rather than satisfied by a sibling.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
pgpm test-packagesgave every module its own database and re-deployed that module'sentire dependency closure into it. On constructive-db (89 modules) that is 1575 module
deploys, with
astdeployed 26 times,ast-plpgsql23,metaschema19 — all of itduplicate work, which is why
--full-cycleis too slow to run in CI and how a batch ofrevert/second-deploy bugs reached
mainunnoticed.The default is now the minimal covering set: the modules nothing else in the workspace
requires. Testing one deploys its whole closure in dependency order, so every module is
still deployed/verified/reverted/re-deployed — just once per covering module. On
constructive-db: 16 databases instead of 89, 339 module deploys instead of 1575.
Selection runs over the post-exclude candidates, so
--exclude functions-localpromotesconstructive-localandapprather than silently dropping what onlyfunctions-localcovered.
The property the default trades away is standalone deployability — that a module's own
requiresis complete rather than satisfied by a sibling already in the database.--force-allrestores the old per-module behavior and is the only mode that asserts it.(That distinction is not academic: constructive-db's
-securitycompanions were failingexactly that check.)
minimalCoveringSetis exported and unit-tested for the covering, exclude-promotion, andshared-dependency-promotion cases;
selectMinimalModulesis the thinPgpmPackageadapter over it.
Link to Devin session: https://app.devin.ai/sessions/e283998fa441463a97df7614025b335a
Requested by: @pyramation