Interview Prep/DevOps Fundamentals/Branching, versioning & releases

What is semantic versioning?

BeginnerConceptBranching, versioning & releases
Answer

In one line: Semantic versioning (SemVer) is a version format MAJOR.MINOR.PATCH — like 2.4.1 — where each number tells users what kind of change the release contains.

The rules:

  • MAJOR (2.x.x) — increase when you make breaking changes (old clients or integrations may stop working).
  • MINOR (x.4.x) — increase when you add new features in a backward-compatible way.
  • PATCH (x.x.1) — increase for backward-compatible bug fixes.

When you increase one number, reset the numbers to its right: 2.4.1 → new feature → 2.5.0; breaking change → 3.0.0.

Extras:

  • Pre-release: 3.0.0-beta.1, 3.0.0-rc.2.
  • Build metadata: 2.5.0+build.457 (ignored when comparing versions).
  • 0.x.y — initial development; anything can change.

Why it matters in DevOps:

  1. Dependency safety — ^2.4.1 in npm means "any 2.x version from 2.4.1", trusting that minor/patch updates won't break you.
  2. Clear communication — users know whether an upgrade is safe.
  3. Artifact and image tags — orders:2.5.0 is meaningful; orders:latest is not.
  4. Helm charts and APIs are versioned the same way.

Automating versions:

  • Conventional Commits (feat:, fix:, feat!: / BREAKING CHANGE:) let tools like semantic-release or release-please decide the next version automatically and generate changelogs.

Example: commit messages fix: handle empty cart → release 1.8.3; feat: add wishlist → 1.9.0; feat!: remove v1 API → 2.0.0.

Tip for interviews: explain what each number means and mention automated versioning from commit messages.

All DevOps Fundamentals questions

More on Branching, versioning & releases