Skip to content

Conversation

@Shubham8287
Copy link
Contributor

@Shubham8287 Shubham8287 commented Jan 27, 2026

Description of Changes

Remove RLS bindings for 2.0.

API and ABI breaking changes

Older modules with RLS should continue to work.

Testing:

This PR is suppose to remove the interface, hence deletes smoketest and integration tests.
though we may want to keep some unit tests as we still support RLS in older modules. I will check for them before merging the PR.

Expected complexity level and risk

1

joshua-spacetime and others added 4 commits January 23, 2026 14:32
…ext (#4101)

# Description of Changes

Makes the `sender` field on `ViewContext` private and exposes a
`sender()` method. Does the same for `ReducerContext` and
`ProcedureContext`.

The purpose of this change: So that the host can determine if/when a
view invokes or reads the `sender`.

Currently, because `sender` is a field, the host assumes that it is
always read. This means views must be materialized per client, even if
the view doesn't actually depend on `sender`, resulting in data
duplication.

The initial solution for this problem was `AnonymousViewContext` which
doesn't have a `sender` field. The better solution is to make `sender` a
method so that it can call into the host and record when it's actually
invoked.

Note, this patch only updates the module API, so the current
implementation does not change. `ViewContext` views are still duplicated
across clients. Changing this requires a new host syscall and for
`sender()` to invoke that syscall. This however is backwards compatible
and can be done anytime after the module APIs for the other languages
(C#, TypeScript, C++) are updated.

Also note that `ReducerContext` and `ProcedureContext` were updated
purely for consistency. There are currently no plans to track reads of
`sender` in these contexts.

# API and ABI breaking changes

Breaks the rust module api.

# Expected complexity level and risk

1

# Testing

N/A
@Shubham8287 Shubham8287 force-pushed the shub/deprecate-rls branch 3 times, most recently from 40994e4 to 273d2a9 Compare January 27, 2026 15:08
@Shubham8287 Shubham8287 changed the title 2.0: deprecates RLS 2.0: Deprecate RLS Jan 27, 2026
@Shubham8287 Shubham8287 changed the title 2.0: Deprecate RLS 2.0: [Rust] Deprecate RLS Jan 27, 2026
Copy link
Contributor

@gefjon gefjon left a comment

Choose a reason for hiding this comment

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

That's... not really what deprecation is. This PR is just removing RLS. Deprecation would involve leaving the functionality in place, but with a warning that it should not be used and will be removed in the future.

That's not to say that we should deprecate RLS, we should definitely just remove it in 2.0 modules, 'cause the migration to views with the typed query builder is easy. Just, please change the PR title to "Remove RLS interface from bindings"

@Shubham8287 Shubham8287 changed the title 2.0: [Rust] Deprecate RLS 2.0: [Rust] Remove RLS bindings Jan 27, 2026
@Shubham8287 Shubham8287 changed the title 2.0: [Rust] Remove RLS bindings 2.0: [Rust] Remove RLS bindings [Not to merge] Jan 28, 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.

5 participants