Skip to content

Conversation

mcdonnnj
Copy link
Member

@mcdonnnj mcdonnnj commented Jul 17, 2025

🗣 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

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated to reflect the changes in this PR.
  • All new and existing tests pass.
  • Bump major, minor, patch, pre-release, and/or build versions as appropriate via the bump_version script if this repository is versioned and the changes in this PR warrant a version bump.

✅ Pre-merge checklist

  • Update the repository's required checks.

✅ Post-merge checklist

  • Create a release (necessary if and only if the version was bumped).

@mcdonnnj mcdonnnj requested review from a team and Copilot July 17, 2025 17:10
@mcdonnnj mcdonnnj self-assigned this Jul 17, 2025
@mcdonnnj mcdonnnj added the breaking change This issue or pull request involves changes to existing functionality label Jul 17, 2025
@mcdonnnj mcdonnnj requested review from dav3r and felddy as code owners July 17, 2025 17:10
@mcdonnnj mcdonnnj added the documentation This issue or pull request improves or adds to documentation label Jul 17, 2025
@mcdonnnj mcdonnnj requested a review from jsf9k as a code owner July 17, 2025 17:10
@mcdonnnj mcdonnnj added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Jul 17, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@mcdonnnj
Copy link
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.

@github-project-automation github-project-automation bot moved this from In progress to Reviewer approved in Skeleton Maintenance Jul 17, 2025
@mcdonnnj mcdonnnj added the version bump This issue or pull request increments the version number label Jul 17, 2025
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic!

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.
@mcdonnnj mcdonnnj force-pushed the improvement/build_for_single_python_version branch from d59bec0 to 522e0ea Compare October 10, 2025 01:54
@github-actions github-actions bot added github-actions Pull requests that update GitHub Actions code docker Pull requests that update Docker code labels Oct 10, 2025
@mcdonnnj mcdonnnj added this pull request to the merge queue Oct 10, 2025
Merged via the queue into develop with commit 6e3abc7 Oct 10, 2025
24 checks passed
@mcdonnnj mcdonnnj deleted the improvement/build_for_single_python_version branch October 10, 2025 03:41
@github-project-automation github-project-automation bot moved this from Reviewer approved to Done in Skeleton Maintenance Oct 10, 2025
@mcdonnnj mcdonnnj mentioned this pull request Oct 10, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change This issue or pull request involves changes to existing functionality docker Pull requests that update Docker code documentation This issue or pull request improves or adds to documentation github-actions Pull requests that update GitHub Actions code improvement This issue or pull request will add or improve functionality, maintainability, or ease of use version bump This issue or pull request increments the version number

Projects

Development

Successfully merging this pull request may close these issues.

4 participants