Skip to content

feat(cli): add shares clean-orphaned-grants command - #4082

Open
dragonchaser wants to merge 5 commits into
opencloud-eu:mainfrom
dragonchaser:backport-wp3-784
Open

dragonchaser wants to merge 5 commits into
opencloud-eu:mainfrom
dragonchaser:backport-wp3-784

Conversation

@dragonchaser

Copy link
Copy Markdown
Member

Adds opencloud shares clean-orphaned-grants, which reports storage grants without a share (and shares without a grant) and removes them with --dry-run=false, and makes move-stuck-upload-blobs fail on a wrong base path; builds on the move-stuck-upload-blobs backport. Caution: on a test instance the non-dry run deleted the share lists of all scanned spaces from disk, and --force wiped the share-manager metadata even in a dry run.

AI assistance: Claude Code (claude-opus-5-5) ported the commits to the cobra CLI and tested the command on a throwaway instance.

@codacy-production

codacy-production Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 201 complexity

Metric Results
Complexity 201

View in Codacy

🟢 Coverage 0.82% diff coverage · -0.22% coverage variation

Metric Results
Coverage variation ✅ -0.22% coverage variation (-1.00%)
Diff coverage ✅ 0.82% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (2dc0668) 94300 28339 30.05%
Head commit (6481ee9) 95010 (+710) 28345 (+6) 29.83% (-0.22%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4082) 729 6 0.82%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

They rewrote or deleted the share lists of all scanned spaces on disk,
and --force deleted all share-manager metadata, even in a dry run.
The scans and the gateway calls stay; the stale-share cleanup no
longer runs in a dry run.

Assisted-by: Claude Code:claude-opus-5-5
@dragonchaser
dragonchaser marked this pull request as ready for review November 20, 2026 14:48
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