fix: deploying production items no longer tries to load unrelated items#978
Open
isc-pbarton wants to merge 1 commit into
Open
fix: deploying production items no longer tries to load unrelated items#978isc-pbarton wants to merge 1 commit into
isc-pbarton wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #978 +/- ##
==========================================
+ Coverage 49.24% 49.25% +0.01%
==========================================
Files 22 22
Lines 3300 3301 +1
==========================================
+ Hits 1625 1626 +1
Misses 1675 1675 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Description
Fixes #977
The code path leading to the bug is: User tries to deploy a change through the deployment manager, while having an unrelated item in the Git repository. It calls the source control extension OnAfterSave hooks. OnAfterSave calls GetModifiedItemsAfterSave. For an unknown reason it goes through the code path for edits from an IDE rather than the Interoperability Portal (not worth tracing down, as it should work either way). GetModifiedItemsAfterSave recompiles the production to regenerate the Ens_Config.Item table so we can query it to find if items were added/deleted. (MODIFICATION HERE.) The recompile calls the source control extension OnAfterCompile hooks, which calls RefreshUncommitted, which calls ExternalNameToInternalName, which does a test load of each modified item in the git repo, which fails for some totally unrelated item. Since the load fails inside of a compile, the compile returns a failure, the whole deployment ends up failing.
Where I say MODIFICATION HERE: we
new %SourceControlto break the chain. We should not be calling source control hooks when doing that compile.Testing
Unit test case replicates reported bug. Before the fix it failed, now it succeeds.
Checklist
mainbranch rebased or merged.git-webui/srchave matching changes ingit-webui/release)