Fix taxonomy deletion on skill wizard loading #757
Merged
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.
Seems like skill page renders before deployment type is set and that results in loading SkillFormGithub, and that eventually calls the /api/github/tree api's. Once the deployment type value is set, it renders the SkillFormNative. Calling of /api/github/tree, overwrite the taxonomy if it sees that the remote sha is not same as local sha. This is expected because in case of the github mode local taxonomy is only read only, and it clones the latest taxonomy if remote sha is not equal to local sha. But in native mode, local taxonomy is used for caching the submitted contribution as well, so it doesn't have to pull any new changes upstream because call the taxonomy changes are in the scope of single user and that too present on the same machine. But in both the mode, local taxonomy is store at directory location, so in case of native mode, if the api/github/tree api is called, it will see that the remote sha is not same as local sha and it will clone the latest from the upstream. This fix ensure that SkillFormGithub is not loaded in native mode.