Skip to content

replace GeoServer DataStore PUT->POST request#155

Draft
fmigneault wants to merge 1 commit intomasterfrom
geoserver-test-post
Draft

replace GeoServer DataStore PUT->POST request#155
fmigneault wants to merge 1 commit intomasterfrom
geoserver-test-post

Conversation

@fmigneault
Copy link
Member

@fmigneault fmigneault commented Oct 17, 2025

Overview

Testing out issue/workaround identified in bird-house/birdhouse-deploy#570

No idea if it will work as-is or not.
Starting the test-suite with both branch references in Jenkins.
http://daccs-jenkins.crim.ca/job/DACCS-iac-birdhouse/3747/

edit: http://daccs-jenkins.crim.ca/job/DACCS-iac-birdhouse/3752
(previous run failed to start due to problematic jobs queue)

Changes

  • replace GeoServer DataStore PUT->POST request in notebook-auth setup for Cowbird/Magpie/GeoServer interactions

Related Issue / Discussion

@fmigneault fmigneault self-assigned this Oct 17, 2025
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@tlvu
Copy link
Contributor

tlvu commented Nov 10, 2025

@fmigneault Not sure why this is in Draft mode and did not pop up in my review list but I guess you can commit this one and we'll see if it fixes the issue or not. The changes are fairly simple. If it creates more errors, we can always revert.

But I really would like to commit the Geoserver PR because it is a security vulnerability fix after all.

@fmigneault
Copy link
Member Author

I didn't request review as it did not seem to quick fix the problem.
Instead, I get this error (CI triggered manually).
I did not have time to dig down to investigate.

21:37:46  
21:37:46  ---------------------------------------------------------------------------
21:37:46  ValueError                                Traceback (most recent call last)
21:37:46  Cell In[1], line 13
21:37:46       11 if resp.status_code != 201:
21:37:46       12     cleanup_test_data()
21:37:46  ---> 13     raise ValueError(response_msg("\nFailed to create Geoserver datastore `{}`.".format(datastore_name), resp))
21:37:46  
21:37:46  ValueError: 
21:37:46  Failed to create Geoserver datastore `test_datastore`. Response replied with (500) [<unknown>]
21:37:46  Content: Error checking data store parameters
21:37:46  
21:37:46  
21:37:46  
21:37:46  ____________________ notebooks-auth/geoserver.ipynb::Cell 7 ____________________
21:37:46  Notebook cell execution failed
21:37:46  Cell 7: Cell execution caused an exception
21:37:46  
21:37:46  Input:
21:37:46  # configure datastore
21:37:46  payload = {
21:37:46      "dataStore": {
21:37:46          "name": datastore_name,
21:37:46          "type": "Directory of spatial files (shapefiles)",
21:37:46          "connectionParameters": {
21:37:46              "entry": [
21:37:46                  {"$": "UTF-8",
21:37:46                   "@key": "charset"},
21:37:46                  {"$": "shapefile",
21:37:46                   "@key": "filetype"},
21:37:46                  {"$": "true",
21:37:46                   "@key": "create spatial index"},
21:37:46                  {"$": "true",
21:37:46                   "@key": "memory mapped buffer"},
21:37:46                  {"$": "GMT",
21:37:46                   "@key": "timezone"},
21:37:46                  {"$": "true",
21:37:46                   "@key": "enable spatial index"},
21:37:46                  {"$": f"http://{datastore_name}/",
21:37:46                   "@key": "namespace"},
21:37:46                  {"$": "true",
21:37:46                   "@key": "cache and reuse memory maps"},
21:37:46                  {"$": f"[file://{geoserver_datastore_path}](file:///)",
21:37:46                   "@key": "url"},
21:37:46                  {"$": "shape",
21:37:46                   "@key": "fstype"},
21:37:46              ]
21:37:46          },
21:37:46      }
21:37:46  }
21:37:46  geoserver_admin_session.post(url=f"{GEOSERVER_REST_URL}/workspaces/{workspace_name}/datastores/{datastore_name}", json=payload)
21:37:46  
21:37:46  if resp.status_code != 201:
21:37:46      cleanup_test_data()
21:37:46      raise ValueError(response_msg("\nFailed to configure Geoserver datastore `{}`.".format(datastore_name), resp))
21:37:46  
21:37:46  Traceback:
21:37:46  
21:37:46  ---------------------------------------------------------------------------
21:37:46  ValueError                                Traceback (most recent call last)
21:37:46  Cell In[1], line 36
21:37:46       34 if resp.status_code != 201:
21:37:46       35     cleanup_test_data()
21:37:46  ---> 36     raise ValueError(response_msg("\nFailed to configure Geoserver datastore `{}`.".format(datastore_name), resp))
21:37:46  
21:37:46  ValueError: 
21:37:46  Failed to configure Geoserver datastore `test_datastore`. Response replied with (500) [<unknown>]
21:37:46  Content: Error checking data store parameters

@tlvu
Copy link
Contributor

tlvu commented Nov 10, 2025

I didn't request review as it did not seem to quick fix the problem.
Instead, I get this error (CI triggered manually).
I did not have time to dig down to investigate.

I see. We can put this on hold for now then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants