Skip to content

Conversation

@jimleroyer
Copy link
Member

Summary | Résumé

Moved package installation from the run_celery_exit.sh script into the image creation. This makes the image safer as the images should be immutable after creation and the celery exit script should be faster as well, getting away from installing package on last minute.

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

Make sure the Celery instances shutdown properly.

Release Instructions | Instructions pour le déploiement

Make sure the Celery instances shutdown properly.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.


function on_exit {
apk add --no-cache procps
apk add --no-cache coreutils
Copy link
Member Author

Choose a reason for hiding this comment

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

These are the two packages that we want to get installed earlier during Docker image creation.

Copy link
Contributor

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 PR improves Docker image immutability and Celery shutdown performance by moving the installation of procps and coreutils packages from the runtime exit script into the Docker image build process.

  • Removed dynamic package installation from run_celery_exit.sh
  • Added procps and coreutils to Alpine-based Dockerfiles (ci/Dockerfile and ci/Dockerfile.test)
  • Added coreutils to the Debian-based devcontainer Dockerfile

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
scripts/run_celery_exit.sh Removed runtime installation of procps and coreutils packages from the exit handler
ci/Dockerfile Added procps and coreutils to the Alpine package installation list and improved formatting
ci/Dockerfile.test Added procps and coreutils to the Alpine package installation list and improved formatting
.devcontainer/Dockerfile Added coreutils to the Debian package installation list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +15 to +16
coreutils \
procps \
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The package ordering is inconsistent between the two Alpine Dockerfiles. In ci/Dockerfile, procps appears before coreutils (lines 12-13), while in ci/Dockerfile.test, coreutils appears before procps (lines 15-16). For better maintainability and consistency, these packages should be ordered the same way in both files. Consider using alphabetical ordering for all packages to make the lists easier to maintain and compare.

Suggested change
coreutils \
procps \
procps \
coreutils \

Copilot uses AI. Check for mistakes.
&& apt-get -y install \
2>&1 && \
apt-get -y install \
coreutils \
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The coreutils package is pre-installed by default in Debian-based images (including the mcr.microsoft.com/vscode/devcontainers/python base image). Explicitly adding it to the package list is redundant and unnecessary. Consider removing this line as it doesn't add any value and may cause confusion about why it's being explicitly installed.

Suggested change
coreutils \

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@whabanks whabanks left a comment

Choose a reason for hiding this comment

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

LGTM, great catch maintaining immutability post-build 🚀.

@jimleroyer jimleroyer merged commit 3c82cb3 into dev Jan 2, 2026
3 checks passed
@jimleroyer jimleroyer deleted the feat/install-pkg-during-build-only branch January 2, 2026 15:13
ben851 added a commit that referenced this pull request Jan 5, 2026
* adding workflows for fresh deploys to dev from 'dev' branch

* updates for names and removing ghost code. from staging workflow

* new workflow to handle building and deploying images to our dev ECR on dev branch changes

* Delete .github/workflows/lambda_staging.yml

we dont need this

* adding trigger for manifest workflow

* adding back this file to state it was in main

* fixintg

* adding latest tags

* updating image names for consistency

* adding workflows to build and push  and tag accordingly to all 3 ECRs using the new roles in TF

* using var for the branch in the role name

* same for role-session-name

* tightening this up, and calling manifests update docker tag

* calling the right workflow

* just commenting out prod for this until it's released and working

* setting up secrets properly

* removing matrix to get this working

* fixing secrets reference

* need to upload to manage the image

* testing against dev and stagin, removing latest tags

* simplifying to only push sha tag, and skips if exiswts

* turning back on the workflow call in manifests

* removing extra argument

* updating some names

* just making it dev for now

* just updating comments

* nothing

* updating token

* nothing the token just needed to be updated

* better error handling

* tweaks

* adding dev back

* just tweaking

* bringing back the stuff

* whoops

* nothing

* nothing2

* removing comments

* Trigger workflow: empty commit

* Trigger workflow: empty commit

* adding latest tag

* rolling back

* Trigger workflow: empty commit

* Trigger workflow: empty commit

* Trigger workflow: empty commit

* QA test (#2737)

* Added a Monthly Notification Stats summary table (#2734)

* added a summary table

* Update migrations/versions/0500_add_materialized_view.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* QA test

---------

Co-authored-by: Jumana B <jzbahrai@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Larabie <ben.larabie@blarabie-jtfk.home>

* Moved packages from exit script to build image creation (#2742)

* Moved packages from exit script to build image creation

* Removed coreutils from the devcontainer package installation; this would be included by default in debian

* Ordered package to be the same across Dockerfile files

---------

Co-authored-by: Michael Pond <mikepond11@gmail.com>
Co-authored-by: Mike Pond <32133001+P0NDER0SA@users.noreply.github.com>
Co-authored-by: Ben Larabie <benlarabie@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Larabie <ben.larabie@blarabie-jtfk.home>
Co-authored-by: Jimmy Royer <jimleroyer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants