Update: Add pluginUpdatePolicy and fix plugin update reporting/execution#223
Merged
Conversation
…ion (fixes #222) Course import had three plugin-update defects: - the status report (getPluginUpdateStatus) disagreed with the executor, so it promised updates that never happened for local installs; - plugin updates were only applied when at least one plugin was also being installed (nested in 'if (pluginsToInstall.length)'), so update-only imports silently dropped them while still reporting success; - there was no way to separate managed from custom plugin updates. Introduce pluginUpdatePolicy ('none'|'custom'|'all', default 'custom') and a single pure resolvePluginAction used by both the status report and the executor so they cannot disagree. Run install/update whenever there is anything to install or update; record rollback metadata for all updates. Report which other courses a shared-plugin update affects. Legacy updatePlugins is mapped for compatibility (true->all, explicit false->none). Behaviour change: with no flag passed, custom plugins now update upward on import (previously nothing updated).
|
🎉 This PR is included in version 3.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Fixes #222
Update
pluginUpdatePolicy: 'none' | 'custom' | 'all'import setting (defaultcustom): update custom (local) plugins upward, leave managed plugins unlessall. LegacyupdatePluginsis mapped for compatibility (true→all, explicit false→none, absent→default).resolvePluginActionis the source of truth for the per-plugin decision;getPluginUpdateStatusis now a thin mapper over it, so the import status report and the executor can no longer disagree.PLUGIN_UPDATE_AFFECTS_COURSES.Fix
if (pluginsToInstall.length)); update-only imports silently dropped them while still reporting success. Install/update now runs whenever there's anything to install or update, with the missing-plugin/importPluginscheck scoped to actual installs.updatedContentPlugins) is now recorded for every update, not only when an install also occurred.Breaking / behaviour change
Updatefor review — retagBreakingif a major bump is preferred. ExistingupdatePlugins:falsecallers keep "update nothing" (→none).Testing
tests/utils-resolvePluginAction.spec.js— table-driven over installed?/older/equal/newer × custom/managed × none/custom/all.tests/utils-resolvePluginUpdatePolicy.spec.js— legacy-flag compat mapping.tests/utils-getPluginUpdateStatus.spec.js— updated to policy semantics and asserts alignment with the resolver.standardclean.Follow-up (out of scope)
adapt-authoring-ui) should exposepluginUpdatePolicyand migrate off theupdatePluginscheckbox; until then the new default applies to API callers that omit both fields.