Is your feature request related to a problem? Please describe
Current builder version check blocks publication process until migration is not completed.
It directly impacts Apihub operations and not acceptable.
Describe the solution you'd like
Need to modify existing builder version check. New version should consider migration running.
If migration is in progress, then publication should be allowed even if previous version is built with old builder (not migrated yet). If the This case need to add a special version metadata field called previousBuilderVersion.
But this rule is applicable only in case of minor or patch builder version change.
Examples:
- 1.0.0 -> 1.0.1 - continue build
- 1.0.0 -> 1.1.0 - continue build
- 1.0.0 -> 2.0.0 - fail build
Migration status should be retrieved from /api/v1/system/info, property migrationInProgress.
Scope/design
api-processor scope
Definitions: current api-processor version === version of the api-processor currently building the changelog
Add apiProcessorVersionValidationLevel (optional) to BuilderRunOptions, possible values are:
Note: this should be added to BuilderRunOptions, not to BuildConfig, since it is a so it is a transient option for the current build try, not something we want persisted in the BuildConfig.
Modify the validateApiProcessorVersion so that
- if
apiProcessorVersionValidationLevel is major, validation fails only if major part of the builderVersion for previous or current package version differs from the major part of current api-processor version
- if any of versions are not parseable as SemVer, validation should not fail
- if
apiProcessorVersionValidationLevel is strict, validation fails if builderVersion for previous or current package version differs from current api-processor version (current behaviour)
Store build version for package versions participating in the comparison if they differ from the current api-processor version
- if
builderVersion for the previous package version differs from the current api-processor version, store builderVersion for the previous package version to the previousVersionBuilderVersion in the info.json of the changelog build result. Do not add previousVersionBuilderVersion if it the same as current api-processor version.
-if builderVersion for the current package version differs from the current api-processor version, store builderVersion for the current package version to the currentVersionBuilderVersion in the info.json of the changelog build result. Do not add currentVersionBuilderVersion if it the same as current api-processor version.
So, overall info.json:
- will have
builderVersion holding current api-processor version
- may have
previousVersionBuilderVersion
- may have
currentVersionBuilderVersion
Document new properties in the API specification
UI scope
If migration is in progress (as reported by /api/v1/system/info, property migrationInProgress), start changelog builds with apiProcessorVersionValidationLevel set to major
Build task consumer
Same as UI
Is your feature request related to a problem? Please describe
Current builder version check blocks publication process until migration is not completed.
It directly impacts Apihub operations and not acceptable.
Describe the solution you'd like
Need to modify existing builder version check. New version should consider migration running.
If migration is in progress, then publication should be allowed even if previous version is built with old builder (not migrated yet). If the This case need to add a special version metadata field called
previousBuilderVersion.But this rule is applicable only in case of minor or patch builder version change.
Examples:
Migration status should be retrieved from
/api/v1/system/info, propertymigrationInProgress.Scope/design
api-processor scope
Definitions: current api-processor version === version of the api-processor currently building the changelog
Add
apiProcessorVersionValidationLevel(optional) to BuilderRunOptions, possible values are:majorstrict(default)Note: this should be added to BuilderRunOptions, not to BuildConfig, since it is a so it is a transient option for the current build try, not something we want persisted in the BuildConfig.
Modify the
validateApiProcessorVersionso thatapiProcessorVersionValidationLevelismajor, validation fails only if major part of the builderVersion for previous or current package version differs from the major part of current api-processor versionapiProcessorVersionValidationLevelisstrict, validation fails if builderVersion for previous or current package version differs from current api-processor version (current behaviour)Store build version for package versions participating in the comparison if they differ from the current api-processor version
builderVersionfor the previous package version differs from the current api-processor version, storebuilderVersionfor the previous package version to thepreviousVersionBuilderVersionin theinfo.jsonof the changelog build result. Do not addpreviousVersionBuilderVersionif it the same as current api-processor version.-if
builderVersionfor the current package version differs from the current api-processor version, storebuilderVersionfor the current package version to thecurrentVersionBuilderVersionin theinfo.jsonof the changelog build result. Do not addcurrentVersionBuilderVersionif it the same as current api-processor version.So, overall info.json:
builderVersionholding current api-processor versionpreviousVersionBuilderVersioncurrentVersionBuilderVersionDocument new properties in the API specification
UI scope
If migration is in progress (as reported by
/api/v1/system/info, propertymigrationInProgress), start changelog builds withapiProcessorVersionValidationLevelset tomajorBuild task consumer
Same as UI