Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @ostyhar on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
Author
|
The CLA was sent to info@osgeo.org |
mattiagiupponi
requested changes
Sep 16, 2026
mattiagiupponi
left a comment
Contributor
There was a problem hiding this comment.
Hi @ostyhar
I dont agree much with the implementation, i would suggest to approach it in a different way:
- the main issue since the parameters is
skip_existing_layerinstead of the one in the serializerskip_existing_layersi agree that we should do it, but I think the change should be done on theextract_params_from_datafor each handler rather than an IF in the view. Understandable that at least is common for everyone, but goes againts the principle to have each handler responsible for the preparation of the parameters required for the execution - Rather than leaving the funciton as it is and move logic in the datastore to evaluate the execution, since we want to skip some dataset, i suggest to move the control
should_be_importedinto the_select_valid_layerswhich checks if the layers are valid. Ofc if i need to skip it is not valid, then should be removed from the selected valid layers. We can add a log into the function to evaluate it. In this way when it reaches theimport_resourcethere are not valid layers, so then the execution stops.
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.
Fixes #14377.
The upload API exposes
skip_existing_layers, while the importer checksskip_existing_layer. This change normalizes the flag before the execution request is created and adjusts the expected layer count when existing layers are skipped.It also fixes the raster and 3D Tiles skip paths and adds regression tests for full and partial skips.
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.