[Fixes #14381] Service URL uniqueness [Fixes #14524] Remote-resource detection - #14536
Open
etj wants to merge 2 commits into
Open
[Fixes #14381] Service URL uniqueness [Fixes #14524] Remote-resource detection#14536etj wants to merge 2 commits into
etj wants to merge 2 commits into
Conversation
This was referenced Aug 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request coalesces prior work to support multiple Service registrations per remote endpoint and to make “remote resource” detection consistent across harvesting and GeoServer/security paths.
Changes:
- Remove uniqueness from
Service.base_urland adjust service registration, caching, and lookups to be service-record + auth-context specific. - Ensure remote datasets don’t claim a GeoServer
store(nullableDataset.store, harvesters populatestore=None) and standardize remote detection viasourcetype. - Add/adjust migrations and expand unit tests to cover cache-key behavior, duplicate service registration, and remote-resource handling.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| geonode/utils.py | Pass service_id and auth_config into service handler resolution for remote legend-link generation. |
| geonode/services/views.py | Replace URL-only handler caching with a service/auth-aware cache key and centralized cache helper. |
| geonode/services/tests.py | Add extensive tests for cache key stability/sensitivity and duplicate service registration behavior. |
| geonode/services/serviceprocessors/wms.py | Make WMS handler registration name-safe, propagate auth context correctly, and set remote dataset store=None. |
| geonode/services/serviceprocessors/cache.py | Introduce ServiceHandlerCache for auth/service-scoped handler caching. |
| geonode/services/serviceprocessors/base.py | Add unique-name generation + retry helper to avoid registration races on unique name constraints. |
| geonode/services/serviceprocessors/arcgis.py | Apply unique-name creation pattern and set remote dataset store=None for ArcGIS handlers. |
| geonode/services/serviceprocessors/init.py | Update get_service_handler to use the new service/auth-specific cache keying. |
| geonode/services/models.py | Drop uniqueness constraint from Service.base_url (db-indexed only). |
| geonode/services/migrations/0061_alter_service_base_url.py | Migration to alter Service.base_url field (remove uniqueness). |
| geonode/services/forms.py | Remove “URL already registered” validation and update TagField import. |
| geonode/security/tests.py | Adjust expectations and add coverage for skipping GeoFence sync on remote datasets. |
| geonode/resource/utils.py | Redefine is_remote_resource() based on sourcetype (with legacy fallback warning). |
| geonode/layers/tests.py | Add tests for remote dataset uniqueness behavior and auth_config propagation in link creation; split vector/raster link tests. |
| geonode/layers/models.py | Make Dataset.store nullable/blank to support remote datasets without a GeoServer store. |
| geonode/layers/migrations/0047_alter_dataset_store.py | Migration to alter Dataset.store to nullable/blank. |
| geonode/layers/api/tests.py | Fix dataset listing test counts to exclude metadata-only datasets. |
| geonode/harvesting/tests/test_harvester_worker_wms.py | Add assertion that harvested WMS resources set store=None. |
| geonode/harvesting/migrations/0051_flag_harvested_resources_as_remote.py | Data migration to flag harvested resources as REMOTE and backfill remote service metadata. |
| geonode/harvesting/harvesters/wms.py | Stop deriving a store for harvested WMS layers; mark subtype and store=None. |
| geonode/harvesting/harvesters/geonodeharvester.py | Ensure remote descriptors/additional parameters use store=None. |
| geonode/harvesting/harvesters/base.py | Set harvested resources’ sourcetype to REMOTE regardless of bbox presence. |
| geonode/harvesting/harvesters/arcgis.py | Stop deriving a store for harvested ArcGIS layers; mark subtype and store=None. |
| geonode/geoserver/signals.py | Make MapLayer→Dataset resolution tolerate ambiguity with a warning rather than raising. |
| geonode/geoserver/security.py | Skip GeoFence rule syncing for remote resources and clear dirty state instead. |
| geonode/geoserver/manager.py | Use is_remote_resource() for GeoServer existence checks rather than subtype heuristics. |
| geonode/base/api/tests.py | Update expected totals impacted by metadata-only filtering changes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Coalesce the commits from:
Checklist
For all pull requests:
The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):
Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.