Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNIP 91 - Removal of legacy API (v1) #8511

Closed
1 of 5 tasks
giohappy opened this issue Dec 17, 2021 · 6 comments
Closed
1 of 5 tasks

GNIP 91 - Removal of legacy API (v1) #8511

giohappy opened this issue Dec 17, 2021 · 6 comments
Assignees
Labels
feature A new feature to be added to the codebase gnip A GeoNodeImprovementProcess Issue master

Comments

@giohappy
Copy link
Contributor

giohappy commented Dec 17, 2021

GNIP 91 - Removal of legacy API (v1)

Overview

Version 2 of GeoNode API has much more coverage and offers access to many of the new services implemented in GeoNode (Harvesting, Resource Manager, Permissions, etc.).
Given the deep and wide refactoring in master branch we cannot grant backword compatibility with v1. Our proposal is to drop it and, in case, invite users to switch to v2.

When v1 will be dropped we propose to use v2 both under the root URL /api and /api/v2

Proposed By

GeoSolutions s.a.s.

Assigned to Release

This proposal is for GeoNode 4.x.

State

  • Under Discussion
  • In Progress
  • Completed
  • Rejected
  • Deferred

Motivation

API v2 is actively developed since version 3.3.1, and it's actively used in many contexts. The new QGIS GeoNode Plugin (which is under development) is also based on v2.
For the moment tests are passing for v1 but, if there's no strong reasons to maintain it, we are in favour to remove this legacy code (which is not actively maintained). This will simplify further refactorings of GeoNode core models that might happen in the near future.

Proposal

Remove the legacy api module and expose v2 both under the root API /api, and also keep the /api/v2 as an alias.

Voting

Project Steering Committee:

  • Alessio Fabiani: 👍
  • Francesco Bartoli:
  • Giovanni Allegri: 👍
  • Toni Schoenbuchner: 👍
  • Florian Hoedt: 👍
@t-book
Copy link
Contributor

t-book commented Dec 17, 2021

Dear Giovanni,

thanks for your PR!

I'm usually a bit "conservative" when it comes to cutting old ties. Simply because it is always difficult to estimate what this means for the user community of GeoNode. But since we are making a big step with the new version anyway. (For example, URLs change from layer/ to catalog/#/ ... [1]) I would say now or never. My +1

Simone has unfortunately left the PSC. I have taken him therefore from the voting list.

[1] I will try to commit an Nginx rewrite here to prevent 404s, not easy as I think the routing now uses IDs for layers but that's a different story .

@giohappy
Copy link
Contributor Author

@t-book, as a side note regarding the detail url, it might change in the future. The url currently reflects the single page nature of the client, but I'd prefer to have a "client agnostic" url. We might consider e Djano url that does a redirect according to the specific client routing.

@t-book
Copy link
Contributor

t-book commented Dec 20, 2021

@giohappy that's a great idea! Thanks +1 for adding a Django route

@afabiani
Copy link
Member

+1

@afabiani afabiani added gnip A GeoNodeImprovementProcess Issue feature A new feature to be added to the codebase and removed enhancement labels Jan 20, 2022
@giohappy giohappy assigned afabiani and marthamareal and unassigned giohappy and afabiani Jan 21, 2022
@marthamareal
Copy link
Contributor

@giohappy, Currently there is a challenge where the templates are still using the legacy api(v1).
For example, the picture below lists templates that use v1.

api

Also the views in geonode.api.views.py are referenced in these urls, are they safe to delete?

@giohappy
Copy link
Contributor Author

thanks @marthamareal. I'lll mark this as blocked, since it depends on replacing the APIs inside the legacy views which master still depends on.

@giohappy giohappy closed this as completed Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature to be added to the codebase gnip A GeoNodeImprovementProcess Issue master
Projects
None yet
Development

No branches or pull requests

4 participants