latest_manager Module Description
Overview
latest_manager resolves version compatibility issues in multi-version latest directories.
Compatibility Analysis
latest_manager has three compatibility relationships:
- latest_manager compatibility with version scripts
- Version data compatibility with latest_manager
- latest_manager new version compatibility with old versions
latest_manager Compatibility with Version Scripts
Version scripts call the manager.sh script of latest_manager to send messages to latest_manager. The manager.sh script must remain compatible with the message format of older scripts. Ensure that you only add parameters without removing any during the compatibility period.
Version Data Compatibility with latest_manager
latest_manager reads files from the version package directory. You must maintain compatibility for the following file formats:
- ascend_install.info
- version.info
- script/filelist.csv
latest_manager calls files from the version package directory. You must maintain compatibility for the following file invocation methods:
- script/[package]_custom_create_softlink.sh
- script/[package]_custom_remove_softlink.sh
latest_manager indirectly calls files from the version package directory. You must maintain compatibility for the following file invocation methods:
- bin/prereq_check.*
- bin/setenv.*
latest_manager New Version Compatibility with Old Versions
-
Data Compatibility When you upgrade from an old version of latest_manager to a new version, you must convert the data generated by the old version to the new version. For example, if the new version changes version.cfg to version.json, you must perform automatic data migration during the upgrade.
-
Functional Compatibility When latest_manager calls functions from version scripts, the new version functions must remain compatible with the old version functions.
This imposes the following requirements on latest_manager code management:
- When latest_manager generates new data, you must design and review it. Whenever you generate new data, you must handle compatibility.
- You must record the historical versions of data generated by latest_manager to facilitate data migration.
- When latest_manager calls functions from version scripts, you must only add functionality, not remove it.