Geo: Unable to compare branches on secondary

Summary

Comparing branches on a secondary instance is not possible. When clicking the Compare button, the red You cannot perform write operations on a read-only instance banner is displayed.

Steps to reproduce

  1. Navigate to the branches tab of a repository on the secondary node.
  2. Click Compare
  3. Red You cannot perform write operations on a read-only instance banner is displayed.

What is the current bug behavior?

Unable to compare branches on a Geo secondary node.

What is the expected correct behavior?

Should be able to compare branches on Geo secondary node.

Relevant logs and/or screenshots

Customer ticket: https://gitlab.zendesk.com/agent/tickets/114646 (internal use)

Observed on 11.5.4-ee and 11.7.0-ee

/cc @rnienaber @akaemmerle

Assignee Loading
Time tracking Loading