Skip to content

fix(postprocessing): add output and fix --restart flag for resume command#12002

Merged
kobergj merged 1 commit intoowncloud:masterfrom
paul43210:fix/postprocessing-resume-output
Feb 10, 2026
Merged

fix(postprocessing): add output and fix --restart flag for resume command#12002
kobergj merged 1 commit intoowncloud:masterfrom
paul43210:fix/postprocessing-resume-output

Conversation

@paul43210
Copy link
Contributor

Summary

Fixes #11692ocis postprocessing resume produces no output and the --restart flag is broken.

  • Flag mismatch: c.Bool("retrigger") referenced a non-existent flag — corrected to c.Bool("restart") so the --restart / -r flag actually triggers RestartPostprocessing events
  • No output: The command now connects to the postprocessing store, queries matching uploads, and displays them in a table before publishing events
  • New --json flag: Outputs matched uploads as a JSON array for scripting
  • Empty store handling: Gracefully handles empty NATS KV buckets instead of returning an error

Example output

$ ocis postprocessing resume --step finished
┌──────────────────────────────────────┬──────────────┬──────┬──────────┬──────────┬──────┐
│              UPLOAD ID               │   FILENAME   │ SIZE │   STEP   │ FINISHED │ USER │
├──────────────────────────────────────┼──────────────┼──────┼──────────┼──────────┼──────┤
│ a5b81897-0471-4ca0-9965-259263363f35 │ New file.txt │ 4    │ finished │ false    │ paul │
└──────────────────────────────────────┴──────────────┴──────┴──────────┴──────────┴──────┘

Resumed 1 upload(s) at step "finished"

Test plan

  • ocis postprocessing resume --step finished — shows table of uploads and count
  • ocis postprocessing resume --upload-id <id> — shows single upload
  • ocis postprocessing resume --restart --upload-id <id> — uses RestartPostprocessing event
  • ocis postprocessing resume --json --step finished — outputs valid JSON array
  • ocis postprocessing resume --step finished on empty store — prints "No uploads found" gracefully

🤖 Generated with Claude Code

@mmattel
Copy link
Contributor

mmattel commented Feb 9, 2026

@paul43210 pls add a small update of the postprocessing readme

@jvillafanez
Copy link
Member

I've commented on the linked ticket.
I'd keep the PR on hold for now. For me, this is a non-issue, so showing a "success" message is a nice-to-have. If this is the case, this PR is too much for a "we did what you asked" message.

If we need to show what is the postprocessing state, it should have its own command.

From my point of view, the PR should just fix the issue with the invalid / missing flag. If you want to be nice, you can show a simple output on success. Changes should be around 5 lines of code. The rest seems a different feature.

The `--restart` / `-r` flag checked `c.Bool("retrigger")` instead of
`c.Bool("restart")`, so it silently did nothing. Fix the flag name and
add a simple confirmation message on success.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@paul43210 paul43210 force-pushed the fix/postprocessing-resume-output branch from 72c1914 to 1e8d411 Compare February 9, 2026 23:32
@paul43210
Copy link
Contributor Author

Thanks for the feedback @jvillafanez — you're right, the store introspection was out of scope for this fix.

I've slimmed it down to just the essentials:

  1. Fixed c.Bool("retrigger")c.Bool("restart") so the --restart / -r flag actually works
  2. Added a simple success message after publishing the event

The diff is now ~5 lines of code across a single file + changelog. The store query / table output can be a separate feature if needed down the road.

@jvillafanez
Copy link
Member

I've restarted the CI because there were some unrelated test failures. Code looks fine.

@sonarqubecloud
Copy link

@kobergj kobergj merged commit 3d1b50c into owncloud:master Feb 10, 2026
5 checks passed
@kobergj
Copy link
Collaborator

kobergj commented Feb 10, 2026

@paul43210 merged. Thanks for the find and the fix!

ownclouders pushed a commit that referenced this pull request Feb 10, 2026
…tput

fix(postprocessing): add output and fix --restart flag for resume command
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.

[CLI] Empty output on postprocessing command

4 participants