In our setup, we have multiple secret versions enabled in GCP. Hence a "list secret versions" returns multiple versions with different version id. The greatest version id is considered as the latest.
However in GoogleSecretComparatorByVersion.class, the comparator does an String lexical comparison. So a secret version id 9 takes priority over greater version id (e.g. 11, 30, ...) and this results in spring config server returning version id 9 always as the latest
I think the GoogleSecretComparatorByVersion.class must be fixed to do a proper numeric comparison.