Skip to content

Conversation

@royischoss
Copy link
Contributor

@royischoss royischoss commented Dec 31, 2025

📝 Description

This includes adding a async configuration while using RemoteRuntime.with_http.
initialization of default http trigger in async mode if spec.graph.engine is "async" - disabled till NUC-704 is done


🛠️ Changes Made

  1. Adding AsyncSpec dataclass and adding it as input param for with_http
  2. Configuration for async mode in trigger json both default http with async engine (disabled) or by using function.with_http(AsyncMode(enabled=True)
  3. Adding system test to verify nuclio function

✅ Checklist

  • I updated the documentation (if applicable)
  • I have tested the changes in this PR
  • I confirmed whether my changes are covered by system tests
    • If yes, I ran all relevant system tests and ensured they passed before submitting this PR
    • I updated existing system tests and/or added new ones if needed to cover my changes
  • If I introduced a deprecation:

🧪 Testing

Adding system test TestNuclioRuntime:test_async_http_mode


🔗 References


🚨 Breaking Changes?

  • Yes (explain below)
  • No

🔍️ Additional Notes

@royischoss royischoss marked this pull request as ready for review December 31, 2025 11:29
@royischoss royischoss requested review from a team, TomerShor and liranbg as code owners December 31, 2025 11:29
Copy link
Contributor

@davesh0812 davesh0812 left a comment

Choose a reason for hiding this comment

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

Nice

@davesh0812 davesh0812 changed the title [RemoteRuntime] Add async mode enabling to http trigger [RemoteRuntime] Add option to enable async mode when using `nuclio' runtime with http trigger Dec 31, 2025
Copy link
Member

@theSaarco theSaarco left a comment

Choose a reason for hiding this comment

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

A small fix is needed.

"Async spec is only supported on Nuclio 1.15.3 and higher"
)
if async_spec.enabled:
trigger._struct["mode"] = "async" if async_spec.enabled else "sync"
Copy link
Member

Choose a reason for hiding this comment

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

You get here since async_spec.enabled, so there's no way this will be sync.

Copy link
Member

@liranbg liranbg left a comment

Choose a reason for hiding this comment

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

very well, minor comment

)
function.spec.function_handler = "main:async_handler"

function.with_http(async_spec=AsyncSpec(enabled=True, max_connections=900))
Copy link
Member

Choose a reason for hiding this comment

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

isnt 100 enough for this test?

Copy link
Contributor Author

@royischoss royischoss Jan 1, 2026

Choose a reason for hiding this comment

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

100 provide latency of 10 seconds passed with 200 with 5.5 seconds

@royischoss royischoss requested a review from davesh0812 January 1, 2026 08:00
Copy link
Member

@theSaarco theSaarco left a comment

Choose a reason for hiding this comment

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

LGTM

@davesh0812 davesh0812 merged commit 5ead409 into mlrun:development Jan 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants