upgrade-k8s.py: Do not stop when GitLab returns HTTP 422 for auto-merge
For !640 (merged), the auto-merge request of the script got "HTTP 422: Branch
cannot be merged" and the script stopped. The merge request had
auto-merge enabled through the merge_request.merge_when_pipeline_succeeds
push option, and it merged correctly. The cause of the 422 is not known.
Skip the auto-merge request when the merge request already has
auto-merge enabled. Retry on HTTP 422, as for HTTP 405.
Bug: T439035
Related MRs:
- !643 (merged)
- !642 (merged) (This MR)
- !641 (merged)
- main