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.
This PR and !68 are nearly identical; the only change is adding the build-harness modules to the list of ignored paths when looking for pyfiles to lint.
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 a
pyproject.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 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.This PR and !68 are nearly identical; the only change is adding the build-harness modules to the list of ignored paths when looking for pyfiles to lint.