[Fixes #14248] Fix proxy registry initialization#14249
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the ProxyUrlsRegistry in geonode/proxy/utils.py to use a property-based lazy initialization and periodic reload mechanism, accompanied by a new unit test in geonode/proxy/tests.py. The review identifies a critical infinite recursion bug in the getter logic when the reload threshold is met, suggests updating the reload timestamp within the setter to ensure consistent state tracking, and recommends implementing thread-safety measures to prevent race conditions during the initialization process.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #14249 +/- ##
==========================================
+ Coverage 74.92% 74.94% +0.02%
==========================================
Files 975 975
Lines 59902 59963 +61
Branches 8157 8166 +9
==========================================
+ Hits 44884 44942 +58
- Misses 13194 13197 +3
Partials 1824 1824 🚀 New features to boost your workflow:
|
|
The backport to 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.1.x 5.1.x
# Navigate to the new working tree
cd .worktrees/backport-5.1.x
# Create a new branch
git switch --create backport-14249-to-5.1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ac6536405cec392781a0fcbd6a734e2cf676f41b
# Push it to GitHub
git push --set-upstream origin backport-14249-to-5.1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.1.xThen, create a pull request where the |
Fixes #14248
Checklist
For all pull requests:
The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):
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.