Skip to content

idl: mark the RPCs still served while an org is restricted to read-only - #8345

Closed
afbrock wants to merge 3 commits into
mainfrom
adam/allowed-when-restricted
Closed

afbrock wants to merge 3 commits into
mainfrom
adam/allowed-when-restricted

Conversation

@afbrock

@afbrock afbrock commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Why are the changes needed?

A deployment can restrict an organization to read-only, for example when its billing access is disabled for an unpaid invoice. It then refuses every RPC with side effects except a small set that has to stay open: stopping work, and work that is already running reporting its progress. The deployment reads that set from the proto definitions, so the RPCs defined in flyteidl2 need a way to declare it. Some reads also declare no idempotency level, so they are treated as writes.

What changes were proposed in this pull request?

  • Add flyteidl2/common/rpc_options.proto, which defines the method option allowed_when_restricted (field 50101).
  • Set it on:
    • RunService AbortRun, AbortAction, SignalEvent
    • TrackedRunService AbortRun, ReportActions
    • ActionsService Enqueue, Update, Abort, Signal. The comment on Enqueue notes that only child actions are served for a restricted org, since a root action starts a new run.
    • AppService Delete, Lease, UpdateStatus
    • TriggerService DeleteTriggers
  • Declare idempotency_level = NO_SIDE_EFFECTS on reads that declared no level: DataProxyService/CreateDownloadLink, SecretService/GetSecret, IdentityService/UserInfo, and the AsyncConnectorService and ConnectorMetadataService reads.
  • Regenerate the Go, Python, TypeScript and Rust code.

Nothing in this repository reads the new option, so behavior here is unchanged. The NO_SIDE_EFFECTS declarations let connect clients send those RPCs as HTTP GET requests.

How was this patch tested?

  • buf format and buf lint pass, and the generated Go builds.
  • In the Union control plane that consumes this option, unit tests check that it resolves for these RPCs. An end-to-end run against a local deployment confirmed that a restricted org can still abort runs, report progress from running tasks and enqueue child actions, and is refused when it starts a new run.

🤖 Generated with Claude Code

Add a flyteidl2.common.allowed_when_restricted method option for RPCs that
have side effects but stay open for an org restricted to read-only:
stopping work (AbortRun, AbortAction, DeleteTriggers, app Delete) and work
already running (ActionsService Update/Signal/Enqueue, SignalEvent,
TrackedRunService ReportActions, app Lease/UpdateStatus). A deployment that
restricts an org refuses every other RPC with side effects. Enqueue stays
open for child actions only; a root action starts a new run.

Mark reads that declared no idempotency level as NO_SIDE_EFFECTS:
CreateDownloadLink, GetSecret, UserInfo, and the connector reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Adam Brock <adam@union.ai>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

This PR was flagged by our automated quality checks. If you're a genuine
contributor, please reply here and a maintainer will review your PR.

We appreciate your contribution and apologize if this is a false positive!

Adam Brock and others added 2 commits November 7, 2026 18:35
Signed-off-by: Adam Brock <adam@union.ai>
Running work reports its action events through Record, like ActionsService.Update and
TrackedRunService.ReportActions, which are already allowed. Without it, a deployment
restricting an org would refuse progress and terminal-event reports for work already
running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6679xdozKcpp5NqHwjgEa
Signed-off-by: Adam Brock <adam@union.ai>
@afbrock

afbrock commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Closing: Union is enforcing its billing lockout in its own authorizer instead, so flyteidl2 doesn't need the allowed_when_restricted option. Thanks for the review.

@afbrock afbrock closed this Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants