Repository navigation
docs: fix upgrade docs for 1.0.0rc2 - #342
Conversation
Chart README: how to go back (the index blocks 1.0.0rc1), which packaged READMEs can't add later. Recovery of misrouted roles also for downgrades and grants of maintainer. Kept invitations also keep their creators. The steps of the upgrade guide add up; name the matching version of the UI. Identifiers: the segments . and .. are refused anywhere. Closes #338 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Reviewer's GuideUpdates the deployment and upgrade documentation for 1.0.0rc2 by documenting rollback/index recovery, cumulative upgrade handling, corrected permission migration, invitation metadata retention, identifier restrictions, and the required cloud-registry-ui rc2 version. Sequence diagram for 1.0.0rc2 rollback recoverysequenceDiagram
participant Operator
participant Helm
participant App
participant MongoDB
Operator->>Helm: helm rollback
Helm->>App: Start 1.0.0rc1 pod
App->>MongoDB: Check indexes
MongoDB-->>App: expires_at_1 conflicts
App-->>Helm: Startup failure
Operator->>App: Scale app to 0 replicas
Operator->>MongoDB: dropIndex(expires_at_1)
Operator->>Helm: Move clients back and deploy 1.0.0rc1
Helm->>App: Start 1.0.0rc1 pod
App->>MongoDB: Start successfully
Sequence diagram for corrected permission migrationsequenceDiagram
participant Admin
participant PermissionsAPI
Admin->>PermissionsAPI: GET /services/<id>/permissions
PermissionsAPI-->>Admin: Identify roles on users/<user-id>
Admin->>PermissionsAPI: PUT /services/<id>/permissions/users/<user-id>
PermissionsAPI-->>Admin: Grant role to <user-id>
Admin->>PermissionsAPI: DELETE /services/<id>/permissions/users/users/<user-id>
PermissionsAPI-->>Admin: Revoke legacy role
State diagram for invitation retention after role revocationstateDiagram-v2
[*] --> Open
Open --> Accepted: Accept invitation
Open --> Expired: expiry reached
Open --> Expired: creator role revoked
Expired --> Removed: retention period ends
Open --> Removed: keep_expired_days = 0
Accepted --> Removed: expiry and cleanup
Open --> Open: Remains listed with creator metadata
Flow diagram for cumulative version upgradesflowchart TD
Start[Skipping versions] --> Oldest[Apply oldest version section first]
Oldest --> Next[Apply each intervening version section]
Next --> Strictest[Follow the strictest rollout guidance]
Strictest --> Target[Complete upgrade to 1.0.0rc2]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #342 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 22 22
Lines 2406 2406
=========================================
Hits 2406 2406 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/access-control.md" line_range="404-406" />
<code_context>
+ within about a minute. Owners can remove expired ones earlier. Until then,
+ invitations that weren't accepted keep their label, and who created them and
+ when (`created_by`, `created_as`, `created_at`), and current owners see the
+ creators. Revoking a role only cleans the invitations that the user accepted,
+ not those they created: these stay listed, also as `open` until they expire,
+ although accepting them then returns `404` (see **Creators**).
- **Limit:** a service has at most
`custom.access_control.invitations.max_per_service` invitations that
</code_context>
<issue_to_address>
**Admin-created invitations remain usable**
When an invitation was created as admin and that creator’s service role is revoked, `_creator_may_grant` accepts invitations recorded as admin regardless of the creator’s service role, so their links can still grant roles despite the docs saying acceptance returns `404`; operators may leave live links unrevoked.
Limit the `404` claim to invitations whose recorded creator authority was lost, and clarify that other open invitations can remain usable and should be explicitly revoked if no longer wanted.
</issue_to_address>
### Comment 2
<location path="deployment/README.md" line_range="902-905" />
<code_context>
+ rollback`, `helm upgrade --atomic` and automatic reverts of GitOps tools don't
+ get the app running again by themselves, and neither does a pod of 1.0.0rc1
+ that restarts during a rolling update. Data is kept. To go back, scale the app
+ to 0 replicas and move clients back, remove
+ `config.custom.access_control.invitations.keep_expired_days` from your values
+ if you set it, which 1.0.0rc1 refuses, and drop the index first (if the app
+ only ran with `keep_expired_days: 0`, it doesn't conflict). Without
+ authentication, omit `-u`, `-p` and `--authenticationDatabase`:
+
</code_context>
<issue_to_address>
**Rollback index gets recreated**
When the scale-to-zero has been accepted but a 1.0.0rc2 pod is still starting when the index is dropped, `mongosh ... dropIndex("expires_at_1")` removes the index, then the still-starting 1.0.0rc2 pod's startup `apply_keep_expired_days()` recreates it; 1.0.0rc1 still fails with the index conflict, so the rollback does not recover.
Wait until all 1.0.0rc2 pods have terminated before dropping the index, and ensure no controller scales them back up before the old version starts.
</issue_to_address>
### Comment 3
<location path="docs/upgrading.md" line_range="81-82" />
<code_context>
- on 1.0.0rc1 `DELETE /services/<id>/permissions/users/<user-id>`).
+ revoked (`409 Conflict`). Such a role can also be a grant of `maintainer`
+ or a downgrade, after which `<user-id>` still has their former role. So for
+ each rule, admins first grant its role (`v1`) to `<user-id>`, and then revoke
+ `users/<user-id>` (`DELETE /services/<id>/permissions/users/users/<user-id>`,
+ on 1.0.0rc1 `DELETE /services/<id>/permissions/users/<user-id>`). Also check
+ the other role changes of the rollout: a revocation that reached such a pod
</code_context>
<issue_to_address>
**Only-owner downgrade cannot be repaired**
When the misrouted maintainer role is a downgrade of the service’s only owner, the prescribed grant of `maintainer` to `<user-id>` returns `409` because `put_role` rejects downgrading the only owner, so admins cannot complete the recovery sequence and the intended downgrade is lost.
Document a recovery sequence that handles the only-owner case without attempting the rejected grant.
</issue_to_address>Linked issues
#338 docs: fix upgrade docs for 1.0.0rc2 · 6 of 6 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Document the 1.0.0rc1 rollback failure and give the steps to drop the index, remove keep_expired_days, and link the upgrade guide. | ✅ Met | The chart README explains when 1.0.0rc1 pods fail to start, covers rollback and restart scenarios, gives the recovery steps and command, and links the upgrade guide. |
| 2 | Recover misrouted roles by granting the role to before revoking users/, and check other role changes made during the rollout. | ✅ Met | The upgrade steps cover grants of maintainer and downgrades, give the grant-then-revoke order, and warn that rollout revocations may not have revoked the intended user's role. |
| 3 | Document retained invitation creators and timestamps, retention duration, creator visibility, and removed-owner invitations remaining open until expiry despite acceptance returning 404. | ✅ Met | The upgrade guide names the retained fields and default maximum duration; the access-control Removal section explains visibility and the behavior of invitations created by users who lost their role. |
| 4 | Say that upgrade steps accumulate when skipping versions. | ✅ Met | The upgrading guide instructs readers to apply all intervening sections from oldest to newest and follow the strictest rollout guidance. |
| 5 | Name the cloud-registry-ui version that uses the new paths and invitation status. | ✅ Met | The guide identifies version 1.0.0-rc2. |
| 6 | Correct the identifier documentation to say that the segments . and .. are refused anywhere, not only at the start. | ✅ Met | The access-control documentation now says identifiers containing those segments are refused. |
Sourcery assessment
Approval pending. 3 findings to address first.
Blocking findings: docs/access-control.md:406, deployment/README.md:905, docs/upgrading.md:82
Pods must have terminated before the index is dropped, as one still starting creates it again. A recovery step can return 409 if the service would have no owner left. Invitations created as an admin, or through a group that is still owner, stay valid after the creator's role is revoked. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Closes #338
Summary
Documentation lows of the 1.0.0rc2 pre-release review, before the tag, as packaged chart READMEs and the docs of a tag can't be changed afterwards:
helm rollback,--atomicand GitOps reverts don't get 1.0.0rc1 running by themselves once a pod of this version has started; a new bullet has the steps, the command and the link to the upgrade guide.maintaineror a downgrade, so apply its role to<user-id>first, then revokeusers/<user-id>; also check other role changes of the rollout.1.0.0-rc2of cloud-registry-ui, which is to be tagged in lockstep with this release..and..are refused anywhere, not only at the start.Light lane: only docs change, no behaviour; I reviewed the diff myself.
Verification
mkdocs build --strict: passes.pytest tests/test_version_mentions.py tests/test_chart_readme.py tests/test_docs_hooks.py: 125 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Summary by Sourcery
Clarify 1.0.0rc2 upgrade, rollback, role migration, UI compatibility, and invitation privacy documentation.
Enhancements:
Documentation: