Skip to content
Latchkey

Great Expectations V2 vs V3 config mismatch in CI

The installed Great Expectations version and your great_expectations.yml disagree on config version. A V2 (batch_kwargs) config under a V3 (Fluent / batch request) install, or the reverse, raises a config or API error.

What this error means

GE fails to load the context with an invalid or unsupported config_version, or a checkpoint written for one API raises attribute errors under the installed version.

great_expectations
great_expectations.exceptions.InvalidConfigVersionError:
The specified config_version 2.0 is not supported by this version of Great Expectations.

Common causes

The GE version drifted from the config it expects

CI installed a GE release that no longer supports the config_version in the committed great_expectations.yml, so context load fails.

Checkpoint code targets the other API

V2 batch_kwargs code runs under a V3 install (or vice versa), so methods or config keys the code assumes are absent.

How to fix it

Pin GE to match your config version

  1. Decide which config version your project uses.
  2. Pin the GE package to a release that supports it.
  3. Keep the pin in the lockfile so CI and local agree.
Terminal
# pin the GE major that matches great_expectations.yml
python -m pip install "great-expectations==0.18.*"

Migrate the config to the installed API

If you want the newer API, upgrade the config and checkpoint code to the Fluent / batch request style rather than pinning to an old release forever.

How to prevent it

  • Pin the GE version and keep it in the lockfile.
  • Migrate config and code together when bumping GE majors.
  • Run the checkpoint locally on the pinned version before pushing.

Frequently asked questions

What causes "GE V2 vs V3 config version"?
CI installed a GE release that no longer supports the config_version in the committed great_expectations.yml, so context load fails.
How do I fix GE V2 vs V3 config version?
Pin GE to match your config version

Related guides

References

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