fix(versioning): accept initial version for newly introduced plugins - #477
Draft
rootkiller6788 wants to merge 1 commit into
Draft
fix(versioning): accept initial version for newly introduced plugins#477rootkiller6788 wants to merge 1 commit into
rootkiller6788 wants to merge 1 commit into
Conversation
A plugin yaml that is newly added at head has no base version to compare against. decide() treated the missing base as a builder-set version that hadn't increased, so every new plugin was reported with a misleading 'version did not increase: base 1.0.0 -> head 1.0.0' failure and the sync workflow's --apply --base HEAD run exited non-zero. Newly introduced plugins are now classified as 'accept': the initial version still has to pass SemVer.parse (strict MAJOR.MINOR.PATCH, no pre-release tags) in analyze_plugin, and there is nothing for it to increase from. Existing plugins keep the monotonic/oversized-major-skip validation unchanged. Adds a regression test suite for the decide()/build_plan() layer.
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
version-plugins.pyauto-bumps catalog plugin versions and validates builder-set bumps. When aplugins.d/<name>.ymlis newly introduced (no yaml at the base ref),analyze_pluginsetsbase_version = head_versionandbuilder_changed_version = True, sodecide()runsvalidate_builder_version(base, head)with equal versions and reports:There is no prior version for a brand-new plugin to increase from — the initial version is the builder's stamp, and it is already required to be a strict
MAJOR.MINOR.PATCHbySemVer.parseinanalyze_plugin. The current behavior makes every plugin onboarding fail (advisory invalidate-plugins.yml, but fatal insync-skills.yml'sversion-plugins.sh --apply --base HEADstep).Change
is_newfield toPluginAnalysis, set when the plugin yaml is absent at the base ref.decide(), accept newly-introduced plugins (verdictaccept) instead of applying the monotonic-increase check, which only makes sense when a base version exists..github/scripts/tests/test_version_plugins.py(10 tests) pinning both the new-plugin fix and the pre-existingdecide()/build_plan()/SemVerbehavior.