pinning

Fixing an exact version or digest of something you depend on so it cannot change without you noticing.

In more detail

Pinned inputs make installs reproducible and stop an upstream release from silently changing what you run. The cost is that you must raise the pin yourself, after review, to receive fixes.

Examples

ansible-core==2.21.4 in requirements.txt, and version: 2.0.0 for a collection in requirements.yml.
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
Unpinned versions make a build unrepeatable over time even if it is repeatable across machines, and they fail on the day you most need a rebuild. Declaring exact versions is half of factor II of the twelve-factor app.
FROM python:3.12-alpine@sha256:<digest>
The Maven Wrapper pins the Maven version; postgres:16 pins the test database image.
requests==2.32.3 in requirements.txt pins an exact version.
requests==2.32.3
In Terraform you pin module versions in the module block and rely on the lock file to pin exact provider versions. Pinning exactly is safe but ages badly, so most teams combine a pessimistic constraint with a committed lock file and upgrade deliberately.
In this course: A test that starts postgres:16.4 behaves the same next month; one that starts postgres:latest may not. Update pins on purpose, with the tests as your safety net.

Related terms

Taught in

References

Certification courses