Skip to content

Session catalog#2836

Draft
DerGut wants to merge 4 commits into
apache:mainfrom
DerGut:session-catalog
Draft

Session catalog#2836
DerGut wants to merge 4 commits into
apache:mainfrom
DerGut:session-catalog

Conversation

@DerGut

@DerGut DerGut commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

What changes are included in this PR?

This PR introduces a new session-aware catalog trait SessionCatalog and its implementation RestSessionCatalog.
A SessionCatalog is a session-aware catalog variant that accepts a new struct SessionContext with every catalog method. It is otherwise identical to the regular Catalog trait.

The RestSessionCatalog now acts as the core implementation of the RestCatalog, which simply delegates all its methods to an inner RestSessionCatalog by passing an internal SessionContext that defaults to an empty one, preserving session unaware behavior.

Are these changes tested?

The existing test suite passes on the refactor that moves logic from the RestCatalog to the RestSessionCatalog (first commit). I've included some additional tests to assert the RestCatalogBuilder's output when passed an explicit session.

I'm adding a commit to refactor the test suit, to have it operate on the RestSessionCatalog instead, as it now contains the load-bearing logic.


Logic that uses the sessions to modify requests isn't implemented yet, so tests at this point are only structural. My 2nd PR will address this.

@CTTY

CTTY commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

I literally just proposed this idea last week in the rust community sync, and very happy to see some actual work already!

There are some existing work on AuthManager/Session, maybe we should merge the effort? #2815

@DerGut

DerGut commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@CTTY What a coincidence! I was planning to attend myself to push for it, so thanks for covering the topic! 🙏

On #2815, this is perfect timing too. I was about to start some work on the AuthManager (according to #2774 (comment)) but that doesn't seem necessary anymore 👏
Let me take a look at the PR to watch out for integration issues with the SessionCatalog work :)

They're 100% related, but it already looks like a reasonable split to contribute them sequentially.

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.

Session/ Request/ Auth Context Propagation

2 participants