Conversation
There was a problem hiding this comment.
Pull request overview
Updates New Relic and adjusts the devcontainer Dockerfile to fix Yarn APT repository key/repo setup issues on Debian Bookworm.
Changes:
- Bump
newrelicPython dependency from11.0.0to11.0.1 - Add Yarn APT repository keyring + source list setup steps in the devcontainer Dockerfile
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pyproject.toml | Updates the pinned New Relic version |
| .devcontainer/Dockerfile | Adds Yarn repo keyring/source configuration for Bookworm |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| mkdir -p /etc/apt/keyrings && \ | ||
| curl -fsSL "https://dl.yarnpkg.com/debian/pubkey.gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/yarn-archive-keyring.gpg && \ | ||
| echo "deb [signed-by=/etc/apt/keyrings/yarn-archive-keyring.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \ | ||
| apt-get update && apt-get clean -y && rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
apt-get clean does not accept -y and may fail the Docker build with an 'option not understood' error. Drop the -y flag (or remove apt-get clean entirely if rm -rf /var/lib/apt/lists/* is already used).
| apt-get update && \ | ||
| apt-get install -y --no-install-recommends gnupg dirmngr curl ca-certificates && \ | ||
| mkdir -p /etc/apt/keyrings && \ | ||
| curl -fsSL "https://dl.yarnpkg.com/debian/pubkey.gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/yarn-archive-keyring.gpg && \ |
There was a problem hiding this comment.
The build currently trusts whatever key is returned by the URL at build time. To reduce supply-chain risk, verify the downloaded key before installing it (e.g., check the expected fingerprint in the Dockerfile and fail if it doesn’t match).
| curl -fsSL "https://dl.yarnpkg.com/debian/pubkey.gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/yarn-archive-keyring.gpg && \ | |
| set -e; \ | |
| YARN_EXPECTED_FPR="72ECF46A56B4AD39C907BBB71646B01B86E50310"; \ | |
| curl -fsSL "https://dl.yarnpkg.com/debian/pubkey.gpg" -o /tmp/yarn-pubkey.gpg; \ | |
| YARN_ACTUAL_FPR="$(gpg --dry-run --import --import-options show-only --with-colons /tmp/yarn-pubkey.gpg | awk -F: '/^fpr:/ {print $10; exit}')"; \ | |
| if [ "$YARN_ACTUAL_FPR" != "$YARN_EXPECTED_FPR" ]; then \ | |
| echo "ERROR: Yarn GPG key fingerprint mismatch: expected $YARN_EXPECTED_FPR but got $YARN_ACTUAL_FPR" >&2; \ | |
| exit 1; \ | |
| fi; \ | |
| gpg --dearmor --yes -o /etc/apt/keyrings/yarn-archive-keyring.gpg /tmp/yarn-pubkey.gpg && \ | |
| rm -f /tmp/yarn-pubkey.gpg && \ |
| mkdir -p /etc/apt/keyrings && \ | ||
| curl -fsSL "https://dl.yarnpkg.com/debian/pubkey.gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/yarn-archive-keyring.gpg && \ | ||
| echo "deb [signed-by=/etc/apt/keyrings/yarn-archive-keyring.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \ | ||
| apt-get update && apt-get clean -y && rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
There are two apt-get update calls in the same layer. If no packages are installed from the Yarn repo in this step, the second update is unnecessary overhead; consider removing it and only running apt-get update immediately before any later apt-get install that depends on the Yarn repo.
| apt-get update && apt-get clean -y && rm -rf /var/lib/apt/lists/* | |
| apt-get clean -y && rm -rf /var/lib/apt/lists/* |
Summary | Résumé
Related Issues | Cartes liées
Test instructions | Instructions pour tester la modification
TODO: Fill in test instructions for the reviewer.
Release Instructions | Instructions pour le déploiement
None.
Reviewer checklist | Liste de vérification du réviseur