Skip to content

feat: report progress on project extension validate format fix - #1718

Merged
Malte Janz (MalteJanz) merged 3 commits into
mainfrom
feat/report-progress-on-project-extension-validate-format-fix
Oct 22, 2026
Merged

Malte Janz (MalteJanz) merged 3 commits into
mainfrom
feat/report-progress-on-project-extension-validate-format-fix

Conversation

@MalteJanz

@MalteJanz Malte Janz (MalteJanz) commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What changed?

Adds some minimal and non-TTY (e.g. plain / streaming output) progress reporting for different steps during the validate / format / fix commands that can take a while depending on project size and system.

I decided against some fancy TTY output (in-place / live updates) for now, because it would require a larger change on how we treat all terminal output for these commands, e.g. also depending on #1679 .

I might want to explore that again in the future (after the issue above and some output refactoring), so that you have a live updating output that shows which "jobs" are still running and for how long they are already running, instead of printing new lines for jobs starting and finishing.

So this is what we get with this PR:

Some output examples

extension validate

❯ shopware-cli extension validate .
Running copying files (use "--no-copy" to skip)...
Finished copying files (use "--no-copy" to skip) (16.0s)
Running discovering extension configuration...
Finished discovering extension configuration (0.3s)
Running preparing tools...
Finished preparing tools (0.0s)
Running stylelint...
Running eslint...
Running builtin...
Running phpstan...
Running storefront-twig...
Finished storefront-twig (0.0s)
Finished stylelint (0.9s)
Finished eslint (2.0s)
Finished phpstan (2.1s)
Finished builtin (9.9s)
Running removing temporary files...
Finished removing temporary files (13.8s)

phpstan.neon
  1  error    [phpstan/error]  failed to unmarshal phpstan output: Note: Using configuration file phpstan.neon.

In Resolver.php line 114:

  Service 'rules.37': Class 'Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules
  \McpReservedToolGroupRule' not found.


analyse [-c|--configuration CONFIGURATION] [-l|--level LEVEL] [--no-progress] [--debug] [-a|--autoload-file AUTOLOAD-FILE] [--error-format ERROR-FORMAT] [-b|--generate-baseline [GENERATE-BASELINE]] [--allow-empty-baseline] [--memory-limit MEMORY-LIMIT] [--xdebug] [--tmp-file TMP-FILE] [--instead-of INSTEAD-OF] [--fix] [--watch] [--pro] [--fail-without-result-cache] [--] [<paths>...]



src/Resources/app/administration/src/module/swag-migration/component/swag-migration-error-resolution/swag-migration-error-resolution-modal/swag-migration-error-resolution-modal.scss
  59  warning  [stylelint/max-nesting-depth]  Too deep nesting, maximum 3 (max-nesting-depth)
  67  warning  [stylelint/max-nesting-depth]  Too deep nesting, maximum 3 (max-nesting-depth)

src/Resources/app/administration/src/module/swag-migration/page/swag-migration-process-screen/swag-migration-process-screen.scss
  26  warning  [stylelint/max-nesting-depth]  Too deep nesting, maximum 3 (max-nesting-depth)
  46  warning  [stylelint/max-nesting-depth]  Too deep nesting, maximum 3 (max-nesting-depth)
  67  warning  [stylelint/max-nesting-depth]  Too deep nesting, maximum 3 (max-nesting-depth)

Checkers:
  builtin          invoked
  eslint           invoked
  phpstan          invoked
  storefront-twig  invoked
  stylelint        invoked

✖ 6 problems (1 error, 5 warnings)
ERROR   found errors

extension validate with CTRL+c during copying files

❯ shopware-cli extension validate .
Running copying files (use "--no-copy" to skip)...
^CFailed copying files (use "--no-copy" to skip) (1.6s)
Running removing temporary files...
Finished removing temporary files (2.1s)
ERROR   context canceled

project validate

❯ shopware-cli project validate
Running copying files (use "--no-copy" to skip)...
Finished copying files (use "--no-copy" to skip) (5.7s)
Running discovering project configuration...
Finished discovering project configuration (0.3s)
Running preparing tools...
Finished preparing tools (0.0s)
Running stylelint...
Finished stylelint (0.0s)
Running builtin...
Finished builtin (0.0s)
Running phpstan...
Running eslint...
Finished eslint (0.0s)
Running storefront-twig...
Finished storefront-twig (0.0s)
Finished phpstan (0.0s)
Running removing temporary files...
Finished removing temporary files (6.6s)

Checkers:
  builtin          invoked
  eslint           invoked
  phpstan          invoked
  storefront-twig  invoked
  stylelint        invoked

