mirror of
https://github.com/floci-io/floci.git
synced 2026-12-02 01:43:02 -05:00
fix(lambda): refuse a log level under Text as Lambda does (#5920)
Floci accepted ApplicationLogLevel and SystemLogLevel under Text and dropped them, which a test pinned and the docs described as Floci's own call rather than probed behaviour. Measured on Lambda (eu-west-1, 2026-10-18): CreateFunction and UpdateFunctionConfiguration refuse either level under Text, whether LogFormat names Text or is left to that default, with InvalidParameterValueException "LogLevel is not supported when LogFormat is set to "Text". Remove LogLevel from your request or change the LogFormat to "JSON" and try again." In a stack, a valid level under Text passes the template's validation and fails the resource with Lambda's message. Floci now refuses it in validateLoggingConfig, so the API and the CloudFormation update check, which validates through loggingSettings, both do; and its enum errors list the levels in Lambda's order: [FATAL, TRACE, WARN, ERROR, INFO, DEBUG] and [WARN, INFO, DEBUG]. The default format is worked out in one place, logFormat, for the validation and for loggingSettings. Tests: a level under Text refused on create and on update through the API (LambdaVpcSnapStartLoggingIntegrationTest, replacing the test that pinned the old behaviour) and through the SDK (LambdaFunctionConfigTest), by loggingSettings (LambdaServiceTest), and by a stack update (CloudFormationLambdaLoggingConfigIntegrationTest); the enum messages' order. They fail on main.
This commit is contained in:
1 parent
5a4413d63a
commit
d425e2d884
6 files changed
+163
-48
No files matched your search
@@ -830,12 +830,11 @@ without `DurableConfig` cannot gain one. CloudFormation and Terraform (`durable_
|
||||
the function to add or remove it. See Durable Functions for the execution itself.
|
||||
|
||||
`LogGroup` is validated against AWS's documented constraint: 1-512 characters matching
|
||||
`[.\-_/#A-Za-z0-9]+`. `ApplicationLogLevel` and `SystemLogLevel` are accepted with any
|
||||
`LogFormat` but are only ever stored — and therefore only ever returned — when the
|
||||
resolved format is `JSON`; supplying them with `LogFormat=Text` is not an error, it is
|
||||
simply a no-op. That is Floci's own call rather than probed AWS behaviour: it keeps the
|
||||
request path consistent with Floci's response shape, which never surfaces the levels for
|
||||
Text.
|
||||
`[.\-_/#A-Za-z0-9]+`. `ApplicationLogLevel` and `SystemLogLevel` belong to `LogFormat=JSON`:
|
||||
a log level under Text, whether `LogFormat` names Text or is left to that default, is refused
|
||||
on create and on update with `InvalidParameterValueException` ("LogLevel is not supported when
|
||||
LogFormat is set to "Text". Remove LogLevel from your request or change the LogFormat to
|
||||
"JSON" and try again."), as Lambda refuses it (measured in eu-west-1, 2026-10-18).
|
||||
|
||||
`VpcConfig` is omitted entirely while the function is not attached to a VPC.
|
||||
Subnets that EC2 does not know about are still accepted and returned; only `VpcId`
|
||||
|
||||
Reference in new issue
Block a user