Skip to content

Apply Liquibase CLI regeneration to main - #4044

Merged
thomhurst merged 2 commits into
mainfrom
fix/liquibase-main-regeneration-20260824
Aug 24, 2026
Merged

Apply Liquibase CLI regeneration to main#4044
thomhurst merged 2 commits into
mainfrom
fix/liquibase-main-regeneration-20260824

Conversation

@thomhurst

@thomhurst thomhurst commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Carries the reviewed Liquibase regeneration from #4026 onto the actual default branch. #4026 was merged into the obsolete stacked base after that base PR had already landed, so its squash commit never reached main.

This cherry-picks only the #4026 squash diff onto current main. The sole integration conflict was two names for the same Liquibase version-parser test helper; both regressions now share one helper. No generated file was hand-edited.

Validation:

  • LiquibaseCliScraperTests: 17/17
  • OptionsGenerator tests: 929/929
  • OptionsGenerator Release build: 0 warnings/errors
  • diff check: clean

The prior full Liquibase solution build reached the fixed 2 GB agent guard, so it was not retried or raised; CI owns that expensive validation.

Refs #4026
Refs #3996

Summary by CodeRabbit

  • New Features

    • Liquibase command parsing now preserves positional arguments from usage descriptions.
    • Generated compatibility options better support legacy overrides and virtual dispatch.
    • Liquibase version detection more reliably identifies stable releases.
  • Bug Fixes

    • Corrected Liquibase option names and generated changeset properties.
    • Preserved legacy global option behavior.
  • Documentation

    • Clarified executable prerequisites, package installation, module usage, and supported option names.
  • Tests

    • Added coverage for command operands, version detection, compatibility aliases, and legacy option rendering.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 517811ba-db9c-4d81-a04a-377e60141a7b

📥 Commits

Reviewing files that changed from the base of the PR and between 5ef6b5a and 691bff1.

