Skip to content

fix(backups): accept pending lifecycle response values - #9

Open
HarshMN2345 wants to merge 2 commits into
mainfrom
codex/sentry-backup-models
Open

fix(backups): accept pending lifecycle response values#9
HarshMN2345 wants to merge 2 commits into
mainfrom
codex/sentry-backup-models

Conversation

@HarshMN2345

@HarshMN2345 HarshMN2345 commented Sep 10, 2026

Copy link
Copy Markdown
Member

Pending backup responses and restoration options currently fail model validation after successful API requests. Regenerate the two backup models from the corrected Cloud OpenAPI declarations in cloud#5760: pending size/start times are nullable and restoration options are an object. Keep policyId as the established string response, including "" for ad-hoc backups. Cloud's required/default response rule already converts stored null policy IDs to that empty string before serialization.

Extend the existing BackupsServiceTest cases for pending archive/restoration creation, completed ad-hoc archive retrieval, and populated restoration get/list responses. No new test class or runtime adapter is added.

Addresses MCP-Y, MCP-1K, MCP-1M, and MCP-1R.

Validation:

  • Four regression cases fail with the original models and pass with the regenerated models; all 1,055 unit/service tests pass. Black passes for the changed files.
  • Both model files are byte-identical to output from Cloud's OpenAPI formatter and locked Python generator.
  • Actual Cloud Response::output() JSON passes through this SDK and the public MCP handler using a disposable local HTTP server, preserving null lifecycle fields, empty objects, and nested Unicode resource mappings. Completed ad-hoc archive responses also remain accepted by the released SDK.

Deployment order: Cloud#5760 must deploy first so empty options arrive as {}. Then publish this SDK under a new version and update/deploy MCP with that version in its lockfile. The currently locked SDK0.6.0 is not updated by merging these PRs alone.

@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no outstanding correctness, security, or repository-rule violations remain.

Summary

  • Makes archive size and start time nullable.
  • Makes restoration start time nullable and models restoration options as an object.
  • Adds observable service-level regression coverage for pending, completed, empty, and populated responses.
  • Preserves the established serialized policyId: "" contract for ad-hoc backups.

Reviews (3) 路 Last reviewed commit: "fix(backups): preserve string policy IDs..."

Comment thread appwrite_console/models/backup_archive.py
@HarshMN2345

Copy link
Copy Markdown
Member Author

@greptile-apps review

Please re-review the current commit with the serialization evidence in the policy-ID discussion. Cloud's required/default response rule turns stored null policy IDs into empty strings; the corrected Cloud commit preserves that existing HTTP contract. The current SDK models are byte-identical to regeneration from that schema, and the old/new Cloud+SDK drill confirms released clients still accept completed ad-hoc archives. The four actual Sentry size/start/options regressions are still fixed.

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.

1 participant