Skip to content

fix(config): migrate legacy Docker provider settings - #741

Merged
haiphucnguyen merged 2 commits into
askimo-ai:mainfrom
jeonjw85:fix/docker-provider-migration
Sep 30, 2026
Merged

haiphucnguyen merged 2 commits into
askimo-ai:mainfrom
jeonjw85:fix/docker-provider-migration

Conversation

@jeonjw85

@jeonjw85 jeonjw85 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Legacy DOCKER entries fail to load because the migration uses the template name instead of the old enum name.

Migrate each provider from the parsed YAML tree. This fixes the name mapping and prevents one entry from changing another entry's template. Existing templates and unrelated fields are preserved, and the config is saved only after successful deserialization.

Migrated files are reserialized by the existing YAML mapper, so comments and formatting are not preserved. Files that need no migration are not rewritten.

How to Test

./gradlew :cli:test --tests 'io.askimo.core.config.AppConfig*Test'
./gradlew spotlessCheck detekt

All 59 config tests pass, including 29 migration cases. Coverage includes multiple providers, quoting, field order, empty or missing templates, invalid configs, and repeated loads. Before the follow-up fix, 19 cases failed.

CLI tests pass with Docker tests disabled and ANTHROPIC_API_KEY unset. Desktop tests, Spotless, and Detekt also pass. The full test run still has 9 failures in FileContentExtractorTest (AskimoHome not registered), also reproduced before this PR.

Checklist

  • Read the contribution guide
  • Branch is up to date with main
  • Ran spotlessApply, spotlessCheck, and detekt
  • All tests pass (see above)
  • Added regression tests
  • Commits are signed off (DCO)
  • One fix per PR

@CLAassistant

CLAassistant commented Sep 30, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@haiphucnguyen

Copy link
Copy Markdown
Collaborator

Thank you @jeonjw85 for this PR! Can you sign the CLA before I can merge?

@jeonjw85

Copy link
Copy Markdown
Contributor Author

Thanks! I've signed the CLA.

@haiphucnguyen haiphucnguyen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jeonjw85 for the fix and the comprehensive test cases. LGTM!

@haiphucnguyen
haiphucnguyen merged commit ae8a300 into askimo-ai:main Sep 30, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants