Skip to content

Geo Replicables - Remove RESTful support

Zack Cuddy requested to merge 219417-remove-legacy-geo-restful-api into master

What does this MR do and why?

Part 2 of 2 #219417 (closed)
Previous MR: !132263 (merged)

This change removes in entirety the RESTful support for Geo Replicables (ee/geo_replicables). Due to the sheer size of the deletion the work has been split into two parts:

  1. Vue Components (previous MR)
  2. Vuex Store (this MR)

Some Background

When Geo was first implemented we used a RESTful endpoint. As we scaled Geo we made the decision to migrate to a GraphQL endpoint along with the adoption of the Self Service Framework. During the adoption period of the Self Service Framework we opted to support the legacy RESTful implementations. This created a layer of technical debt for the Frontend as we wanted to provide a unified experience in the UI regardless if the data was being served via REST or GraphQL.

However, the time has come that we completely sunset the RESTful implementation in the Frontend now that the RESTful endpoint has been fully removed from our codebase

Changes in this MR

  1. Removal of all references to state.useGraphQl
    • This allowed us to reduce the complexity of the Vuex Actions
  2. Remove of all RESTful API calls and methods in the Vuex Actions
    • These methods were named: fetchReplicableItemsRestful, initiateAllReplicableActionRestful, and initiateReplicableActionRestful
    • Instead the state.useGraphQl layer was removed and the GraphQl methods were moved to the "wrapper" actions
  3. Remove of the geo_replicables methods from ee/api.js

Screenshots or screen recordings

All functionality remains

Functionality

How to set up and validate locally

  1. Fetch and checkout this branch
  2. Setup Geo by following the 1-line installation in the Easy Installation section (How to setup Geo)
  3. Enable Feature Flag Feature.enable(:geo_registries_update_mutation) (if you want to test the Resync/Reverify actions)
  4. Access your Secondary GDK UI
  5. Navigate to the Geo Replication View for Job Artifacts (ex. http://127.0.0.1:3001/admin/geo/sites/2/replication/job_artifacts)
  6. Ensure filtering still works
  7. Ensure buttons still work
  8. Ensure pagination still works

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #219417 (closed)

Edited by Zack Cuddy

Merge request reports

Loading