Skip to content

fix: dry run with YAML config #3104 - #3105

Open
rrayst wants to merge 2 commits into
masterfrom
feat-3104
Open

fix: dry run with YAML config #3104#3105
rrayst wants to merge 2 commits into
masterfrom
feat-3104

Conversation

@rrayst

@rrayst rrayst commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Configuration verification for the CLI now supports YAML files in addition to XML.
  • Bug Fixes
    • Dry-run verification correctly handles YAML, avoiding XML-specific parsing errors and ensuring proper success/failure behavior.
  • Tests
    • Added automated CLI tests covering valid YAML, valid XML, and invalid YAML, including checks for expected exit codes and absence of the prior XML prolog error.
  • Chores
    • Added a dedicated YAML dry-run configuration test resource.

@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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@rrayst

rrayst commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

/ok-to-test

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9968166a-0e1c-4593-b3a9-3e7c1f0aee3b

📥 Commits

Reviewing files that changed from the base of the PR and between 7cb8374 and efb4241.

📒 Files selected for processing (1)
  • distribution/src/test/java/com/predic8/membrane/examples/withoutinternet/cli/VerifyConfigurationTest.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • distribution/src/test/java/com/predic8/membrane/examples/withoutinternet/cli/VerifyConfigurationTest.java

📝 Walkthrough

Walkthrough

Dry-run verification now selects YAML or XML configuration loading based on the file extension. Unit and distribution tests cover valid YAML, valid XML, and invalid YAML CLI behavior.

Changes

Configuration verification

Layer / File(s) Summary
Format-specific verification dispatch
core/src/main/java/.../RouterCLI.java
dryRun delegates to verifyConfiguration, which loads YAML into DefaultRouter and refreshes the XML context for other formats.
Configuration verification coverage
core/src/test/java/.../RouterCLITest.java, core/src/test/resources/configuration/dry-run.apis.yaml, distribution/src/test/java/.../VerifyConfigurationTest.java
Tests cover YAML parsing, valid XML verification, invalid YAML exit behavior, and captured CLI output.

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

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant RouterCLI
  participant DefaultRouter
  participant XMLContext
  CLI->>RouterCLI: invoke dry-run verification
  RouterCLI->>RouterCLI: select loader by extension
  RouterCLI->>DefaultRouter: load YAML configuration
  RouterCLI->>XMLContext: refresh XML configuration
  RouterCLI-->>CLI: return verification exit code
Loading

Possibly related PRs

Suggested reviewers: predic8

Poem

I’m a rabbit, I test YAML bright,
XML hops through its context right.
Bad configs tumble, exit one,
Good ones greet the rising sun.
Dry runs now leap without a fright!

🚥 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 accurately summarizes the main change: fixing dry-run handling for YAML configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 feat-3104

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.

predic8
predic8 previously approved these changes Jul 27, 2026
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.

2 participants