Skip to content

[Fixes #14321] copy_with_dump is missing from copy_table_with_ogr2ogr#14323

Merged
mattiagiupponi merged 4 commits into
masterfrom
ISSUE_14321
Jun 11, 2026
Merged

[Fixes #14321] copy_with_dump is missing from copy_table_with_ogr2ogr#14323
mattiagiupponi merged 4 commits into
masterfrom
ISSUE_14321

Conversation

@mattiagiupponi

@mattiagiupponi mattiagiupponi commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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
  • 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

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.

@mattiagiupponi mattiagiupponi added this to the 5.1.0 milestone Jun 11, 2026
@mattiagiupponi mattiagiupponi self-assigned this Jun 11, 2026
@cla-bot cla-bot Bot added the cla-signed CLA Bot: community license agreement signed label Jun 11, 2026
@mattiagiupponi mattiagiupponi requested a review from nrjadkry June 11, 2026 08:39

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an alternative table copying mechanism in copy_table_with_ogr2ogr using ogr2ogr's PGDump format piped directly into psql when the OGR2OGR_COPY_WITH_DUMP environment variable is enabled. A corresponding unit test has been added to verify this behavior. Feedback on these changes highlights two critical issues: first, the psql command is missing the port parameter (-p) and lacks safe defaults for HOST and PORT, which could cause connection failures; second, using stderr=PIPE on the first piped process without reading from it concurrently poses a deadlock risk if the buffer fills up, which can be resolved by redirecting its stderr to a temporary file.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread geonode/upload/handlers/common/vector.py Outdated
Comment thread geonode/upload/handlers/common/vector.py
@mattiagiupponi mattiagiupponi linked an issue Jun 11, 2026 that may be closed by this pull request
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.92%. Comparing base (83c280b) to head (770ae3d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #14323   +/-   ##
=======================================
  Coverage   74.91%   74.92%           
=======================================
  Files         982      982           
  Lines       60496    60527   +31     
  Branches     8247     8252    +5     
=======================================
+ Hits        45322    45348   +26     
- Misses      13344    13349    +5     
  Partials     1830     1830           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread geonode/upload/handlers/common/vector.py Outdated
mattiagiupponi and others added 2 commits June 11, 2026 14:47
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@mattiagiupponi mattiagiupponi requested a review from Gpetrak June 11, 2026 12:55
@mattiagiupponi mattiagiupponi merged commit a0f50e5 into master Jun 11, 2026
17 checks passed
@mattiagiupponi mattiagiupponi deleted the ISSUE_14321 branch June 11, 2026 13:41
@github-actions

Copy link
Copy Markdown
Contributor

The backport to 5.0.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-5.0.x 5.0.x
# Navigate to the new working tree
cd .worktrees/backport-5.0.x
# Create a new branch
git switch --create backport-14323-to-5.0.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a0f50e5eb4cf6d19693967879aa78a296037d7ac
# Push it to GitHub
git push --set-upstream origin backport-14323-to-5.0.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.0.x

Then, create a pull request where the base branch is 5.0.x and the compare/head branch is backport-14323-to-5.0.x.

mattiagiupponi added a commit that referenced this pull request Jun 11, 2026
…#14323) (#14324)

* [Fixes #14321] copy_with_dump is missing from copy_table_with_ogr2ogr

---------

(cherry picked from commit a0f50e5)

Co-authored-by: mattiagiupponi <51856725+mattiagiupponi@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 5.0.x backport 5.1.x cla-signed CLA Bot: community license agreement signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

copy_with_dump is missing from copy_table_with_ogr2ogr

3 participants