Skip to content

Fragile /api/v2/ router URL registration #14552

Closed

Description

@etj

router.urls is a cached property, read in geonode/urls.py before some apps have registered onto it. resource, harvesting, and upload inject their URLs from AppConfig.ready(), which runs after geonode/urls.py's own top-level code; so anything registered only that way is missing by the time router.urls is read there. Today this is masked only by geonode_mapstore_client re-including router.urls a third time, later; without that package, endpoints like executionrequest, upload-size-limits, and upload-parallelism-limits would silently 404, and any INSTALLED_APPS reordering could reintroduce the same gap for other apps.

A fix likely means these apps should register via ordinary include()s in geonode/urls.py (like every other app already does) positioned before the canonical include(router.urls), rather than injecting from ready().

Separately: geonode/upload/apps.py has a guard, left over from before geonode-importer was vendored in, that checks for one module name before injecting a different, always-empty one -- worth checking whether it still serves any purpose. geonode/urls.py also has several urlpatterns += [...] splits with no apparent functional reason to be separate, which could be worth cleaning up while in the area.

Activity

  1. added this to the 5.2.0 milestone on Aug 24, 2026
  2. self-assigned this
    on Aug 24, 2026
  3. added a commit that references this issue on Sep 8, 2026
    8120259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions