Repository navigation
feat(serverless): address an environment on invoke and get_task (RUNSERV-1238) - #5
Merged
Merged
Conversation
…ERV-1238) An app id now names one copy per environment. The client takes serverless_environment, each call can override it, and unset sends nothing so the platform keeps reading production. Waiting polls in the invocation's environment, since a task carries none of its own. Signed-off-by: Rafal Leszko <rafal.leszko@runware.ai>
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… wrappers (RUNSERV-1238) Review follow-ups: an invalid serverless_environment now fails when the client is built and names the config field, the name must match in full (no trailing newline), and the query goes through urlencode. Tests cover the public Runware wrappers, the name boundaries and the smoke test's optional RUNWARE_SERVERLESS_TEST_ENVIRONMENT. Signed-off-by: Rafal Leszko <rafal.leszko@runware.ai>
…(RUNSERV-1238) Signed-off-by: Rafal Leszko <rafal.leszko@runware.ai>
…RUNSERV-1238) A paused environment answers invoke with a 429 that holds until the budget is raised or the UTC month turns, so retrying it, or sleeping on its Retry-After, only delays the error. It now raises a quota error at once; any other 429 is still retried. Signed-off-by: Rafal Leszko <rafal.leszko@runware.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RUNSERV-1238: an app id now names one copy per environment, so the client has to say which one it means.
Runware(serverless_environment="staging")sets it for the client;invoke(..., environment=)andget_task(..., environment=)override it per call.environmentparameter, so the platform readsproductionand existing callers send exactly the same requests as before.serverless_environmentfails when the client is built.https://docs.runware.ai/serverless/errors#environment-pausedis now aquotaerror raised at once, not retried and not slept on itsRetry-After; any other 429 is retried as before. The pause PR must use that type.The SDK has no deploy or app reads yet, so invoke and get_task are the whole surface this touches.
Release note: the prod API (as of
bf039685) predates environments and ignores the parameter, which means a non-production call would reach the production copy. Publish only once prod runs Runware/serverless#787 or later; dev already does. Merge after the RUNSERV-1240 pause work, so the paused type above is live.Tested:
ruff,pyright,pytest(360 passed), and a local run against the serverless API frommainwith production and staging copies of one app: each copy's tasks ran on its own consumer and were readable only in their own environment. Against the prod API commit,environment=stagingran on the production copy, hence the release note.