SG-43269 Improve core swap diagnostics with version mismatch detection#1099
Open
carlos-villavicencio-adsk wants to merge 6 commits into
Open
SG-43269 Improve core swap diagnostics with version mismatch detection#1099carlos-villavicencio-adsk wants to merge 6 commits into
carlos-villavicencio-adsk wants to merge 6 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1099 +/- ##
==========================================
+ Coverage 79.42% 79.46% +0.03%
==========================================
Files 198 198
Lines 20753 20778 +25
==========================================
+ Hits 16484 16511 +27
+ Misses 4269 4267 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
stevelittlefish
approved these changes
May 21, 2026
Contributor
Author
| f" changes: https://github.com/shotgunsoftware/tk-core/releases" | ||
| ) | ||
| log.error(error_message) | ||
| raise ImportError(error_message) |
Contributor
Author
There was a problem hiding this comment.
ℹ️ the raise can go here. If the condition is not evaluated, the error is caught anyway (logged and displayed in the UI)
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
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.


What
When Toolkit performs a core swap (e.g. from the bundled Desktop core to a site or project config core), it now:
Why
Core swap failures are notoriously hard to diagnose because the previous log line only printed the target path, with no version context. When a customer upgrades FPT Desktop (which ships a newer bundled tk-core) while their site or project config still pins an older core, the swap can fail with cryptic ModuleNotFoundError or ImportError tracebacks that give no hint about the root cause.
With this change, support and engineers can immediately see entries like:
This cuts down diagnostic time significantly for the class of issues where a project or site config is pinned to an outdated core that is incompatible with the currently running version.
Changes
Testing
Reproduced locally with FPT Desktop v3.0.0 (bundled tk-core v0.23.8) and a project pipeline config pinned to tk-core v0.22.4. The new log lines appear correctly before the failure, and the version mismatch message is emitted with a stack trace attached.