Skip to content

Add API specific endpoints for routing rules - #938

Open
koszti wants to merge 1 commit into
trinodb:mainfrom
koszti:gateway-api-routing-rules-endpoints
Open

Add API specific endpoints for routing rules#938
koszti wants to merge 1 commit into
trinodb:mainfrom
koszti:gateway-api-routing-rules-endpoints

Conversation

@koszti

@koszti koszti commented Feb 23, 2026

Copy link
Copy Markdown
Member

Description

Add API specific routing rules endpoints under the API-role /gateway surface:

  • GET /gateway/routing-rules/all
  • POST /gateway/routing-rules/modify/update

Reason: API clients use API-role credentials and routing-rules management should be available on the API-role endpoint surface (not only under /webapp which requires ADMIN privileges).

Keep existing /webapp routing-rules endpoints for compatibility (no webapp breakage):

  • GET /webapp/getRoutingRules
  • POST /webapp/updateRoutingRules

Share routing-rules logic via RoutingRulesResourceHandler so /gateway and /webapp use the same implementation.

Update docs/gateway-api.md with the new API-role endpoints and compatibility note.

Additional context and related issues

  • Named list endpoint as /gateway/routing-rules/all for consistency with /gateway/backend/all.
  • Updated TestRoutingAPI to cover /gateway endpoints and /webapp/getRoutingRules compatibility.

Side note: in the future we could converge on one API surface and treat the web UI as another API client.

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
(x) Release notes are required, with the following suggested text:

  • Add API-role routing rules endpoints at /gateway/routing-rules/all and /gateway/routing-rules/modify/update, while retaining existing /webapp routing rules endpoints for compatibility.

@cla-bot cla-bot Bot added the cla-signed label Feb 23, 2026
@koszti
koszti force-pushed the gateway-api-routing-rules-endpoints branch from 37b7375 to fc88400 Compare February 23, 2026 23:28
@Chaho12
Chaho12 requested a review from a team February 25, 2026 05:02
@Chaho12

Chaho12 commented Feb 25, 2026

Copy link
Copy Markdown
Member

I like this idea — what do you guys think?
Btw, do we normally support backward compatibility, or do we just go with breaking changes and update the API spec?
I think we usually do the latter for Trino, right?

@ebyhr
ebyhr removed the request for review from a team March 18, 2026 04:58
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

This pull request has gone a while without any activity. Ask for help on #trino-gateway-dev on Trino slack.

@github-actions github-actions Bot added the stale label Apr 8, 2026
@github-actions

Copy link
Copy Markdown

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions Bot closed this Apr 29, 2026
@mosabua

mosabua commented Apr 29, 2026

Copy link
Copy Markdown
Member

I am reopening for @koszti as we still want this fix to go in. Ping us for review please

@mosabua mosabua reopened this Apr 29, 2026
@github-actions github-actions Bot removed the stale label Apr 30, 2026
@github-actions

Copy link
Copy Markdown

This pull request has gone a while without any activity. Ask for help on #trino-gateway-dev on Trino slack.

@github-actions github-actions Bot added the stale label May 21, 2026
@github-actions

Copy link
Copy Markdown

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions Bot closed this Jun 11, 2026
@mosabua mosabua added stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed. and removed stale labels Jul 9, 2026
@mosabua mosabua reopened this Jul 9, 2026
@mosabua

mosabua commented Jul 9, 2026

Copy link
Copy Markdown
Member

We should get this in .. for now I reopened so it doesnt get lost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed.

Development

Successfully merging this pull request may close these issues.

3 participants