Skip to content

Conversation

@ridoo
Copy link
Contributor

@ridoo ridoo commented Feb 21, 2025

Relates to #12862

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

For all pull requests:

  • Confirm you have read the contribution guidelines
  • You have sent a Contribution Licence Agreement (CLA) as necessary (not required for small changes, e.g., fixing typos in the documentation)
  • Make sure the first PR targets the master branch, eventual backports will be managed later. This can be ignored if the PR is fixing an issue that only happens in a specific branch, but not in newer ones.

The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):

  • There is a ticket in https://github.com/GeoNode/geonode/issues describing the issue/improvement/feature (a notable exemption is, changes not visible to end-users)
  • The issue connected to the PR must have Labels and Milestone assigned
  • PR for bug fixes and small new features are presented as a single commit
  • Commit message must be in the form "[Fixes #<issue_number>] Title of the Issue"
  • PR title must be in the form "[Fixes #<issue_number>] Title of the PR"
  • New unit tests have been added covering the changes, unless there is an explanation on why the tests are not necessary/implemented
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • This PR passes the QA checks: black geonode && flake8 geonode
  • Commits changing the settings, UI, existing user workflows, or adding new functionality, need to include documentation updates
  • Commits adding new texts do use gettext and have updated .po / .mo files (without location infos)

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.

@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Feb 21, 2025
@ridoo ridoo requested a review from mattiagiupponi February 21, 2025 17:15
@ridoo ridoo marked this pull request as ready for review February 21, 2025 17:42
@ridoo ridoo linked an issue Feb 21, 2025 that may be closed by this pull request
@ridoo ridoo force-pushed the feature/12862_allow-to-add-metadata-when-uploading-a-resource branch from b3bf777 to c0fa2f3 Compare February 21, 2025 21:00
@mattiagiupponi mattiagiupponi requested a review from etj February 25, 2025 16:42
@mattiagiupponi
Copy link
Contributor

Hi @ridoo
I quite strange, I tried to run the same docker with the same variable that is used normally in circleci. The only suggestion that i can give you is to:

  • add some additional log into the code (temporary) so we can see if the resource is actually passing to the necessary steps
  • Try to re-run the circleci pipeline using the ssh mode (i dont have rights to do it) and run the test from the circleci shell to see what happen

image

@ridoo
Copy link
Contributor Author

ridoo commented Mar 11, 2025

@mattiagiupponi I finally traced the problem which revealed an issue inside GeoNode code I could not resolve until now. Perhaps you know what to do (either in test or in GeoNode itself):

GeoNode has several locations (resource.utils, security, and people) where values are cached/stored in the globals() dict. This causes the tests to fail in case other tests run first which have set the cache to a non-empty state. In this particular case, the storer_modules cache is not refreshed after the tests. Do you know a good way how to reset the cache? I tried to clean it in tearDown but this did not work.

@giohappy
Copy link
Contributor

@ridoo I know it's not a great solution but you could mock call_storers for this test.

We have planned to release GeoNode 4.4.2 tomorrow. IS it ok if this PR remains in 4.4.x for the moment?

@ridoo
Copy link
Contributor Author

ridoo commented Mar 13, 2025

@ridoo I know it's not a great solution but you could mock call_storers for this test.

Ok, will do. But using those global state may also affect future testing, though.

We have planned to release GeoNode 4.4.2 tomorrow. IS it ok if this PR remains in 4.4.x for the moment?

Will be ok, but I will provide the patch almost right now.

@giohappy
Copy link
Contributor

@etj @mattiagiupponi don't you think this could be merged in master and backported?

@ridoo
Copy link
Contributor Author

ridoo commented Mar 14, 2025

@giohappy I created a PR for master at first (see #12874) but closed it in favor of this one, as the integration about master integration is not backportable as such.

Note: To make this feature work, we need the importer to parse and pass custom data to the resource manager. See GeoNode/geonode-importer#287

@mattiagiupponi
Copy link
Contributor

It looks good to me @giohappy

@giohappy giohappy merged commit aa28677 into GeoNode:4.4.x Mar 14, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed CLA Bot: community license agreement signed enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow to add metadata when uploading a resource

3 participants