diff --git a/nebari/upgrade.py b/nebari/upgrade.py index f4dded35ab..f63d0cdd64 100644 --- a/nebari/upgrade.py +++ b/nebari/upgrade.py @@ -18,6 +18,11 @@ def do_upgrade(config_filename, attempt_fixes=False): config = load_yaml(config_filename) + if config.get("qhub_version"): + rich.print( + f"Your config file [purple]{config_filename}[/purple] uses the deprecated qhub_version key. Please change qhub_version to nebari_version and re-run the upgrade command." + ) + return try: verify(config) @@ -26,14 +31,14 @@ def do_upgrade(config_filename, attempt_fixes=False): ) return except (ValidationError, ValueError) as e: - if is_version_accepted(config.get("qhub_version", "")): + if is_version_accepted(config.get("nebari_version", "")): # There is an unrelated validation problem print( f"Your config file {config_filename} appears to be already up-to-date for Nebari version {__version__} but there is another validation error.\n" ) raise e - start_version = config.get("qhub_version", "") + start_version = config.get("nebari_version", "") UpgradeStep.upgrade( config, start_version, __version__, config_filename, attempt_fixes @@ -145,7 +150,7 @@ def upgrade_step(self, config, start_version, config_filename, *args, **kwargs): # Set the new version if start_version == "": - assert "qhub_version" not in config + assert "nebari_version" not in config assert self.version != start_version if self.requires_nebari_version_field():