ServiceNow unable to revert an object to baseline during an upgrade - presented with an error
When a hotfix was provided on a protected script for example
look at the hotfix update set to check if the Replace on upgrade flag is set to true for that file in the update set? If it is set to false it can cause this issue. If it is false change the flag in the update set to true which should allow the file to be reverted to the baseline, release version.
Just setting the flag in the already-applied update set seems to do the trick
---
Additional info (via ServiceNow Support):
vSOLUTION PROPOSED:
After analysing the logs at the time of the upgrade, we saw that the objects was loaded but the version was not added since it is a duplicate of the latest existing ones.
Example for sys_script_include_d026e995472f95d4207ddfbd436d43cf :
2026-03-19 23:07:23 (694) worker.1 worker.1 txid=e862f2ec87fb ESLatestScriptLoader Skipping sys_es_latest_script record because there is an existing record with table = sys_script_include and id = d026e995472f95d4207ddfbd436d43cf
2026-03-19 23:07:23 (724) worker.1 worker.1 txid=e862f2ec87fb VersionWriteRepository Version was not added, it is a duplicate of the latest existing one: sys_script_include_d026e995472f95d4207ddfbd436d43cf/AccessRequestProbe
Normally the Issue linked to payload of the current sys_update_version record of the file that was exactly same as the payload of the file in the sys_upgrade_history _log table. So the incoming file in the installation exactly matched the current version.When comparing the current version with the historical version, the current version looks the same.
You have confirmed that you have the correct versions in use for all affected records so the issue is resolved from a functional perspective.
In regards to how this logic works, we can explain from the information we have in the logs which shows that they are being treated as a duplicate. The platform tells us as much "Version was not added, it is a duplicate of the latest existing one" So, in typical behaviour a sys_update_version is not added. Nor would it replace the existing version (sys_update_version) from being current. In such a scenario, update sets have precedence over store application inserts. Update set additions at this level are considered customizations, which need to be protected. The protection being "replace on upgrade". Regardless of whether it is protected or not, the version will not be added if it is considered a duplicate. To conclude this is the expected behaviour and how it works. The "current" will not become the store application version that was offloaded.
Comments
Post a Comment