⛔ Files ignored due to path filters (1)
  • src/ModularPipelines.Liquibase/Options/LiquibaseOptions.Generated.cs is excluded by !**/*.generated.*
📒 Files selected for processing (4)
  • test/ModularPipelines.Liquibase.UnitTests/Commands/LiquibaseOptionsTests.cs
  • tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator.Tests/Generators/GeneratorHardeningTests.cs
  • tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator.Tests/Generators/GlobalOptionsBaseGeneratorTests.cs
  • tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Generators/GlobalOptionsBaseGenerator.cs

Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Liquibase scraper now preserves positional command operands and extracts stable versions through ParseVersion. Global option generation preserves virtual compatibility dispatch for renamed properties. Tests cover these behaviors. The CLI documentation updates installation guidance, module usage, and option property names.

Changes

Liquibase CLI support

Layer / File(s) Summary
Command parsing
tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Scrapers/Cli/LiquibaseCliScraper.cs, tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator.Tests/Scrapers/Cli/LiquibaseCliScraperTests.cs
ParseCommandAsync now parses usage synopsis data and assigns positional arguments to command definitions. Tests cover optional Command operands.
Parsing validation
tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator.Tests/Scrapers/Cli/LiquibaseCliScraperTests.cs
Tests cover stable version extraction and the ParseVersion wrapper.
Global option compatibility
tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Generators/GlobalOptionsBaseGenerator.cs, tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator.Tests/Generators/GlobalOptionsBaseGeneratorTests.cs, tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator.Tests/Generators/GeneratorHardeningTests.cs, test/ModularPipelines.Liquibase.UnitTests/Commands/LiquibaseOptionsTests.cs
Global option generation now emits virtual aliases that delegate to matching compatibility properties. Tests cover renamed properties and the legacy Liquibase option override.
CLI documentation
docs/docs/mp-packages/cli/liquibase.md
The documentation separates executable prerequisites from package installation, updates the module example, and corrects option property names.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: 🟡 Moderate · up to 691bf

This PR regenerates Liquibase CLI options and updates generator behavior; targeted scraper and OptionsGenerator validations pass, but the required format check and Liquibase unit tests still need to run before merge, leaving readiness pending.

Poem

I’m a rabbit checking options tonight,
Commands keep operands in sight.
Old names still dispatch,
New names match the patch,
And Liquibase docs hop right.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes applying the Liquibase CLI regeneration to the main branch, which matches the pull request objectives.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/liquibase-main-regeneration-20260824

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Reviewed this against the full prior review thread on #4026 (three rounds of claude/greptile feedback flagging: a corrupted toolVersion banner-scrape, ~254 spurious [Obsolete] markers from that corruption, and an uncompensated breaking rename of the ChangesetChangeSet casing). This PR cherry-picks only the final, fixed squash commit from #4026 onto current main, and the diff here reflects the fully-resolved state:

  • toolVersion is now a real value ("5.0.3" in Liquibase.CommandCoverage.json), not the ASCII banner that plagued earlier revisions.
  • The ChangesetChangeSet casing rename ships with compat shims everywhere it needs them: ILiquibase/Liquibase.Generated.cs add MarkNextChangeSetRan(Sql)Async while keeping [Obsolete]-forwarding overloads for MarkNextChangesetRan(Sql)Async; LiquibaseOptions.Generated.cs and LiquibaseCalculateChecksumOptions.Generated.cs do the same for the renamed properties (AllowDuplicatedChangeSetIdentifiers, ChangeSetAuthor, etc.), and the options record type itself (LiquibaseMarkNextChangesetRanOptions) was deliberately left un-renamed to avoid a second breaking change. This matches the pattern already used elsewhere in this same generated surface for removed CLI options.
  • The merge conflict was resolved cleanly: the only integration conflict (ParseLiquibaseVersion vs. ParseVersion test helper naming) now has a single ParseVersion helper, and there are no leftover call sites of the old name (verified via grep across the test file).
  • The => throw new NotSupportedException() default bodies added to every ILiquibase interface method are not new/risky behavior — this is an existing repo-wide generator convention already present in IDocker.Generated.cs and other tool interfaces on main; Liquibase is just catching up to it, not introducing it.
  • The scraper's new ParseCommandAsync(..., UsageSynopsisParseResult, ...) overload and GetPositionalArguments usage mirror the exact pattern already used by DotNetCliScraper, BrewCliScraper, PnpmCliScraper, WinGetCliScraper, etc., confirming the stated prerequisite (#4003's positional-operand parsing) is indeed already on main and this isn't inventing new generator mechanics.

No outstanding issues from the #4026 review thread remain in this diff, and I didn't find new problems in the cherry-picked changes themselves. The PR's self-reported validation (scraper/generator unit tests, clean diff-check) lines up with what's in the diff.

One minor, non-blocking note: the docs change to liquibase.md's module example (dropping the full runnable RunCommandModule sample for var liquibase = context.Tools.Liquibase;) is a documentation regression in isolation, but since this is a straight cherry-pick of an already-reviewed commit rather than new work, it's not this PR's place to fix — worth a follow-up if the shorter example is judged less useful than the original.

Looks good to merge.

@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown

Greptile Summary

This PR applies the previously reviewed Liquibase CLI regeneration to the current default branch.

  • Regenerates Liquibase enums, options, service interfaces, implementations, command coverage, and documentation.
  • Preserves legacy option names through obsolete compatibility aliases while introducing corrected ChangeSet casing.
  • Updates scraper and generator behavior for positional operands, version metadata, and virtual compatibility aliases.
  • Adds regression coverage for parsing and legacy override behavior.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Scrapers/Cli/LiquibaseCliScraper.cs Preserves positional operands from parsed Liquibase usage data and supports the regenerated command model.
tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Generators/GlobalOptionsBaseGenerator.cs Changes compatibility-property emission so legacy virtual overrides remain effective through canonical generated properties.
src/ModularPipelines.Liquibase/Options/LiquibaseOptions.Generated.cs Regenerates global options with corrected names and obsolete compatibility backing properties.
src/ModularPipelines.Liquibase/Services/ILiquibase.Generated.cs Regenerates the Liquibase service contract, including renamed command aliases and default interface implementations.
src/ModularPipelines.Liquibase/Services/Liquibase.Generated.cs Regenerates concrete command implementations and compatibility forwarding methods.
tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator.Tests/Scrapers/Cli/LiquibaseCliScraperTests.cs Adds regression coverage for version parsing and preservation of usage operands.

Reviews (2): Last reviewed commit: "fix(generator): preserve virtual aliases" | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ef6b5a7e6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ModularPipelines.Liquibase/Options/LiquibaseOptions.Generated.cs Outdated
@thomhurst

Copy link
Copy Markdown
Owner Author

Fixed the virtual-override compatibility issue at exact head 691bff1. The generator now preserves legacy virtual dispatch for direct singleton global-option aliases, and Liquibase was regenerated from CLI 5.0.3 (43 commands, 61 files; stable regeneration). Validation: OptionsGenerator tests 930/930; OptionsGenerator Release build 0 warnings/errors. Added generator and runtime regressions. The focused Liquibase test project reached the agent guard's 2 GB limit (2097 MB), so I did not raise the limit or retry; CI owns that check.

@thomhurst
thomhurst merged commit c18fba0 into main Aug 24, 2026
16 checks passed
@thomhurst
thomhurst deleted the fix/liquibase-main-regeneration-20260824 branch August 24, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant