Some of our work requires that software agents be aware of their own version. ECS-deployed agents have their version built into their dockerfile, but we don't have the same for lambda bundles. This PR adds support to the faas/ module for adding a pyproject.toml file to the lambda bundle which contains a software-managed "version" field.
New Behavior
make faas/python/build will now create dist/pyproject.toml and bundle that file into the final build.zip. If a pyproject.toml exists in the project root, it is copied into dist/, otherwise, a bare pyproject.toml is created. Before zipping, dist/pyproject.toml's "version" field is updated to either $(GIT_TAG) or $(GIT_COMMIT_SHORT), in that order.
Context
Some of our work requires that software agents be aware of their own version. ECS-deployed agents have their version built into their dockerfile, but we don't have the same for lambda bundles. This PR adds support to the
faas/
module for adding apyproject.toml
file to the lambda bundle which contains a software-managed "version" field.New Behavior
make faas/python/build
will now createdist/pyproject.toml
and bundle that file into the finalbuild.zip
. If apyproject.toml
exists in the project root, it is copied intodist/
, otherwise, a barepyproject.toml
is created. Before zipping,dist/pyproject.toml
's "version" field is updated to either$(GIT_TAG)
or$(GIT_COMMIT_SHORT)
, in that order.