Check if server upgrade has been completed

Hello,
We have several installations of Temporal v1.21.0, and now we’re looking to upgrade them to v1.25.1 in an automated manner. According to the upgrade guide, the process will be a sequence of upgrades through consequent minor versions, so we somehow have to ensure whether upgrade to one version has compteled before processing to next version.

The documentation states that

Also, be aware that each upgrade requires the History Service to load all Shards and update the Shard metadata, so allow approximately 10 minutes on each version for these processes to complete before upgrading to the next version.

It seems we cannot simply automate the upgrade sequence because it’s unclear on how to check if Shard metadata has been actually updated.

Is it possible to reliably check if server upgrade has been completed, like API call or specific metric that exposes such fact?