Skip to content

add sessionspaces perparation gate to graph-proxy - #1666

Open
iamvigneshwars wants to merge 6 commits into
mainfrom
graph-proxy/prepare
Open

iamvigneshwars wants to merge 6 commits into
mainfrom
graph-proxy/prepare

Conversation

@iamvigneshwars

Copy link
Copy Markdown
Contributor

No description provided.

@iamvigneshwars iamvigneshwars self-assigned this Sep 28, 2026
@iamvigneshwars iamvigneshwars added the enhancement New feature or request label Sep 28, 2026
@@ -274,8 +274,8 @@ impl WorkflowTemplatesMutation {
) -> anyhow::Result<Workflow> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not for this PR but for future consideration: we may want to rethink this API.

With the new dynamic sessionspaces users may end up waiting for a response for 150 seconds.

Clients may give up and timeout before that.

I don't know if that it going to cause problems.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I get you concern. But usually it happens only once when a users creates a new workflow in a new session or a dormant sessionspace. Practically, provisioning the namespace and required resources takes around 2 to 5 seconds. Once the namespace has been created and the SessionSpace is active, subsequent workflow requests shouldn't have any noticeable additional latency.

/// Forward the caller's token and wait for preparation, failing closed on any error.
pub async fn prepare_session(api_url: &Url, namespace: &str, token: Option<&str>) -> Result<()> {
let failure = |status: StatusCode, message: &str| {
anyhow!("SessionSpace preparation failed for {namespace} ({status}): {message}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think that these error messages may be surfaced to users via graphql errors? If so, internal jargon: "SessionSpace preparation failed " may be confusing to the user.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I have updated it.

# Submission tests build very large debug futures; the default test-thread
# stack overflows. 16 MiB leaves headroom for future growth.
env:
RUST_MIN_STACK: "16777216"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do we understand why the futures are so large? If this only affects test/debug builds then this seems reasonable. I just want to make sure we're not masking an underlying issue in the production async code that could cause problems later.

@iamvigneshwars iamvigneshwars Sep 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think these are debug only. The submission tests deserialise the generated argo openAPI types, so in debug builds the serde frames exceed 2 MB default test-thread stack. Release builds optimise these frames, so this is just a test harness.

This branch has not been deployed

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants