Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
240 changes: 120 additions & 120 deletions api/serverless/openapi.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cmd/runware/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func main() {
func run() int {
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
// Once the first signal has cancelled the context, hand the signals back so
// Once the first signal has canceled the context, hand the signals back so
// a second Ctrl-C kills a command that does not stop on its own.
go func() {
<-ctx.Done()
Expand Down
2 changes: 1 addition & 1 deletion docs/runware_serverless.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Deploy, monitor, and manage Runware serverless applications on the platform
* [runware serverless deploy](runware_serverless_deploy.md) - Create or update a serverless application
* [runware serverless gpus](runware_serverless_gpus.md) - List available GPU types and pricing
* [runware serverless open](runware_serverless_open.md) - Open an application in the Runware dashboard
* [runware serverless secrets](runware_serverless_secrets.md) - Manage organisation secrets for serverless applications
* [runware serverless secrets](runware_serverless_secrets.md) - Manage organization secrets for serverless applications
* [runware serverless usage](runware_serverless_usage.md) - Show account-wide usage and cost

2 changes: 1 addition & 1 deletion docs/runware_serverless_apps_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Manage plain-text environment variables for an application

Manage plain-text environment variables on a serverless application.

These are not organisation secrets. Values are returned by list and set.
These are not organization secrets. Values are returned by list and set.
Use 'serverless secrets' for encrypted secrets attached as env vars.

```
Expand Down
4 changes: 2 additions & 2 deletions docs/runware_serverless_apps_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Show GPU time and spend for one application over a time window.
This is the account-wide report filtered to one appId. The filter narrows what
is reported, not what is measured: commitment coverage depends on every app's
concurrent GPUs, so a per-app split between commitment and PAYG reflects the
organisation-wide allocation.
organization-wide allocation.

The window is half-open (--from inclusive, --to exclusive), at most 31 days,
and clipped: a worker running across a boundary contributes only the part
Expand All @@ -19,7 +19,7 @@ Billable time runs from loading through ready, draining and stopping; pending,
pulling and stopped do not bill, and busy is queue occupancy rather than a
lifecycle transition. GPU time is summed per GPU, so four GPUs for one second
is four seconds. PAYG spend is provisional and not a settled charge; the
PAYG-equivalent value prices the same time at the catalogue rate whatever
PAYG-equivalent value prices the same time at the catalog rate whatever
covered it, so the difference is what reserved capacity saved.

Grouping by day splits a span at UTC midnight. The table ends with a Total row
Expand Down
4 changes: 2 additions & 2 deletions docs/runware_serverless_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ the checkpointed state, so an unmounted download is copied into every
checkpoint and fetched again on every cold start. A volume keeps it out of
both.

--secret NAME, or NAME=ENV_VAR, attaches an existing organisation secret at
--secret NAME, or NAME=ENV_VAR, attaches an existing organization secret at
create so the first rollout carries it. Repeat the flag for more than one.
Attach or detach later with 'secrets attach' and 'secrets detach'.

Expand Down Expand Up @@ -136,7 +136,7 @@ runware serverless deploy [file] [flags]
--poll-interval duration Polling interval when waiting for the application (default 2s)
--requirement stringArray Additional pip package to install (repeatable; code deploys only)
--scaling-delay int32 Scaling delay in seconds (default 10)
--secret stringArray Organisation secret to attach at create, as NAME or NAME=ENV_VAR (repeatable)
--secret stringArray Organization secret to attach at create, as NAME or NAME=ENV_VAR (repeatable)
--src-dir string Directory to package as the application source (default: the working directory; code deploys only)
--volume stringArray Absolute path inside the app backed by persistent node-local storage; immutable after create (repeatable)
--wait Poll until the application is active or failed
Expand Down
12 changes: 6 additions & 6 deletions docs/runware_serverless_secrets.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## runware serverless secrets

Manage organisation secrets for serverless applications
Manage organization secrets for serverless applications

### Synopsis

Manage organisation-scoped encrypted secrets, and attach them to serverless applications.
Manage organization-scoped encrypted secrets, and attach them to serverless applications.

```
runware serverless secrets [flags]
Expand All @@ -28,10 +28,10 @@ runware serverless secrets [flags]
### SEE ALSO

* [runware serverless](runware_serverless.md) - Manage Runware serverless applications
* [runware serverless secrets attach](runware_serverless_secrets_attach.md) - Attach an organisation secret to an application
* [runware serverless secrets attach](runware_serverless_secrets_attach.md) - Attach an organization secret to an application
* [runware serverless secrets attachments](runware_serverless_secrets_attachments.md) - List secrets attached to an application
* [runware serverless secrets detach](runware_serverless_secrets_detach.md) - Detach a secret from an application
* [runware serverless secrets list](runware_serverless_secrets_list.md) - List organisation secrets
* [runware serverless secrets remove](runware_serverless_secrets_remove.md) - Remove an organisation secret
* [runware serverless secrets set](runware_serverless_secrets_set.md) - Create or update an organisation secret
* [runware serverless secrets list](runware_serverless_secrets_list.md) - List organization secrets
* [runware serverless secrets remove](runware_serverless_secrets_remove.md) - Remove an organization secret
* [runware serverless secrets set](runware_serverless_secrets_set.md) - Create or update an organization secret

8 changes: 4 additions & 4 deletions docs/runware_serverless_secrets_attach.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## runware serverless secrets attach

Attach an organisation secret to an application
Attach an organization secret to an application

### Synopsis

Record that an organisation secret is attached to an application, optionally
Record that an organization secret is attached to an application, optionally
under a different environment variable name.

The organisation secret must already exist (see 'secrets set'). Attaching rolls
The organization secret must already exist (see 'secrets set'). Attaching rolls
the live deployment so a running worker picks up the value. If a rollout is
already in progress, this attach reaches the worker on the next deploy. An
application that is not live records the attachment only; the next deploy or
Expand Down Expand Up @@ -45,5 +45,5 @@ runware serverless secrets attach <appId> <name> [flags]

### SEE ALSO

* [runware serverless secrets](runware_serverless_secrets.md) - Manage organisation secrets for serverless applications
* [runware serverless secrets](runware_serverless_secrets.md) - Manage organization secrets for serverless applications

2 changes: 1 addition & 1 deletion docs/runware_serverless_secrets_attachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ runware serverless secrets attachments <appId> [flags]

### SEE ALSO

* [runware serverless secrets](runware_serverless_secrets.md) - Manage organisation secrets for serverless applications
* [runware serverless secrets](runware_serverless_secrets.md) - Manage organization secrets for serverless applications

4 changes: 2 additions & 2 deletions docs/runware_serverless_secrets_detach.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Detach a secret from an application

### Synopsis

Remove an organisation secret's attachment from an application. The organisation
Remove an organization secret's attachment from an application. The organization
secret itself remains.

Detaching rolls the live deployment so a running worker stops receiving the
Expand Down Expand Up @@ -39,5 +39,5 @@ runware serverless secrets detach <appId> <name> [flags]

### SEE ALSO

* [runware serverless secrets](runware_serverless_secrets.md) - Manage organisation secrets for serverless applications
* [runware serverless secrets](runware_serverless_secrets.md) - Manage organization secrets for serverless applications

8 changes: 4 additions & 4 deletions docs/runware_serverless_secrets_list.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## runware serverless secrets list

List organisation secrets
List organization secrets

### Synopsis

List organisation secret metadata. Encrypted values are never returned.
List organization secret metadata. Encrypted values are never returned.

To list secrets attached to an application, use 'secrets attachments'.

Expand All @@ -15,7 +15,7 @@ runware serverless secrets list [flags]
### Examples

```
# list organisation secrets
# list organization secrets
runware serverless secrets list

# page through results
Expand All @@ -41,5 +41,5 @@ runware serverless secrets list [flags]

### SEE ALSO

* [runware serverless secrets](runware_serverless_secrets.md) - Manage organisation secrets for serverless applications
* [runware serverless secrets](runware_serverless_secrets.md) - Manage organization secrets for serverless applications

8 changes: 4 additions & 4 deletions docs/runware_serverless_secrets_remove.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## runware serverless secrets remove

Remove an organisation secret
Remove an organization secret

### Synopsis

Remove an organisation secret. Returns a conflict if any application still
Remove an organization secret. Returns a conflict if any application still
has it attached — detach each holder with 'secrets detach' first.

```
Expand All @@ -14,7 +14,7 @@ runware serverless secrets remove <name> [flags]
### Examples

```
# remove an organisation secret
# remove an organization secret
runware serverless secrets remove FOO
```

Expand All @@ -35,5 +35,5 @@ runware serverless secrets remove <name> [flags]

### SEE ALSO

* [runware serverless secrets](runware_serverless_secrets.md) - Manage organisation secrets for serverless applications
* [runware serverless secrets](runware_serverless_secrets.md) - Manage organization secrets for serverless applications

6 changes: 3 additions & 3 deletions docs/runware_serverless_secrets_set.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## runware serverless secrets set

Create or update an organisation secret
Create or update an organization secret

### Synopsis

Create an organisation-scoped secret, or update its value if the name already exists.
Create an organization-scoped secret, or update its value if the name already exists.

Creating a secret does not attach it to an application. Use 'secrets attach' for that.
Updating an existing secret re-encrypts the value and rolls every live application
Expand Down Expand Up @@ -51,5 +51,5 @@ runware serverless secrets set <name> [flags]

### SEE ALSO

* [runware serverless secrets](runware_serverless_secrets.md) - Manage organisation secrets for serverless applications
* [runware serverless secrets](runware_serverless_secrets.md) - Manage organization secrets for serverless applications

4 changes: 2 additions & 2 deletions docs/runware_serverless_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Show account-wide usage and cost

### Synopsis

Show GPU time and spend for the authenticated organisation over a time window.
Show GPU time and spend for the authenticated organization over a time window.

The window is half-open (--from inclusive, --to exclusive), at most 31 days,
and clipped: a worker running across a boundary contributes only the part
Expand All @@ -14,7 +14,7 @@ Billable time runs from loading through ready, draining and stopping; pending,
pulling and stopped do not bill, and busy is queue occupancy rather than a
lifecycle transition. GPU time is summed per GPU, so four GPUs for one second
is four seconds. PAYG spend is provisional and not a settled charge; the
PAYG-equivalent value prices the same time at the catalogue rate whatever
PAYG-equivalent value prices the same time at the catalog rate whatever
covered it, so the difference is what reserved capacity saved.

Grouping by day splits a span at UTC midnight. The table ends with a Total row
Expand Down
4 changes: 2 additions & 2 deletions internal/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (c *Client) submit(ctx context.Context, payload map[string]any) ([]json.Raw
// taskUUID is optional: supply it to use a specific identifier, or omit it to have one generated.
//
// For async delivery Run polls until a success result is received or the context
// is cancelled. For sync delivery the submit response is returned directly.
// is canceled. For sync delivery the submit response is returned directly.
func (c *Client) Run(ctx context.Context, model string, args []string, opts RunOptions) ([]json.RawMessage, error) {
if model == "" {
return nil, ErrModelRequired
Expand Down Expand Up @@ -415,7 +415,7 @@ func uploadFailureMessage(status, message string) (string, bool) {
// Poll polls for async task results using the getResponse task type.
// It blocks until at least minResults items with status "success" have been
// returned in a single poll cycle, a data item reports status "error", the
// context is cancelled, or a fatal API/auth error occurs. minResults < 1 is
// context is canceled, or a fatal API/auth error occurs. minResults < 1 is
// treated as 1.
//
// onProgress is called with the reported progress percentage (0–100) each time
Expand Down
6 changes: 3 additions & 3 deletions internal/api/poll_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func rawJSON(t *testing.T, v any) json.RawMessage {
}

// ---- Client.Poll polling-mechanics tests ----
// Tests for success, progress, and nil-callback behaviour live in client_test.go.
// Tests for success, progress, and nil-callback behavior live in client_test.go.

// TestClientPoll_TransientErrorKeepsPolling: non-fatal errors are retried.
func TestClientPoll_TransientErrorKeepsPolling(t *testing.T) {
Expand Down Expand Up @@ -105,10 +105,10 @@ func TestClientPoll_APIErrorFatal(t *testing.T) {
}
}

// TestClientPoll_ContextCancelled: cancelled context returns context.Canceled.
// TestClientPoll_ContextCancelled: canceled context returns context.Canceled.
func TestClientPoll_ContextCancelled(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
cancel() // already cancelled
cancel() // already canceled

mock := &mockTransport{
responses: []mockResponse{
Expand Down
6 changes: 3 additions & 3 deletions internal/api/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ func TestFetchModelSchema_InvalidJSON(t *testing.T) {
}
}

// TestFetchModelSchema_ContextCancelled verifies that a cancelled context
// TestFetchModelSchema_ContextCancelled verifies that a canceled context
// causes the request to fail promptly.
func TestFetchModelSchema_ContextCancelled(t *testing.T) {
_, base := schemaServer(t, func(w http.ResponseWriter, r *http.Request) {
// Handler intentionally does nothing; context will be cancelled before response.
// Handler intentionally does nothing; context will be canceled before response.
<-r.Context().Done()
})

Expand All @@ -121,6 +121,6 @@ func TestFetchModelSchema_ContextCancelled(t *testing.T) {

_, err := fetchModelSchema(ctx, "google:3@2", http.DefaultClient, base)
if err == nil {
t.Fatal("expected error from cancelled context, got nil")
t.Fatal("expected error from canceled context, got nil")
}
}
6 changes: 3 additions & 3 deletions internal/api/serverless/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const createAppTimeout = 5 * time.Minute
// the same client task id is reused).
const invokeSyncTimeout = 5 * time.Minute

// GpuType is the public catalogue entry for a supported GPU type.
// GpuType is the public catalog entry for a supported GPU type.
type GpuType = gen.GpuType

// App is a serverless application.
Expand Down Expand Up @@ -285,7 +285,7 @@ func (c *Client) innerWithTimeout(timeout time.Duration) *gen.ClientWithResponse
return newGeneratedClient(c.apiKey, c.baseURL, &cloned)
}

// ListGpuTypes returns the catalogue of supported GPU types and their pricing.
// ListGpuTypes returns the catalog of supported GPU types and their pricing.
func (c *Client) ListGpuTypes(ctx context.Context) ([]GpuType, error) {
if c.apiKey == "" {
return nil, transport.ErrNoAPIKey
Expand Down Expand Up @@ -349,7 +349,7 @@ func (c *Client) CreateApp(ctx context.Context, body AppCreate) (*App, error) {
}
}

// ListApps returns a page of apps for the authenticated organisation.
// ListApps returns a page of apps for the authenticated organization.
func (c *Client) ListApps(ctx context.Context, params *ListAppsParams) (Page[App], error) {
if c.apiKey == "" {
return Page[App]{}, transport.ErrNoAPIKey
Expand Down
Loading
Loading