✓ No problems found

project format

❯ shopware-cli project format
Running preparing tools...
Finished preparing tools (0.0s)
Running discovering project configuration...
Finished discovering project configuration (0.3s)
Running prettier...
Finished prettier (0.0s)
Running php-cs-fixer...
Finished php-cs-fixer (0.0s)

Checkers:
  php-cs-fixer  invoked
  prettier      invoked

✓ No problems found

project fix

❯ shopware-cli project fix
Running preparing tools...
Finished preparing tools (0.0s)
Running discovering project configuration...
Finished discovering project configuration (0.3s)
Running symfony-xml...
Finished symfony-xml (0.0s)
Running stylelint...
Finished stylelint (0.0s)
Running rector...
Running eslint...
Finished eslint (0.0s)
Finished rector (0.0s)

Fixers:
  eslint       invoked
  rector       invoked
  stylelint    invoked
  symfony-xml  invoked

Why?

Transparency on what the commands are working / waiting on and how long certain steps take. It also adds a hint to try the --no-copy flag for the validate commands, as that can speedup execution a lot.

How was this tested?

Just running any of the project or extension commands like validate, format and fix against some projects / extensions. Also trying CTRL+c to abort, which for now still does cleanup (just as before / didn't this behavior).

Related issue or discussion

closes #1674

Summary by CodeRabbit

  • New Features

    • Added progress reporting for extension and project fix, format, and validate commands.
    • Progress now shows key stages such as setup, configuration discovery, checks, cleanup, and completion status.
    • Operation results indicate whether each step finished successfully or failed.
  • Bug Fixes

    • Commands now respond consistently to cancellation during setup, formatting, fixing, and validation.
    • Validation cleanup and failure reporting are handled more reliably.
    • Progress output is shown for supported summary formats while remaining suppressed in other output modes.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fcc2cc89-d23c-41b2-8797-c9ec80209370
📥 Commits

Reviewing files that changed from the base of the PR and between 4af7965 and f5acdd3.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0b5a25f2-8825-432e-83c2-2105804af546
📥 Commits

Reviewing files that changed from the base of the PR and between 2cf5ba7 and 4af7965.

📒 Files selected for processing: 8
  • cmd/extension/extension_fix.go
  • cmd/extension/extension_format.go
  • cmd/extension/extension_validate.go
  • cmd/project/project_fix.go
  • cmd/project/project_format.go
  • cmd/project/project_validate.go
  • internal/verifier/progress.go
  • internal/verifier/progress_test.go

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

Project and extension fix, format, and validate commands now report progress for setup and execution steps. The commands use the command context for their operations and propagate cancellation errors. Validation commands also report file copying and temporary-directory cleanup.

Changes: Command progress reporting

Layer / File(s) Summary
Progress reporting implementation
internal/verifier/progress.go, internal/verifier/progress_test.go
Adds a reporter that writes running and completion messages to stderr for empty or summary formats, and discards output for other formats. Tests cover output selection and operation lifecycle messages.
Fix and format command progress
cmd/project/project_fix.go, cmd/project/project_format.go, cmd/extension/extension_fix.go, cmd/extension/extension_format.go
Project and extension fix and format commands report setup, configuration discovery, and per-tool progress. They pass the command context to operations and return cancellation errors when appropriate. Extension format and fix split tool setup and extension configuration conversion into separate steps.
Validation progress and cleanup
cmd/project/project_validate.go, cmd/extension/extension_validate.go
Validation commands report progress for copying, configuration discovery, tool setup, checks, and cleanup. They coordinate one-time temporary-directory cleanup and account for context cancellation.

Priority: ⬇️ Low

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Command as Validation command
  participant Progress as verifier.Progress
  participant Files as File copying
  participant Setup as Tool setup
  participant Checks as Validation checks
  Command->>Progress: Start copying step
  Command->>Files: Copy files with command context
  Files-->>Command: Copy result
  Command->>Progress: Complete copying step
  Command->>Progress: Start tool setup step
  Command->>Setup: Prepare tools
  Setup-->>Command: Setup result
  Command->>Progress: Complete tool setup step
  Command->>Progress: Start validation checks
  Command->>Checks: Run checks with command context
  Checks-->>Command: Check results
  Command->>Progress: Complete validation checks
Loading
Merge Risk: ⚪ Minimal · up to 4af79

No merge-blocking issue was established for the progress-reporting changes; merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: progress reporting for project and extension validate, format, and fix commands.
Description check Passed The description includes all required sections, explains the changes and motivation, provides output examples, documents testing, and links the related issue.
Linked Issues check Passed Issue #1674 requires progress output for the six project and extension commands and a copying step with a --no-copy hint. The command diffs add progress for setup, configuration discovery, copyi…
Out of Scope Changes check Passed The changes remain within issue #1674. The context propagation, cleanup handling, tool setup split, and progress helper support progress reporting and cancellation behavior for the six targeted comman…
Full details: Linked Issues check

Explanation

Issue #1674 requires progress output for the six project and extension commands and a copying step with a --no-copy hint. The command diffs add progress for setup, configuration discovery, copying or archive extraction, cleanup, and each selected tool. internal/verifier/progress.go prints start and completion lines with elapsed time for summary and empty report formats. The copying title includes --no-copy. The optional per-tool status is also implemented. internal/verifier/progress_test.go covers output format selection and lifecycle output.

Full details: Out of Scope Changes check

Explanation

The changes remain within issue #1674. The context propagation, cleanup handling, tool setup split, and progress helper support progress reporting and cancellation behavior for the six targeted commands. The progress helper tests directly support the new behavior. No unrelated feature or unrelated file change is shown.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 12.72727% with 144 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.48%. Comparing base (79b2d91) to head (f5acdd3).

Files with missing lines Patch % Lines
cmd/extension/extension_validate.go 0.00% 42 Missing ⚠️
cmd/project/project_validate.go 0.00% 35 Missing ⚠️
cmd/extension/extension_fix.go 0.00% 20 Missing ⚠️
cmd/extension/extension_format.go 0.00% 20 Missing ⚠️
cmd/project/project_format.go 0.00% 18 Missing ⚠️
cmd/project/project_fix.go 50.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1718      +/-   ##
==========================================
- Coverage   66.66%   66.48%   -0.18%     
==========================================
  Files         475      476       +1     
  Lines       32257    32380     +123     
==========================================
+ Hits        21504    21528      +24     
- Misses      10753    10852      +99     
Flag Coverage Δ
go-test 66.48% <12.72%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

Left two comments regarding out cleanup handling. However, other solutions cause new trade offs too, so we can keep the current solution. Maybe when we introduce fancy TTY output we should refactor this.

Comment thread cmd/extension/extension_validate.go
Comment thread cmd/project/project_validate.go
Comment thread internal/verifier/progress.go
@MalteJanz
Malte Janz (MalteJanz) merged commit 9028d35 into main Oct 22, 2026
5 checks passed
@MalteJanz
Malte Janz (MalteJanz) deleted the feat/report-progress-on-project-extension-validate-format-fix branch October 22, 2026 14:22
@github-actions

Copy link
Copy Markdown
Contributor

This PR adds stderr progress reporting (Running ... / Finished ... / Failed ... lines with elapsed time) for extension validate, project validate, extension fix, project fix, extension format, and project format when using the default/summary report format — new user-facing CLI behavior.

I opened a draft documentation PR in shopware/docs: #aw_pr1

It adds a "Progress reporting" section to products/tools/cli/validation.md (describing the stages reported, failure/cancellation behavior, and which --format values suppress it) plus short cross-reference notes in products/tools/cli/formatter.md and products/tools/cli/automatic-refactoring.md.

cc Malte Janz (@MalteJanz)

@MalteJanz

Malte Janz (MalteJanz) commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Regarding the automated comment above^^:

Is it only me that finds them a bit annoying? Just a couple of thoughts:

  • it doesn't even properly link the created PR, maybe a bug? #aw_pr1 doesn't help me
  • it doesn't assign me or ask me for review in the created PR, its basically lost until someone picks it up. I manually found it here: [docs] Document progress reporting for validate/format/fix commands docs#2660
  • in this case it said it found "new user-facing CLI behavior" but in reality the behavior is the same, just some more detailed output was added, which I think isn't worth documenting
  • in general it often tries to document every little detail in a very verbose way (just an example). And thus it might unnecessarly bloat our documentation if nobody cares about the big picture and stops it more often
  • and besides all of that you end up with multiple smaller PRs (which is good) but you then have to coordinate when they are all ready to be merged, as you often have to wait for another release
    • I guess I'm not allowed to open the topic of having docs in the same repo as the code again but I would find that so much easier than this automation or the alternative to have both repos checked out and tell your agent to make changes to the docs at the same time...

@shopware/product-dx maybe it's just me but my questions are:

  1. who maintains this automation, would be able to act on this feedback? Or do we need to own it ourselves?
  2. What is your experience with this automation?

*small rant over 😅 , please don't take any of this personal I just want us to improve and deliver faster with better docs ✌️

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.

Report progress on project / extension commands: validate / format / fix

4 participants