Increases max variable size to 64KiB from 16KiB (#15983)

This commit is contained in:
Mike Nomitch 2023-01-31 10:32:36 -08:00 committed by GitHub
parent 16eefbbf4d
commit 80848b202e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 5 deletions

3
.changelog/15983.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:improvement
variables: Increased maximum size to 64KiB
```

View File

@ -34,7 +34,7 @@ const (
// maxVariableSize is the maximum size of the unencrypted contents of a // maxVariableSize is the maximum size of the unencrypted contents of a
// variable. This size is deliberately set low and is not configurable, to // variable. This size is deliberately set low and is not configurable, to
// discourage DoS'ing the cluster // discourage DoS'ing the cluster
maxVariableSize = 16384 maxVariableSize = 65536
) )
// VariableMetadata is the metadata envelope for a Variable, it is the list // VariableMetadata is the metadata envelope for a Variable, it is the list
@ -176,7 +176,7 @@ func (v VariableDecrypted) Validate() error {
return errors.New("empty variables are invalid") return errors.New("empty variables are invalid")
} }
if v.Items.Size() > maxVariableSize { if v.Items.Size() > maxVariableSize {
return errors.New("variables are limited to 16KiB in total size") return errors.New("variables are limited to 64KiB in total size")
} }
if v.Namespace == AllNamespacesSentinel { if v.Namespace == AllNamespacesSentinel {
return errors.New("can not target wildcard (\"*\")namespace") return errors.New("can not target wildcard (\"*\")namespace")

View File

@ -1663,7 +1663,7 @@ The table below shows this endpoint's support for
URL query parameter. URL query parameter.
- `Payload` `(string: "")` - Specifies a base64 encoded string containing the - `Payload` `(string: "")` - Specifies a base64 encoded string containing the
payload. This is limited to 16384 bytes (16KiB). payload. This is limited to 65536 bytes (64KiB).
- `Meta` `(meta<string|string>: nil)` - Specifies arbitrary metadata to pass to - `Meta` `(meta<string|string>: nil)` - Specifies arbitrary metadata to pass to
the job. the job.

View File

@ -158,7 +158,7 @@ includes alphanumeric characters and the special characters `-`, `_`, `~`, and
`/`. Paths may be up to 128 bytes long. The following regex matches the allowed `/`. Paths may be up to 128 bytes long. The following regex matches the allowed
paths: `^[a-zA-Z0-9-_~/]{1,128}$` paths: `^[a-zA-Z0-9-_~/]{1,128}$`
Variable items are restricted to 16KiB in size. This limit is calculated by Variable items are restricted to 64KiB in size. This limit is calculated by
taking the sum of the length in bytes of all of the unencrypted keys and values taking the sum of the length in bytes of all of the unencrypted keys and values
in the `Items` field. in the `Items` field.

View File

@ -51,7 +51,7 @@ template engine. Instead, they require the use of the `index` template function
to directly access their values. This does not impact cases where the keys and to directly access their values. This does not impact cases where the keys and
values are read using the `range` function. values are read using the `range` function.
Variable items are restricted to 16KiB in size. This limit is calculated by Variable items are restricted to 64KiB in size. This limit is calculated by
taking the sum of the length in bytes of all of the unencrypted keys and values. taking the sum of the length in bytes of all of the unencrypted keys and values.
## General Options ## General Options