Implement Liquibase CLI integration#3045
Conversation
Greptile SummaryThis PR adds strongly typed Liquibase 5.0.3 support. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (11): Last reviewed commit: "fix(cli): restore command factory import" | Re-trigger Greptile |
Code reviewReviewed the Liquibase 5.0.3 CLI integration (generator, scraper, generated options/services, tests, and the pinned installer workflow). Verified:
No high-confidence bugs or CLAUDE.md violations found. One architectural suggestion, non-blocking: Extract Windows executable resolution into a shared base-class helper instead of duplicating it per scraper.
Why this matters: Pulling the "search PATH / known install dirs for a Windows launcher script, and shell out to |
2a5bfec to
af14c51
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a81d2b6d2
ℹ️ 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".
edb8c18 to
d58ff39
Compare
8a81d2b to
0d35a34
Compare
|
Rebased onto current stacked base d58ff39 and addressed both review threads in 0d35a34: Windows command scripts now run through cmd.exe, and generated Liquibase global options render before subcommands. Validation passed: full Release solution build, 383 generator tests, 62 focused command tests, and real pinned Liquibase 5.0.3 Windows regeneration (43 commands / 59 files). |
Code reviewRe-reviewed following the new commit pushed since my last review: Previous suggestion addressed: My last review suggested extracting the Windows New global-options feature, spot-checked:
No high-confidence bugs or CLAUDE.md violations found in this delta. Checked for compile-breaking issues, logic errors, and CLAUDE.md compliance (generated files are consistent with regenerating from the updated generator, not hand-edited). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d35a34f43
ℹ️ 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".
d58ff39 to
d93f335
Compare
0d35a34 to
2cf9b14
Compare
Code reviewRe-reviewed following the latest commit: Changes in this delta:
Previous review suggestions: Both prior suggestions (extracting shared Windows No high-confidence bugs or CLAUDE.md violations found in this commit. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2cf9b145d1
ℹ️ 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".
049c867 to
1e68f83
Compare
2cf9b14 to
083a07c
Compare
|
Rebased Liquibase-only commits onto the current Argo CD base and added the two documented Databricks diff globals. Validation:
Head: 083a07c |
Code reviewRe-reviewed following the latest commit: No bugs or CLAUDE.md violations found, but this delta introduces a pattern worth reconsidering before more scrapers copy it. Unconditional hardcoded option injection can silently mask real scrape results
Why this matters: this generator's entire value proposition (per the repo's CLAUDE.md) is that options classes are regenerated from the live CLI, so they stay correct as the tool evolves — that's why hand-editing generated files is banned. This hardcoded pair breaks that invariant in the other direction: if a future Liquibase/Databricks-extension version documents these flags in Suggested approach: make the fallback additive-only, not an unconditional replace, e.g. private static void AddDocumentedDatabricksOptions(List<CliOptionDefinition> options)
{
// Supplements options the CLI doesn't yet expose via --help.
// If a name below ever appears in `options` already, the scraper found it live —
// remove the corresponding manual entry so behavior always favors the live scrape.
var seen = options.Select(o => o.SwitchName).ToHashSet(StringComparer.OrdinalIgnoreCase);
foreach (var supplement in DatabricksSupplementalOptions.Where(o => !seen.Contains(o.SwitchName)))
{
options.Add(supplement);
}
}That way, if the CLI ever starts documenting these for real, the live-scraped values automatically win instead of being silently discarded, and a future contributor auditing the generator has a clear signal ("supplement is now a no-op") for when it's safe to delete the manual entry. Minor, non-blocking: the two hardcoded Previously flagged items: the Windows |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 083a07ce5a
ℹ️ 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".
083a07c to
af7f1f6
Compare
|
Addressed the latest review feedback in af7f1f6:
Validation: generator tests 418/418; Liquibase runtime tests 6/6; UnitTests, ModularPipelines.Liquibase, and ModularPipelines.Build compile successfully (existing warnings only). @codex review |
Code reviewRe-reviewed the delta since my last review: two new commits, Changes in this delta:
No high-confidence bugs or CLAUDE.md violations found in this delta. Previous review rounds' suggestions (shared Windows |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af7f1f61b6
ℹ️ 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".
1c9c933 to
d9d670b
Compare
|
Rebased onto current main and resolved the docs/generator-test conflicts. Also fixed the unresolved overridden-global-metadata review in |
Code reviewRe-reviewed following the latest commits ( Changes in this delta, verified against the code:
No high-confidence bugs or CLAUDE.md violations found in this delta. All previously flagged items across earlier rounds (Windows launcher duplication, global-options ordering, additive-only Databricks/diff override pattern, required-option typing, secret-classifier consistency) are now addressed at this HEAD. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Route Windows command scripts through cmd.exe and emit scraped root options before Liquibase subcommands.
Include Liquibase in release project discovery.
Regeneration also aligns Liquibase outputs with current nullable templates.
Treat help-marked required values as optional because Liquibase can resolve them from defaults files or environment variables. Preserve live Databricks option metadata while keeping stable generated property names.
Carry global-option placement through generated and reflection command models after the runtime metadata refactor. Refs #3005.
Regenerate assembly metadata and README output. Extract scraper stages to satisfy CodeFactor without changing generated output.
Add the documented Secure JSON format option and bound JVM-heavy scraping parallelism. Refs #3005.
1226b49 to
199f299
Compare
|
Rebased onto current main at 199f299. Resolved the source-generator metadata conflict by retaining both main's SecretValueKeys and Liquibase's IsGlobalOption fields, then restored the CliCommandFactory import required by the rebased Command path. Validation: SourceGenerator and Liquibase builds pass; OptionsGenerator 485/485; LiquibaseOptions 7/7; CommandLineBuilder 8/8; GeneratedRuntimeMetadata 14/14. |
There was a problem hiding this comment.
Code review
Re-reviewed at current HEAD (199f2998e4, "fix(cli): restore command factory import"), after the three most recent commits: 9a4a73232c (generate diff format option), f801aaf693 (preserve overridden global options), 199f2998e4 (restore the ModularPipelines.Helpers.Internal using dropped during the rebase onto main).
This PR has already been through many review rounds (mine, Codex, Greptile), and I independently re-verified the full diff rather than trusting prior summaries. Findings:
Verified correct:
- The pinned Liquibase installer checksum in
.github/workflows/generate-cli-options.yml— downloadedliquibase-5.0.3.tar.gzfrom the official GitHub release myself and its SHA-256 matches865aab391be9cbe3fee22461392d5d29aa76652596598b14700a3f5f05c9e2b7exactly. Good hardening: pinning + verifying a release asset instead of trusting "latest". CliGlobalOptionsAttribute+ the dualIsGlobalOptionimplementations (CommandOptionsGenerator.IsGlobalOptionviaIPropertySymbol.OverriddenProperty, andCommandModelProvider.IsGlobalOptionvia reflection's base-type walk +GetBaseDefinition()) produce consistent results and both correctly propagate the flag through virtual property overrides that don't redeclare the attribute. Covered by matching tests on both paths (CommandMetadata_PreservesAttributesFromOverriddenProperties,ReflectionMetadata_PreservesGlobalMetadataFromOverriddenProperties).Command.cs's refactor to delegate entirely toCommandLineBuilder.Build(...)is a real simplification — it deletes ~20 lines of argument-assembly logic that duplicated whatCommandLineBuilderalready did, removes four now-unused constructor dependencies, and leaves one code path responsible for command-line construction instead of two. This is the kind of consolidation worth calling out positively: it removes a class of "generated vs. manual command differ" bugs.- The last commit's fix (restoring the
ModularPipelines.Helpers.Internalusing inCommand.cs, needed forCliCommandFactory) is correct and matches the file's actual usage. - Generated Liquibase options/services (43 commands, 59 files) follow the existing generator conventions consistently —
[CliGlobalOptions]onLiquibaseOptions, secrets routed throughGeneratorUtils.IsSecretOptioneverywhere including the two Databricks/--formatsupplements that earlier rounds had flagged as hardcoded. - Test coverage is solid: 383 OptionsGenerator tests + 62 focused command/parser tests, including edge cases like the Windows
.batlauncher resolution, multi-line Picocli description accumulation, and global-vs-command option separation.
One minor, non-blocking nit (cosmetic, not a bug): the generated XML doc comment for AnalyticsEnabled in LiquibaseOptions.Generated.cs reads:
Enable or disable sending product usage data and analytics to Liquibase. Learn more at
https: //docs.liquibase.com/analytics.
The stray space after https: comes from the scraper's multi-line description joiner (AccumulateMultiLineDescription) rejoining a URL that Picocli's help text wrapped mid-string. It's harmless (doc comment only, not functional), but if it's easy to special-case URL continuations (e.g. don't insert a space when the previous line ends in : immediately before //), it'd be a nice polish. Not blocking.
No high-confidence bugs, security issues, or CLAUDE.md violations found. All items raised across earlier rounds (Windows launcher duplication, global-options ordering, additive-only Databricks/diff overrides, required-option typing, secret-classifier consistency, the rebase's dropped import) remain resolved at this HEAD. This looks ready to merge pending the stacked base (#3032).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 199f2998e4
ℹ️ 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".
| [ExcludeFromCodeCoverage] | ||
| [CliTool("liquibase")] | ||
| [CliGlobalOptions] | ||
| public abstract record LiquibaseOptions : CommandLineToolOptions |
There was a problem hiding this comment.
Expose the Secure license key globally
When pipelines run Liquibase Secure features and need to pass a per-invocation license key, Liquibase documents the CLI form as liquibase --license-key=... [command] (docs), but this generated global-options base has no LicenseKey property (I also checked that --license-key/LicenseKey is absent from the Liquibase package and scraper). Because CommandLineBuilder appends raw Arguments after the subcommand, typed calls such as secure JSON diff cannot emit the required global position without dropping to a custom command; add a secret global --license-key option in the scraper/generator.
Useful? React with 👍 / 👎.
|
The failed Ubuntu job has no downloadable log; its check annotation says the hosted runner lost communication with GitHub while Run Pipeline was still in progress. This is infrastructure failure, not a surfaced repository error. I reran the failed job once and will let CI complete. |
Summary
-Dname=valueproperties.bat/.cmdCLI launchers throughcmd.exewith redirected outputValidation
Stacked on #3032.
Closes #3005