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 #12049] Adapt the SLD and XML upload forms to the new progress API #12050

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

giohappy
Copy link
Contributor

@giohappy giohappy commented Mar 15, 2024

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"
  • 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 Mar 15, 2024
@giohappy giohappy linked an issue Mar 15, 2024 that may be closed by this pull request
@giohappy
Copy link
Contributor Author

@maabdelghaffar this depends on GeoNode/geonode-importer#230

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Merging #12050 (fc3702c) into master (2243498) will decrease coverage by 0.02%.
Report is 3 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12050      +/-   ##
==========================================
- Coverage   63.84%   63.83%   -0.02%     
==========================================
  Files         867      867              
  Lines       52529    52529              
  Branches     6568     6568              
==========================================
- Hits        33539    33531       -8     
- Misses      17468    17476       +8     
  Partials     1522     1522              

Copy link
Contributor

@mattiagiupponi mattiagiupponi left a comment

Choose a reason for hiding this comment

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

@giohappy it works in sync but not in async. The second call for getting the status raises an error (see screenshot). Looks like that from the second call, the execution_data is empty as is the execution_id

image

Also, the uploaded XML file, is visible in the dataset upload page, since the attacched source is upload. In case we dont want to have them listed, we can change source.
Plus is suggest in case of success to send a DELETE call to the execution_id endpoint to remove the execution id from the list to have a lighter payload

@giohappy
Copy link
Contributor Author

@giohappy it works in sync but not in async. The second call for getting the status raises an error (see screenshot). Looks like that from the second call, the execution_data is empty as is the execution_id

@mattiagiupponi I'm not sure what you mean. If the requests array is not empty I expected that exec_id was always available. Do we have cases where a request can be returned without an execution id?

https://github.com/GeoNode/geonode/pull/12050/files#diff-6d8a5453157bbb94ee88852ada8d0805875d51cf42eea01a1278f6fb49c6a00cR501-R502

@giohappy
Copy link
Contributor Author

So, the issue was inside the polling, where the execution_id wasn't forwarded to subsequent calls.

@giohappy giohappy merged commit cababa3 into master Mar 20, 2024
16 of 17 checks passed
@giohappy giohappy deleted the fix_sld_xml_uploads branch March 20, 2024 15:02
giohappy added a commit that referenced this pull request Mar 21, 2024
… API (#12050)

* Adapt SLD and XML forms to the new API

* change source name and delete execution when completed
giohappy added a commit that referenced this pull request Mar 21, 2024
…o the new progress API (#12075)

* [Fixes #12049] Adapt the SLD and XML upload forms to the new progress API (#12050)

* Adapt SLD and XML forms to the new API

* change source name and delete execution when completed

* Fixed LayerInfo.js
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Temporary fix to SLD and Metadatata upload forms
2 participants