Skip to content
Latchkey

Liquibase Contexts/Labels Skipping Changesets in CI

Liquibase update succeeded but expected tables/columns are missing because the changesets were filtered out by contexts or labels. A changeset only runs when its context/label expression matches what you pass - a filtering/config issue, not a failure.

What this error means

liquibase update reports success yet downstream steps fail because objects are absent. The changelog runs but specific changesets are marked filtered/skipped due to context or label mismatch.

liquibase output
Skipping changeSet: db/changelog/003-prod-only.xml::seed::alice
  because context "prod" does not match runtime context "test"
... Liquibase command 'update' was executed successfully (0 changesets applied)

Common causes

Changeset context does not match runtime context

A changeset tagged context="prod" is skipped when CI runs with --contexts=test (or none). The update "succeeds" while applying nothing relevant.

Label expression excludes the changeset

A labels filter passed to update excludes changesets whose labels do not match, so they never run.

No contexts passed where changesets require them

Changesets that only run under a named context are skipped entirely when CI passes no context.

How to fix it

Pass the contexts/labels CI needs

Run update with the context and label expression that includes the changesets you expect to apply.

Terminal
liquibase update --contexts=test,common --labels="!prod-only"

Audit which changesets will run

  1. Use liquibase status --verbose (with the same contexts/labels) to see pending vs skipped.
  2. Confirm each required changeset’s context/labels matches the CI invocation.
  3. Avoid over-narrow contexts that exclude schema CI depends on.

How to prevent it

  • Pass an explicit, reviewed --contexts/--labels set in CI.
  • Keep changeset context/label tags consistent with environments.
  • Verify with status --verbose that expected changesets will apply.

Frequently asked questions

What causes "Changesets skipped (contexts/labels)"?
A changeset tagged context="prod" is skipped when CI runs with --contexts=test (or none). The update "succeeds" while applying nothing relevant.
How do I fix Changesets skipped (contexts/labels)?
Run update with the context and label expression that includes the changesets you expect to apply.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card