in lib/release_tools/public_release/omnibus_gitlab_release.rb [171:202]
def update_last_upgrade_stop
return if ReleaseTools::Feature.disabled?(:maintain_upgrade_stops)
begin
stop = UpgradeStop.new.last_required_stop
logger.info('Last required stop for version detected', last_required_stop: stop)
actions = []
actions << change_upgrade_stop_action!(PRE_INSTALL_SCRIPT, /(?<=[\s]|^)MIN_VERSION=[^\n]*/, "MIN_VERSION=#{stop}")
actions << change_upgrade_stop_action!(UPGRADE_CHECK_SCRIPT, /ENV\['MIN_VERSION'\] [\|]{2} '[0-9.]*'/, "ENV['MIN_VERSION'] || '#{stop}'")
actions.compact!
if actions.empty?
logger.info('Nothing to be done to apply upgrade stop to Omnibus', version: version.to_minor, last_required_stop: stop)
return
end
Retriable.with_context(:api) do
client.create_commit(
project_path,
project.default_branch,
"Update upgrade stop to #{stop}\n\n[ci skip]",
actions
)
end
rescue StandardError
logger.fatal('Something went wrong with the Omnibus upgrade stop. Disable the \'maintain_upgrade_stops\' feature flag, and retry the job. Please notify Distribution about this error.')
raise
end
end