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

[#Fixes 12862] Allow to add metadata when uploading a resource #12929

Open
wants to merge 3 commits into
base: 4.4.x
Choose a base branch
from

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
@@ -341,7 +343,7 @@ def create(self, uuid: str, /, resource_type: typing.Optional[object] = None, de
uuid, resource_type=resource_type, defaults=resource_dict
)
_resource.save()
resourcebase_post_save(_resource.get_real_instance())
resourcebase_post_save(_resource.get_real_instance(), **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are changing this, i guess could be worth to pass both args and kwargs waht you think @ridoo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes .. no problem.

@mattiagiupponi could you have a look at the failing test? Actually, the test run ok locally. I do not have a clue why it is failing on circleci. If it fails on your machine as well, I would have to re-check my setup.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure i can check

Copy link
Contributor

@mattiagiupponi mattiagiupponi Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are your refering to the clone test?

ERROR: test_clone_remote_files_remote (geonode.storage.tests.TestDataRetriever)
ERROR: test_get_arcgis_alternative_structure (geonode.services.tests.ModuleFunctionsTestCase)
FAIL: test_create_passing_custom_to_post_save (geonode.resource.tests.TestResourceManager)

plus is 44x so the importer should not interfere with this tests

@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

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
2 participants