Skip to content

Updates: sync as per latest cloud specs#103

Open
ItzNotABug wants to merge 3 commits intomainfrom
sync-dev-cloud
Open

Updates: sync as per latest cloud specs#103
ItzNotABug wants to merge 3 commits intomainfrom
sync-dev-cloud

Conversation

@ItzNotABug
Copy link
Contributor

@ItzNotABug ItzNotABug commented Jan 15, 2026

What does this PR do?

Changes as per latest server specs, these include -

  1. Updates to Runtime enums
  2. Output is now correctly renamed to ImageFormat
  3. Introduces Backups module for managing Database backups
  4. Introduces Organization module

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

Release Notes – Version 20.1.2

  • New Features

    • File storage now includes encryption and compression metadata properties.
  • Breaking Changes

    • Removed OAuth provider options (mock, mockUnverified, githubImagine, googleImagine).
    • Removed five health queue monitoring endpoints.
    • Database and table attribute/column methods now return raw response data instead of typed models.
  • Documentation

    • Removed example code for deprecated health endpoints.

✏️ Tip: You can customize this high-level summary in your review settings.

@ItzNotABug ItzNotABug self-assigned this Jan 15, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

Walkthrough

This PR increments the SDK version from 20.1.1 to 20.1.2 across configuration and client files. It removes five health queue monitoring methods (getQueueBillingProjectAggregation, getQueueBillingTeamAggregation, getQueuePriorityBuilds, getQueueRegionManager, getQueueThreats) from the Health service along with corresponding documentation examples and test cases. The getAttribute method in Databases and getColumn method in TablesDB are modified to return generic Future instead of typed model instances. The File model gains two new fields (encryption: bool, compression: String) with updated serialization logic. Four OAuth provider enum members (mock, mockUnverified, githubImagine, googleImagine) are removed. Tests are updated to reflect the File model changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~40 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic—'Updates: sync as per latest cloud specs' uses non-descriptive language that doesn't convey the specific changes (method removals, API changes, model updates, version bump). Provide a more specific title that highlights key changes, such as 'Update SDK to version 20.1.2: remove deprecated health queue methods and update File model' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@lib/src/models/file.dart`:
- Around line 73-74: The assignment for the encryption field uses
map['encryption'] directly which can be null and cause a TypeError; in the File
model constructor replace direct use of map['encryption'] with a null-safe
default (e.g. map['encryption'] ?? false or another appropriate default for the
encryption field type) so encryption is never null, keeping compression as-is
(compression: map['compression'].toString()) and updating any type annotations
if needed to reflect the non-nullable default.
🧹 Nitpick comments (1)
lib/services/tables_db.dart (1)

1166-1183: Breaking change: Return type now dynamic for polymorphic column types.

The change from Future<models.ColumnBoolean> to untyped Future is semantically correct since this endpoint returns different column types. However, since this is the recommended API (replacing deprecated Databases.getAttribute), consider adding a doc comment clarifying the expected return type and how callers should handle it.

