Target a single Python runtime#35
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request simplifies the Lambda's build configuration to target only a single Python runtime instead of multiple runtimes. The change removes complexity by eliminating the need to manage artifacts for multiple Python versions and updates the tooling to work with a unified approach.
Key changes include:
- Consolidation of Python dependency management to a single configuration
- Replacement of the old version bumping script with an enhanced version
- Update of CI/CD workflows to build for a single Python runtime
Reviewed Changes
Copilot reviewed 23 out of 27 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/version.txt | Updated version format from Python variable syntax to plain version string |
| src/py3.7/Pipfile, src/py3.8/Pipfile | Removed Python version-specific dependency files |
| build/Pipfile | Added comment clarifying Python version requirement alignment with Dockerfile |
| setup-env | Added comprehensive Python version validation function |
| bump-version | New enhanced version bumping script replacing the old one |
| bump_version.sh | Removed old version bumping script |
| Dockerfile | Simplified to use hardcoded Python 3.9 runtime instead of build arguments |
| docker-compose.yml | Updated paths and quote style consistency |
| .github/workflows/build.yml | Removed matrix strategy for multiple Python versions |
| Various config files | Updated tooling versions and configuration improvements |
jsf9k
approved these changes
Jul 17, 2025
Member
Author
|
I don't plan on addressing any of Copilot's feedback in this pull request. I will open issues referencing the feedback items in cisagov/skeleton-generic once I've verified that they aren't hallucinations and are worth implementing. |
dv4harr10
approved these changes
Jul 17, 2025
7 tasks
Instead of building for multiple Lambda runtimes it makes sense to just build targeting a single runtime. When deployed the infrastructure will just need to use the same runtime as supported by the Lambda configuration. Thus we drop support for all but the latest runtime that is specified in the configuration.
Store it in the build/ subdirectory along with the `pipenv` files.
Now that we only build for a single runtime version we can simplify the `build` job's functionality.
The need for this environment variable was removed in #3 but removing the creation of it was missed.
Now that there is only a single dependency configuration we need to update the README's directions for updating Python dependencies.
Add a comment to `build/Pipfile` and another to the Dockerfile that each mention keeping the Python versions specified in sync.
Update the Python dependencies installed for the Lambda by running `pipenv lock` in the `build/` directory.
d59bec0 to
522e0ea
Compare
1 task
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗣 Description
This pull request changes and simplifies the Lambda's build configuration to only target a single AWS Lambda Python runtime.
Note
This pull request is built on top of #34. You can find the diff of just these branches here.
💭 Motivation and context
After some thought I decided it doesn't make much sense to target multiple Python runtimes. You already needed to configure the Lambda to use a matching runtime for the artifact you used and there's no reason to use a specific runtime over the others when artifacts were being produced for multiple runtimes. Thus we can simplify the build configuration and make it easier to leverage features in newer Python versions without worry.
🧪 Testing
Automated tests pass.
✅ Pre-approval checklist
bump_versionscript if this repository is versioned and the changes in this PR warrant a version bump.✅ Pre-merge checklist
✅ Post-merge checklist