Skip to content

Commit d418bf4

Browse files
authored
Merge pull request #7739 from TheThingsNetwork/feat/increase-payload-codec-size-limit
Increase payload codec size limit to comply with TS013-1.0.0
2 parents 10286e3 + 2d20804 commit d418bf4

File tree

9 files changed

+26
-25
lines changed

9 files changed

+26
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ For details about compatibility between different releases, see the **Commitment
1717

1818
- Increased the default value from 5 to 15 for maximum number of confirmed uplink retransmission for LoRaWAN version prior 1.0.4.
1919
- Ping response settings for the TTIGW protocol to mark less gateway connections as disconnected.
20+
- Increase the payload codec formatter size limit to 64KB.
2021

2122
### Deprecated
2223

api/ttn/lorawan/v3/api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9115,18 +9115,18 @@ ncrc: [scheduled.advanced]
91159115
| Field | Type | Label | Description |
91169116
| ----- | ---- | ----- | ----------- |
91179117
| `up_formatter` | [`PayloadFormatter`](#ttn.lorawan.v3.PayloadFormatter) | | Payload formatter for uplink messages, must be set together with its parameter. |
9118-
| `up_formatter_parameter` | [`string`](#string) | | Parameter for the up_formatter, must be set together. The API enforces a maximum length of 16KB, but the size may be restricted further by deployment configuration. |
9118+
| `up_formatter_parameter` | [`string`](#string) | | Parameter for the up_formatter, must be set together. The API enforces a maximum length of 64KB, but the size may be restricted further by deployment configuration. |
91199119
| `down_formatter` | [`PayloadFormatter`](#ttn.lorawan.v3.PayloadFormatter) | | Payload formatter for downlink messages, must be set together with its parameter. |
9120-
| `down_formatter_parameter` | [`string`](#string) | | Parameter for the down_formatter, must be set together. The API enforces a maximum length of 16KB, but the size may be restricted further by deployment configuration. |
9120+
| `down_formatter_parameter` | [`string`](#string) | | Parameter for the down_formatter, must be set together. The API enforces a maximum length of 64KB, but the size may be restricted further by deployment configuration. |
91219121

91229122
#### Field Rules
91239123

91249124
| Field | Validations |
91259125
| ----- | ----------- |
91269126
| `up_formatter` | <p>`enum.defined_only`: `true`</p> |
9127-
| `up_formatter_parameter` | <p>`string.max_len`: `40960`</p> |
9127+
| `up_formatter_parameter` | <p>`string.max_len`: `65536`</p> |
91289128
| `down_formatter` | <p>`enum.defined_only`: `true`</p> |
9129-
| `down_formatter_parameter` | <p>`string.max_len`: `40960`</p> |
9129+
| `down_formatter_parameter` | <p>`string.max_len`: `65536`</p> |
91309130

91319131
### <a name="ttn.lorawan.v3.TxAcknowledgment">Message `TxAcknowledgment`</a>
91329132

api/ttn/lorawan/v3/api.swagger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27577,15 +27577,15 @@
2757727577
},
2757827578
"up_formatter_parameter": {
2757927579
"type": "string",
27580-
"description": "Parameter for the up_formatter, must be set together. The API enforces a maximum length of 16KB, but the size may be restricted further by deployment configuration."
27580+
"description": "Parameter for the up_formatter, must be set together. The API enforces a maximum length of 64KB, but the size may be restricted further by deployment configuration."
2758127581
},
2758227582
"down_formatter": {
2758327583
"$ref": "#/definitions/v3PayloadFormatter",
2758427584
"description": "Payload formatter for downlink messages, must be set together with its parameter."
2758527585
},
2758627586
"down_formatter_parameter": {
2758727587
"type": "string",
27588-
"description": "Parameter for the down_formatter, must be set together. The API enforces a maximum length of 16KB, but the size may be restricted further by deployment configuration."
27588+
"description": "Parameter for the down_formatter, must be set together. The API enforces a maximum length of 64KB, but the size may be restricted further by deployment configuration."
2758927589
}
2759027590
}
2759127591
},

api/ttn/lorawan/v3/messages.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -740,12 +740,12 @@ message MessagePayloadFormatters {
740740
};
741741
// Payload formatter for uplink messages, must be set together with its parameter.
742742
PayloadFormatter up_formatter = 1 [(validate.rules).enum.defined_only = true];
743-
// Parameter for the up_formatter, must be set together. The API enforces a maximum length of 16KB, but the size may be restricted further by deployment configuration.
744-
string up_formatter_parameter = 2 [(validate.rules).string.max_len = 40960];
743+
// Parameter for the up_formatter, must be set together. The API enforces a maximum length of 64KB, but the size may be restricted further by deployment configuration.
744+
string up_formatter_parameter = 2 [(validate.rules).string.max_len = 65536];
745745
// Payload formatter for downlink messages, must be set together with its parameter.
746746
PayloadFormatter down_formatter = 3 [(validate.rules).enum.defined_only = true];
747-
// Parameter for the down_formatter, must be set together. The API enforces a maximum length of 16KB, but the size may be restricted further by deployment configuration.
748-
string down_formatter_parameter = 4 [(validate.rules).string.max_len = 40960];
747+
// Parameter for the down_formatter, must be set together. The API enforces a maximum length of 64KB, but the size may be restricted further by deployment configuration.
748+
string down_formatter_parameter = 4 [(validate.rules).string.max_len = 65536];
749749
}
750750

751751
message DownlinkQueueRequest {

cmd/internal/shared/applicationserver/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ var DefaultApplicationServerConfig = applicationserver.Config{
8383
},
8484
},
8585
Formatters: applicationserver.FormattersConfig{
86-
MaxParameterLength: 40960,
86+
MaxParameterLength: 65536, // 64KB
8787
},
8888
DeviceLastSeen: applicationserver.LastSeenConfig{
8989
BatchSize: 1000,

pkg/ttnpb/messages.pb.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ttnpb/messages.pb.validate.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/webui/console/components/payload-formatters-form/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const validationSchema = Yup.object().shape({
9696
.required(sharedMessages.validateRequired)
9797
// See https://github.com/TheThingsNetwork/lorawan-stack/blob/v3.14/api/messages.proto#L748
9898
// for validation requirements.
99-
.max(40960, Yup.passValues(sharedMessages.validateTooLong)),
99+
.max(65536, Yup.passValues(sharedMessages.validateTooLong)),
100100
}),
101101
[FIELD_NAMES.GRPC]: Yup.string()
102102
.matches(addressRegexp, Yup.passValues(sharedMessages.validateAddressFormat))
@@ -105,7 +105,7 @@ const validationSchema = Yup.object().shape({
105105
then: schema =>
106106
schema
107107
.required(sharedMessages.validateRequired)
108-
.max(40960, Yup.passValues(sharedMessages.validateTooLong)),
108+
.max(65536, Yup.passValues(sharedMessages.validateTooLong)),
109109
}),
110110
})
111111

sdk/js/generated/api.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41360,7 +41360,7 @@
4136041360
},
4136141361
{
4136241362
"name": "up_formatter_parameter",
41363-
"description": "Parameter for the up_formatter, must be set together. The API enforces a maximum length of 16KB, but the size may be restricted further by deployment configuration.",
41363+
"description": "Parameter for the up_formatter, must be set together. The API enforces a maximum length of 64KB, but the size may be restricted further by deployment configuration.",
4136441364
"label": "",
4136541365
"type": "string",
4136641366
"longType": "string",
@@ -41373,7 +41373,7 @@
4137341373
"validate.rules": [
4137441374
{
4137541375
"name": "string.max_len",
41376-
"value": 40960
41376+
"value": 65536
4137741377
}
4137841378
]
4137941379
}
@@ -41400,7 +41400,7 @@
4140041400
},
4140141401
{
4140241402
"name": "down_formatter_parameter",
41403-
"description": "Parameter for the down_formatter, must be set together. The API enforces a maximum length of 16KB, but the size may be restricted further by deployment configuration.",
41403+
"description": "Parameter for the down_formatter, must be set together. The API enforces a maximum length of 64KB, but the size may be restricted further by deployment configuration.",
4140441404
"label": "",
4140541405
"type": "string",
4140641406
"longType": "string",
@@ -41413,7 +41413,7 @@
4141341413
"validate.rules": [
4141441414
{
4141541415
"name": "string.max_len",
41416-
"value": 40960
41416+
"value": 65536
4141741417
}
4141841418
]
4141941419
}

0 commit comments

Comments
 (0)