mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
* fix(lambda): honour Qualifier on GetFunction and GetFunctionConfiguration Both read paths ignored Qualifier and answered with $LATEST for everything, including versions that were never published. A caller pinning version 1 silently got whatever $LATEST held at the time, which defeats the immutability guarantee that is the point of publishing, and a read against a version that does not exist returned 200 instead of 404, so a typo or a stale alias looked live. Resolve the qualifier through the same target resolver the invoke path uses, so a qualifier means the same thing whether a caller reads it or runs it. That covers published versions, aliases, and an explicit $LATEST, and turns an unresolvable qualifier into the ResourceNotFoundException AWS returns. A qualifier may also ride on the name, as fn:1 or a qualified ARN. An explicit Qualifier and one carried on the name must agree; disagreeing is InvalidParameterValueException rather than a silent pick of one. Scoped to the read paths. The invoke path already resolves qualifiers, and the remaining invoke-side gap is the warm pool keying in #1988, which has an approved fix awaiting a rebase in PR #2028. Closes #2821 * fix(lambda): resolve aliases deterministically when reading, not by weight Routing a qualified read through the invoke resolver also inherited its alias behaviour. An alias carrying AdditionalVersionWeights shifts traffic, so pickAliasVersion chooses at random among the weighted versions, which is right for running a function and wrong for describing one: two reads of the same alias could report different versions. Split the resolver on how aliases resolve rather than copying it, so the two cannot drift. Invoke keeps the weighted pick; a read follows the alias's primary FunctionVersion, which is what AWS reports.