fix: prevent unnecessary updates to the globalConfig file #1535
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.
Issue number: ADDON-77791
PR Type
What kind of change does this PR introduce?
Summary
Changes
Prevent unnecessary updates to the globalConfig file. To reproduce it - create a fresh add-on using
init -> build
commands and you shall see multiple log lines with "Updated globalConfig schema to version " which should not be needed as it is a completely fresh add-on which should already use the latest version of the globalConfig file.The old logic relies on
_uccVersion
field which is also no longer present (#1519) in the globalConfig file.The new logic explicitly declares a list of supported schema versions (which is not the most elegant solution) and uses "0.0.0" in case
schemaVersion
is not known (this is possible in add-ons built with older versions of Add-on Builder).User experience
No unnecessary updates to the globalConfig file.
Checklist
If an item doesn't apply to your changes, leave it unchecked.