📝 Suggested documentation improvement
-  /// Get column by ID.
+  /// Get column by ID.
+  /// 
+  /// Returns the raw column data as a [Map<String, dynamic>]. The shape of the
+  /// response varies based on the column type (boolean, string, integer, etc.).
   Future getColumn(
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2dc6d1e and 8198231.

📒 Files selected for processing (18)
  • CHANGELOG.md
  • README.md
  • docs/examples/health/get-queue-billing-project-aggregation.md
  • docs/examples/health/get-queue-billing-team-aggregation.md
  • docs/examples/health/get-queue-priority-builds.md
  • docs/examples/health/get-queue-region-manager.md
  • docs/examples/health/get-queue-threats.md
  • lib/services/databases.dart
  • lib/services/health.dart
  • lib/services/tables_db.dart
  • lib/src/client_browser.dart
  • lib/src/client_io.dart
  • lib/src/enums/o_auth_provider.dart
  • lib/src/models/file.dart
  • pubspec.yaml
  • test/services/health_test.dart
  • test/services/storage_test.dart
  • test/src/models/file_test.dart
💤 Files with no reviewable changes (7)
  • docs/examples/health/get-queue-billing-project-aggregation.md
  • docs/examples/health/get-queue-billing-team-aggregation.md
  • docs/examples/health/get-queue-priority-builds.md
  • docs/examples/health/get-queue-threats.md
  • test/services/health_test.dart
  • lib/services/health.dart
  • docs/examples/health/get-queue-region-manager.md
🧰 Additional context used
🪛 LanguageTool
CHANGELOG.md

[grammar] ~353-~353: Use a hyphen to join words.
Context: ...write 0.10 - Refactored for better cross platform support - Exception implements ...

(QB_NEW_EN_HYPHEN)

🪛 markdownlint-cli2 (0.18.1)
CHANGELOG.md

6-6: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


7-7: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


8-8: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


9-9: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


111-111: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


137-137: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


138-138: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


139-139: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


140-140: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


192-192: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


193-193: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


194-194: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


195-195: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


196-196: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


197-197: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


263-263: Bare URL used

(MD034, no-bare-urls)


283-283: Bare URL used

(MD034, no-bare-urls)


300-300: Bare URL used

(MD034, no-bare-urls)


301-301: Bare URL used

(MD034, no-bare-urls)


321-321: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (11)
pubspec.yaml (1)

1-16: LGTM!

Version bump to 20.1.2 is consistent with the SDK header updates in client files and the CHANGELOG entry.

README.md (1)

22-25: LGTM!

Installation example correctly updated to reflect the new SDK version 20.1.2.

lib/src/client_browser.dart (1)

31-38: LGTM!

The x-sdk-version header is correctly updated to 20.1.2, consistent with the version in pubspec.yaml.

lib/src/client_io.dart (1)

40-49: LGTM!

Both x-sdk-version header and user-agent string are correctly updated to 20.1.2, maintaining consistency with the package version.

CHANGELOG.md (1)

3-10: LGTM!

The changelog entry for 20.1.2 appropriately documents:

  • Runtime enum updates
  • Breaking change for OutputImageFormat rename (correctly flagged)
  • New Backups and Organization modules

The nested list indentation at 4 spaces is consistent with the existing style throughout this file.

lib/services/databases.dart (1)

1246-1263: LGTM - Return type change is appropriate for polymorphic response.

The change from Future<models.AttributeBoolean> to untyped Future makes sense since this endpoint can return different attribute types (boolean, string, integer, etc.). The previous typed return was incorrect. Since the method is deprecated in favor of TablesDB.getColumn, the impact on consumers is limited.

lib/src/models/file.dart (1)

38-42: LGTM - New fields properly documented.

The new encryption and compression fields are well documented with appropriate comments explaining their purpose and expected values.

test/services/storage_test.dart (1)

198-199: LGTM - Test data correctly updated.

The test data for createFile, getFile, and updateFile tests now includes the new encryption and compression fields, properly aligning with the File model changes.

lib/src/enums/o_auth_provider.dart (1)

42-42: Breaking change: OAuth provider enum members removed.

The removal of mock, mockUnverified, githubImagine, and googleImagine enum members is a breaking API change. External SDK consumers referencing these values will fail to compile after upgrading. No internal usages of these removed members exist in the codebase.

test/src/models/file_test.dart (2)

19-20: LGTM!

The new encryption and compression fields are properly added to the test model constructor, consistent with the File model updates.

Consider adding a second test case with encryption: false to ensure both boolean states serialize correctly, though this is optional.


37-38: LGTM!

The assertions properly validate the round-trip serialization/deserialization of the new encryption and compression fields, following the established pattern for other model fields.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +73 to +74
encryption: map['encryption'],
compression: map['compression'].toString(),
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Potential null safety issue with encryption field.

The encryption field is assigned directly from the map without null checking. If the server response omits this field or returns null, this will throw a TypeError at runtime. Consider adding a null check with a default value for robustness.

🛡️ Suggested defensive handling
-      encryption: map['encryption'],
+      encryption: map['encryption'] ?? false,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
encryption: map['encryption'],
compression: map['compression'].toString(),
encryption: map['encryption'] ?? false,
compression: map['compression'].toString(),
🤖 Prompt for AI Agents
In `@lib/src/models/file.dart` around lines 73 - 74, The assignment for the
encryption field uses map['encryption'] directly which can be null and cause a
TypeError; in the File model constructor replace direct use of map['encryption']
with a null-safe default (e.g. map['encryption'] ?? false or another appropriate
default for the encryption field type) so encryption is never null, keeping
compression as-is (compression: map['compression'].toString()) and updating any
type annotations if needed to reflect the non-nullable default.

@ItzNotABug ItzNotABug closed this Feb 9, 2026
@ItzNotABug ItzNotABug reopened this Feb 9, 2026
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