Skip to content

Materialization: Add new capabilities for updates/deletes (experimental)#1949

Merged
splindsay-92 merged 1 commit intomainfrom
materialisation/add-new-capabilities-for-operations
Mar 17, 2025
Merged

Materialization: Add new capabilities for updates/deletes (experimental)#1949
splindsay-92 merged 1 commit intomainfrom
materialisation/add-new-capabilities-for-operations

Conversation

@splindsay-92
Copy link
Copy Markdown
Contributor

@splindsay-92 splindsay-92 commented Jan 15, 2025

Context

CHA-689

To support the new experimental update/delete features, 4 new capabilities have been added. These can be provided in a token to grant access to the new features.

Own/Any Distinction

  • Provide the message-update-own (or message-delete-own) capability to allow a client to update/delete their own messages, i.e. those publish to the channel with the same clientId.
  • Provide the message-update-any (or message-delete-any) capability to allow a client to update/delete any message in the channel, regardless of the message publisher.
  • Messages published without a clientId require the message-update-any (or message-delete-any) capability to be updated/deleted.
  • When making update/deletion requests without supplying a clientId, the message-update-any (or message-delete-any) capability is required.

Summary by CodeRabbit

  • New Features
    • Introduced granular messaging permissions that allow finer control over message updates and deletions, distinguishing between actions on users' own messages and all messages.

@splindsay-92 splindsay-92 added the blocked-by-ably We can't proceed until something under our direct control, in a different codebase, happens. label Jan 15, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 15, 2025

Walkthrough

The pull request updates the TypeScript declaration file ably.d.ts by extending the capabilityOp type. Four new string literal types—'message-update-any', 'message-update-own', 'message-delete-any', and 'message-delete-own'—have been added. These additions allow for more granular control over message update and deletion permissions while leaving the existing capability types unchanged.

Changes

File Change Summary
ably.d.ts Modified the capabilityOp type by adding 'message-update-any', 'message-update-own', 'message-delete-any', and 'message-delete-own' to the union.

Poem

I'm a hopping rabbit, full of cheer,
New capabilities now appear.
Message updates and deletes in sight,
Guiding our tokens with fresh insight.
Code hops along with a joyful beat,
In every change, innovation is sweet!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7d8181 and 21b1671.

📒 Files selected for processing (1)
  • ably.d.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: test-node (16.x)
  • GitHub Check: test-browser (webkit)
  • GitHub Check: test-browser (firefox)
🔇 Additional comments (1)
ably.d.ts (1)

714-717: Excellent addition of new capabilities for message updates and deletions!

These four new capabilities align perfectly with the PR objectives and provide the necessary granularity for controlling update and delete operations:

  • message-update-any: Update any message in the channel
  • message-update-own: Update only your own messages
  • message-delete-any: Delete any message in the channel
  • message-delete-own: Delete only your own messages

This implementation enables fine-grained access control for the experimental message update/delete features.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot temporarily deployed to staging/pull/1949/bundle-report January 15, 2025 15:47 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1949/features January 15, 2025 15:47 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1949/typedoc January 15, 2025 15:47 Inactive
- Added the new capabilities to the d.ts file so they can be used in token generation.
@splindsay-92 splindsay-92 force-pushed the materialisation/add-new-capabilities-for-operations branch from ca85237 to 21b1671 Compare March 10, 2025 10:50
@splindsay-92 splindsay-92 removed the blocked-by-ably We can't proceed until something under our direct control, in a different codebase, happens. label Mar 10, 2025
@splindsay-92 splindsay-92 marked this pull request as ready for review March 10, 2025 11:57
@splindsay-92 splindsay-92 merged commit 4035361 into main Mar 17, 2025
14 checks passed
@splindsay-92 splindsay-92 deleted the materialisation/add-new-capabilities-for-operations branch March 17, 2025 10:23
VeskeR added a commit that referenced this pull request Apr 16, 2025
VeskeR added a commit that referenced this pull request Apr 16, 2025
This commit merges changes from the next PRs:
- #2001
- #2002
- #2000
- #1953
- #1989
- #1988
- #1984
- #1949
- #1980
- #1979
- #1978
- #1976
- #1962
- #1959
- #1955
- #1957
- #1940
- #1925
- #1947
- #1946
- #1945
- #1944

into the integration/liveobjects branch. No significant changes made
during merge conflict resolution.
VeskeR added a commit that referenced this pull request Apr 16, 2025
This commit merges changes from the next PRs:
- #2001
- #2002
- #2000
- #1953
- #1989
- #1988
- #1984
- #1949
- #1980
- #1979
- #1978
- #1976
- #1962
- #1959
- #1955
- #1957
- #1940
- #1925
- #1947
- #1946
- #1945
- #1944

into the integration/liveobjects branch. No significant changes made
during merge conflict resolution.
VeskeR added a commit that referenced this pull request Apr 16, 2025
This commit merges changes from the next PRs:
- #2001
- #2002
- #2000
- #1953
- #1989
- #1988
- #1984
- #1949
- #1980
- #1979
- #1978
- #1976
- #1962
- #1959
- #1955
- #1957
- #1940
- #1925
- #1947
- #1946
- #1945
- #1944

into the integration/liveobjects branch. No significant changes made
during merge conflict resolution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants