-
Notifications
You must be signed in to change notification settings - Fork 66
chore(cli): remove unusued api key migration (FXC-3298) #2935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a67a4a4 to
0ddd570
Compare
daquinteroflex
approved these changes
Oct 28, 2025
0ddd570 to
ff5063d
Compare
ff5063d to
0fec847
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 files reviewed, 1 comment
momchil-flex
approved these changes
Oct 28, 2025
Collaborator
momchil-flex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works, I no longer see the message.
Contributor
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
tidy3d/config/loader.pytidy3d/web/cli/app.py |
auto-merge was automatically disabled
October 28, 2025 17:34
Pull Request is not mergeable
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greptile Overview
Updated On: 2025-10-28 16:24:10 UTC
Greptile Summary
Removes the deprecated API key migration functionality that converted legacy
auth.json(email/password) to API key authentication. The PR cleans up unused migration code while preserving the separate config file migration feature that moves files from~/.tidy3dto the canonical XDG config directory.Key changes:
tidy3d/web/cli/migrate.pymodule and its teststidy3d migratecommand from root CLI (now onlytidy3d config migrateexists for file migration)tidy3d/web/__init__.py_run_config_migration()helper function inapp.pyto handle edge casesresolve_config_directory()inloader.pyto prefer canonical directory over legacyCREDENTIAL_FILEconstantConfidence Score: 3/5
_run_config_migration()function has a logic flaw where--delete-legacycan delete the legacy config directory even when the canonical directory exists but is empty or corrupted, potentially causing data losstidy3d/web/cli/app.py:155-168for the data loss issue in the migration logicImportant Files Changed
File Analysis
Sequence Diagram
sequenceDiagram participant User participant CLI participant Loader participant ConfigDir Note over User,ConfigDir: Before PR: API Key Migration Flow User->>CLI: tidy3d migrate CLI->>CLI: Check auth.json exists CLI->>CLI: Authenticate with email/password CLI->>CLI: Fetch/create API key CLI->>CLI: Save to config.toml CLI->>CLI: Backup auth.json to auth.json.bak Note over User,ConfigDir: After PR: Simplified Flow User->>CLI: import tidy3d Note over CLI: No automatic migration CLI->>Loader: resolve_config_directory() Loader->>Loader: Check TIDY3D_BASE_DIR override alt Canonical dir writable Loader->>ConfigDir: Use canonical (~/.config/tidy3d) alt Legacy exists Loader-->>User: Warning: legacy ignored, run migrate end else Legacy exists Loader->>ConfigDir: Use legacy (~/.tidy3d) Loader-->>User: Warning: consider migration else Neither writable Loader->>ConfigDir: Use temp directory end Note over User,ConfigDir: Manual Config Migration User->>CLI: tidy3d config migrate --delete-legacy CLI->>CLI: Check legacy dir exists CLI->>CLI: migrate_legacy_config() alt FileExistsError & delete_legacy CLI->>CLI: Delete legacy directory CLI-->>User: Skipped copy, deleted legacy else FileExistsError CLI-->>User: Error: use --overwrite else Success CLI->>ConfigDir: Copy files to canonical alt delete_legacy CLI->>CLI: Remove legacy directory end CLI-->>User: Migration complete end