Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to fix CI/docker build failures for the Lambda image by adjusting how Poetry dependencies and Lambda runtime dependencies are installed.
Changes:
- Copies
README.mdalongsidepyproject.toml/poetry.lockduring the dependency-install layer. - Replaces
poetry add awslambdaric wheelwith a directpip install awslambdaricduring image build.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ci/Dockerfile.lambda
Outdated
Comment on lines
23
to
28
| COPY pyproject.toml poetry.lock README.md ${TASK_ROOT}/ | ||
|
|
||
| # Install Poetry dependencies first (including setuptools and wheel) | ||
| RUN python -m venv ${APP_VENV} \ | ||
| && . ${APP_VENV}/bin/activate \ | ||
| && poetry install \ |
There was a problem hiding this comment.
Including README.md in the dependency-layer COPY means any README change will invalidate Docker cache and force a full dependency reinstall. If the only reason for copying it is to satisfy readme = "README.md" during poetry install, consider switching this step to poetry install --no-root (or otherwise avoiding installing the project package in this layer) so the deps layer can stay independent of README edits.
Suggested change
| COPY pyproject.toml poetry.lock README.md ${TASK_ROOT}/ | |
| # Install Poetry dependencies first (including setuptools and wheel) | |
| RUN python -m venv ${APP_VENV} \ | |
| && . ${APP_VENV}/bin/activate \ | |
| && poetry install \ | |
| COPY pyproject.toml poetry.lock ${TASK_ROOT}/ | |
| # Install Poetry dependencies first (including setuptools and wheel) | |
| RUN python -m venv ${APP_VENV} \ | |
| && . ${APP_VENV}/bin/activate \ | |
| && poetry install --no-root \ |
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.
Summary | Résumé
Fix dependency issue - builds have failed since monday, this should fix the build error: https://github.com/cds-snc/notification-api/actions/runs/23490450868/job/68547058126
I tested locally with:
And it built successfully.
Release Instructions | Instructions pour le déploiement
None.
Reviewer checklist | Liste de vérification du réviseur