dependency
Anything a program needs in order to work, such as a library, a tool or another service.
In more detail
Dependencies can be inside the program, such as libraries and packages, or outside it, such as a database or another service. Recording them with versions lets someone else reproduce the same setup.
Examples
An Ansible project depends on a pinned ansible-core in requirements.txt and on collections and roles listed in requirements.yml.In a layered design system a component's dependencies must come from lower layers only.Product teams treat the design system as a dependency and pin its version; if upgrades keep breaking things they stop upgrading.The twelve-factor app says every dependency must be declared exactly and isolated at run time, including system tools the app calls out to. Backing services such as databases are dependencies reached over the network.go mod tidy keeps go.mod in step with the imports<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId>...Packages declare their dependencies in their metadata, and the package manager installs or keeps them so every required relationship stays satisfied. Removing a library other packages depend on would break them, so the manager removes or refuses accordingly. Systemd units have their own kind of dependency on other units.pip show requests lists what requests depends on.In Terraform: Terraform uses the word in two ways. Between resources, a dependency is an ordering: one must exist before another. For a project, providers and public modules are dependencies you download and should review, pin and upgrade deliberately.In this course: In testing, the dependencies that matter are the ones that are slow, shared or outside your control, such as databases, networks, clocks and random sources. Unit tests replace them with doubles; integration tests use the real thing on purpose.Related terms
- pinning — Fixing an exact version or digest of something you depend on so it cannot change without you noticing.
- requirements.yml — A YAML file listing the collections and roles a project depends on, with versions, for ansible-galaxy to install.
- requirements.txt — A text file listing the Python packages, and usually their exact versions, that pip should install for a project.
- Ansible Galaxy — The public online hub for sharing Ansible roles and collections, and the ansible-galaxy command that installs from it.
- mock — A test double that stands in for a real dependency and checks that the code under test calls it in the expected way.
- timeout — A limit on how long a caller waits for an answer before giving up.
- retry — Sending a request again after it failed or timed out, in the hope that it succeeds the second time.
- lock file — A file listing the exact version of every dependency, so installs are repeatable.
- dependency cache — Saved copies of downloaded dependencies that GitHub Actions restores into later runs so they need not be fetched again.
- shared library — Ready-made code that many programs load at run time instead of each carrying its own copy.
- depends_on — A Compose setting that makes one service start only after the services it needs.
- language runtime — The software a programming language needs installed to run programs, such as the Python interpreter or Node.js.
- Lambda concurrency — How many copies of a function are running at the same moment, which Lambda caps with an account and optional per-function quota.
- desired capacity — The number of instances or tasks a scaling group or service tries to keep running, kept between a minimum and a maximum.
- layered architecture — Organising a system into ranked layers where each layer may only use layers below it.
- circular dependency — Two or more pieces of code or data that depend on each other in a loop, so none can be built or resolved first.
- semantic versioning — A version numbering scheme of three numbers, major.minor.patch, raised for breaking changes, new features and fixes respectively.
- dependency declaration — Listing every dependency an app needs, with exact versions, in a manifest, and isolating the app so nothing else leaks in at run time.
- backing service — Any service an application uses over the network, such as a database, cache, queue, mail relay or payments provider.
- package manager — A tool that installs, updates and removes software together with what it depends on, such as apt on Debian, apk on Alpine or Homebrew on macOS.
- upstream and downstream — Directions along a chain: upstream is what you depend on or receive from, and downstream is what depends on you or receives from you.
- task graph — A map of which build tasks depend on which others, used to decide what must run first and what can run at the same time.
- lockfile — A file that records the exact version of every dependency, including transitive ones, so every install gets the same set.
- transitive dependency — A package your code needs only because one of your own dependencies needs it.
- Maven coordinates — The group, artifact and version that together uniquely name a project or library, such as com.example:inventory:1.0.0.
- dependency scope — A Maven setting on a dependency that says when it is on the class path, such as only while compiling and running tests.
- dependency resolution — The package manager's work of choosing which packages and versions to install, upgrade or remove so every declared dependency stays satisfied.
- software package — An archive containing a program's files plus metadata: its name, version, dependencies and scripts to run on install or removal.
- unit dependency — A setting that says a systemd unit needs another unit started with it, either softly (Wants=) or strictly (Requires=).
- npm — The package manager that comes with Node.js, plus the public registry where JavaScript packages are published.
- package.json — The JSON file at the root of every JavaScript package that records its name, version, dependencies, entry points and other settings.
- pip — Python's standard package installer, which downloads packages from the Python Package Index and installs them.
- requirements file — A text file, usually requirements.txt, listing the packages a project needs, one per line, often pinned to exact versions.
- PyPI — The Python Package Index at pypi.org, the public online catalogue from which pip downloads third-party packages.
- typosquatting — Registering a name that differs from a popular one by a small typing mistake, such as a lookalike domain or package name, to catch people who mistype it.
- hard dependency — A dependency whose failure makes your own request fail, so its availability multiplies into yours.
- soft dependency — A dependency you can do without by degrading, so its failure does not fail your request.
- availability — The share of time, or of requests, in which a service works for the people who need it, often written as a percentage such as 99.9 per cent.
- implicit dependency — An ordering between two resources that Terraform works out for itself because one refers to the other.
- dependency lock file — The .terraform.lock.hcl file that terraform init writes to record the exact provider versions chosen and their checksums.
- public module — A reusable module published to the Terraform Registry, called by an address such as terraform-aws-modules/vpc/aws.
- collaborator — Another object or service that the code under test calls to get its work done, such as a payment gateway or a clock.
- test double — Any object that replaces a real dependency in a test: a stub returns canned data, a fake is a small working implementation, and a mock checks interactions.
- integration test — A test that checks several real parts working together, such as the service talking to a real database.
Taught in
- Installing Ansible — Ansible Configuration Management at Scale
- Writing Your First Playbook — Ansible Configuration Management at Scale
- Handlers And Notify — Ansible Configuration Management at Scale
- Using Collections — Ansible Configuration Management at Scale
- Ansible Galaxy — Ansible Configuration Management at Scale
- Error Handling And Safe Retries — Modern API Architecture: REST, GraphQL & gRPC
- Mocking Dependencies — Modern API Architecture: REST, GraphQL & gRPC
- Security Best Practices — Modern API Architecture: REST, GraphQL & gRPC
- Passing Data Between Jobs: Artifacts — Continuous Integration & Continuous Delivery Pipelines
- Speeding Up Builds: Caching Dependencies — Continuous Integration & Continuous Delivery Pipelines
- Probes And Health Checks — Certified Kubernetes Application Developer (CKAD) Exam Prep
- The Danger of Long-Lived Keys — Cloud Infrastructure & Hyperscaler Architecture
- Policy Simulation and Dry Runs — Cloud Infrastructure & Hyperscaler Architecture
- Elastic Compute Cloud (EC2) — Cloud Infrastructure & Hyperscaler Architecture
- Containers on AWS (ECS and EKS) — Cloud Infrastructure & Hyperscaler Architecture
- Serverless Compute (Lambda) — Cloud Infrastructure & Hyperscaler Architecture
- Comparing Compute Options — Cloud Infrastructure & Hyperscaler Architecture
- Auto Scaling Groups — Cloud Infrastructure & Hyperscaler Architecture
- Infrastructure as Code (Handover to Terraform) — Cloud Infrastructure & Hyperscaler Architecture
- Shift-Left Security Principles & Automated Pipeline Gates — Cloud Security & DevSecOps Engineering
- Software Composition Analysis with Trivy — Cloud Security & DevSecOps Engineering
- Supply Chain Security: SBOMs & Cosign Signing — Cloud Security & DevSecOps Engineering
- Container Hardening: Distroless & Rootless — Cloud Security & DevSecOps Engineering
- Security Baselines, Policies & Hardening Standards — Cybersecurity Fundamentals, GRC & Cryptography
- Regulatory Compliance: SOC 2, HIPAA, GDPR & PCI-DSS — Cybersecurity Fundamentals, GRC & Cryptography
- Vendor & Third-Party Risk Management Programs — Cybersecurity Fundamentals, GRC & Cryptography
- Symmetric Encryption: AES-GCM & ChaCha20 — Cybersecurity Fundamentals, GRC & Cryptography
- Asymmetric Cryptography: RSA, ECC & Diffie-Hellman — Cybersecurity Fundamentals, GRC & Cryptography
- Cryptographic Hashing: SHA-256, SHA-3 & Passwords — Cybersecurity Fundamentals, GRC & Cryptography
- Data Classification Schemes & Sensitivity Labeling — Cybersecurity Fundamentals, GRC & Cryptography
- Business Impact Analysis, RTO & RPO Modeling — Cybersecurity Fundamentals, GRC & Cryptography
- Backup Architectures: 3-2-1, Immutability & Air-Gaps — Cybersecurity Fundamentals, GRC & Cryptography
- Design Systems Architecture: Foundations, Layers & Taxonomy — Design Systems & Component Engineering
- System Governance: Changesets, Semantic Versioning & Deprecation — Design Systems & Component Engineering
- Codebase And Dependencies — DevOps & Site Reliability Engineering
- Admin Processes And The Open Source Update — DevOps & Site Reliability Engineering
- RUN, SHELL And Efficient Layer Caching — Docker Architecture & Production Containers
- Multi Stage Builds, Targets And Build Secrets — Docker Architecture & Production Containers
- Minimal Bases, Non Root Users And Smaller Images — Docker Architecture & Production Containers
- Scan, Patch And Inspect The Software Supply Chain — Docker Architecture & Production Containers
- Define The Service And Database With Compose — Docker Architecture & Production Containers
- Health Checks, Dependencies And Reliable Startup — Docker Architecture & Production Containers
- Integration Tests, Test Data And Compose Cleanup — Docker Architecture & Production Containers
- Diagnose Crashes, Resource Limits And Unhealthy Containers — Docker Architecture & Production Containers
- From Local Containers To Kubernetes — Docker Architecture & Production Containers
- Directory.Build.props, global.json and Central Packages — Modern .NET Core, C# & Enterprise Microservices
- Source-Generated Mapping with Mapperly — Modern .NET Core, C# & Enterprise Microservices
- Health Checks — Modern .NET Core, C# & Enterprise Microservices
- Monorepo Architecture: Workspaces & Turborepo — Production Full-Stack Engineering
- Unified Build Pipelines: Caching & Dependency Graphs — Production Full-Stack Engineering
- Health Probes & Graceful Shutdown: Kubernetes Lifecycles — Production Full-Stack Engineering
- Containerization Architecture: Multi-Stage Dockerfiles — Production Full-Stack Engineering
- What Go Is and Why It Matters — Concurrent Systems Programming with Go
- Installing the Go Toolchain — Concurrent Systems Programming with Go
- Go Workspaces and Modules — Concurrent Systems Programming with Go
- Parsing Arguments with flag — Concurrent Systems Programming with Go
- Serving HTTP with net/http Server — Concurrent Systems Programming with Go
- Graceful Shutdown on SIGTERM — Concurrent Systems Programming with Go
- Building Static Binaries — Concurrent Systems Programming with Go
- The Toolchain: Maven — Modern Java: Virtual Threads & High-Throughput Services
- The Toolchain: Gradle — Modern Java: Virtual Threads & High-Throughput Services
- Spring Boot Auto Configuration — Modern Java: Virtual Threads & High-Throughput Services
- What A Package Manager Guarantees — Linux Fundamentals & Systems Administration
- Three Families: apt, dnf And pacman — Linux Fundamentals & Systems Administration
- App Router Architecture: Server-First Paradigms — Next.js 15 & Modern App Router Architecture
- Server Components: Async Execution & Constraints — Next.js 15 & Modern App Router Architecture
- Client Components: use client & Hydration Models — Next.js 15 & Modern App Router Architecture
- Component Tree Composition: Interleaving RSC & Client — Next.js 15 & Modern App Router Architecture
- Streaming SSR: Progressive HTML & Chunked Transfers — Next.js 15 & Modern App Router Architecture
- Containerized Deployment: Multi-Stage Docker Builds — Next.js 15 & Modern App Router Architecture
- Native Module Systems: ESM Loader Hooks vs CommonJS — Node.js Internals & Backend Services
- Runtime Configuration: CLI Flags & Native --env-file — Node.js Internals & Backend Services
- Native Test Runner: node:test & node:assert/strict — Node.js Internals & Backend Services
- pip, requirements, and installing packages — Hands-on Python: Complete Video Course & Book
- Shipping: scripts, entry points and git — Hands-on Python: Complete Video Course & Book
- Dependency Risk And Typosquatting — Application Security & Threat Modeling for Engineers
- Lockfiles And Reproducible Builds — Application Security & Threat Modeling for Engineers
- Image Scanning And Trivy — Application Security & Threat Modeling for Engineers
- Requirements: The Constraints That Shape The System — Scalable System Design & Distributed Architecture
- Replication, Failover And Leader Election — Scalable System Design & Distributed Architecture
- Caching Strategies And Topology — Scalable System Design & Distributed Architecture
- Queues, Events And Asynchronous Work — Scalable System Design & Distributed Architecture
- Load Balancing And The Failure Modes It Introduces — Scalable System Design & Distributed Architecture
- Timeouts, And Avoiding Cascaded Failure — Scalable System Design & Distributed Architecture
- Retries, Backoff And Jitter — Scalable System Design & Distributed Architecture
- Circuit Breakers — Scalable System Design & Distributed Architecture
- Capacity Planning As A Design Input — Scalable System Design & Distributed Architecture
- What Is Infrastructure As Code? — Infrastructure as Code with Terraform
- Writing Your First Configuration In HCL — Infrastructure as Code with Terraform
- The Terraform Registry And Public Modules — Infrastructure as Code with Terraform
- Explicit Dependencies With Depends On — Infrastructure as Code with Terraform
- What Test Doubles Are For — Automated Testing, TDD & Quality Engineering
- Testing Time And Randomness — Automated Testing, TDD & Quality Engineering
- Integration Testing With Containers — Automated Testing, TDD & Quality Engineering
- Function Utilities: ReturnType, Parameters And Constructor — Production TypeScript
- ECMAScript Modules, CJS Interop And verbatimModuleSyntax — Production TypeScript
- Infrastructure As Code, And One Workflow For Every Platform — HashiCorp Terraform Associate (004) Exam Prep
- Providers: How Terraform Reaches Every API — HashiCorp Terraform Associate (004) Exam Prep
- Versions, The Lock File And Provider Aliases — HashiCorp Terraform Associate (004) Exam Prep
- State: Terraform's Memory Of What It Built — HashiCorp Terraform Associate (004) Exam Prep
- Write, Plan, Apply, And What Init Prepares — HashiCorp Terraform Associate (004) Exam Prep
- Reading A Plan, Saving It, Applying It — HashiCorp Terraform Associate (004) Exam Prep
- Validate, Format, Destroy, And The Flags That Bend A Plan — HashiCorp Terraform Associate (004) Exam Prep
- Count, For Each And Dynamic Blocks — HashiCorp Terraform Associate (004) Exam Prep
- Loops: One Task, Many Items — RHCE in Ansible (EX294): Automate Red Hat Systems
- Roles: The Directory Ansible Expects, Defaults And Handlers — RHCE in Ansible (EX294): Automate Red Hat Systems
- Packages And Repositories: yum_repository And dnf — RHCE in Ansible (EX294): Automate Red Hat Systems
- Services And Boot Targets: Started Is Not Enabled — RHCE in Ansible (EX294): Automate Red Hat Systems
- Scheduling: cron Jobs With Names, And Timers — RHCE in Ansible (EX294): Automate Red Hat Systems
- Drill: A Web Node From A Ticket — RHCE in Ansible (EX294): Automate Red Hat Systems
- Drill: People, Passwords And sudo From The Vault — RHCE in Ansible (EX294): Automate Red Hat Systems
- Mock Exam, Part 1: Seven Tasks Across Three Sections — RHCE in Ansible (EX294): Automate Red Hat Systems
References
- Installing collections
- AWS Prescriptive Guidance: Retry with backoff pattern
- pip: Repeatable installs
- Docker overview
- Control startup order in Compose
- AWS Builders Library: Avoiding overload in distributed systems
- GitHub: about the dependency graph
- NIST SP 800-34 Rev. 1: Contingency Planning Guide for Federal Information Systems
- npm Docs: package.json dependencies
- What is NuGet?
- Apache Maven: Introduction to the Dependency Mechanism
- Debian Policy Manual: declaring relationships between packages
- Fedora Docs: DNF
- npm Docs: package.json
- Packaging guide: managing application dependencies
- OWASP Vulnerable Dependency Management Cheat Sheet
- AWS whitepaper: Availability and Beyond
- Resource dependencies
- Dependency lock file
- Python Packaging User Guide: glossary
- Martin Fowler: inversion of control containers and the dependency injection pattern