pg_dbi.py: drop the retired UCAR People DB and use dssdb.dssgrp only;… - #119
Merged
Merged
Conversation
… bump version to 3.0.11 The UCAR People DB/API no longer exists, so ucar_user_info() and its pgperson/pgusername helpers can never succeed. dssdb.dssgrp is now the only source of GDEX specialist information; a user missing from dssgrp gets a minimal dssdb.user record filled with UNKNOWN placeholders. Closed dssdb.user records are no longer reopened. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the class-based PostgreSQL DB interface (pg_dbi.py) to remove reliance on the retired UCAR People DB/API, making dssdb.dssgrp the sole source for specialist (DECS group) user info, and adjusts user-UID lookup behavior to stop reopening closed dssdb.user records. It also bumps the package version for release.
Changes:
- Remove the UCAR People DB/API fallback path and build missing-user records from
dssgrpor a minimal UNKNOWN-filled stub. - Stop reactivating closed
dssdb.userrecords during UID lookup; return closed records as-is when found. - Bump package version to
3.0.11.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/rda_python_common/pg_dbi.py |
Drops People-API-based user enrichment, relies on dssgrp/stub inserts, and prevents reopening closed user records. |
pyproject.toml |
Bumps the project version to 3.0.11. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
5
to
+7
| [project] | ||
| name = "rda_python_common" | ||
| version = "3.0.10" | ||
| version = "3.0.11" |
Comment on lines
1776
to
+1779
| Looks up the active user record for userno on the given date. If not found, | ||
| logs a warning, attempts a date-range-independent lookup, and finally fetches | ||
| UCAR person info to insert a new user record. | ||
| logs a warning and retries without the date range, returning the uid of a | ||
| closed record as is; a closed record is never reactivated. Only when no | ||
| record exists at all is a new one added from dssdb.dssgrp. |
Comment on lines
+1768
to
+1771
| if self.USRWARN: return | ||
| self.USRWARN = 1 | ||
| who = logname if logname else userno | ||
| self.pglog("{}: Not in dssdb.dssgrp; incomplete record added to dssdb.user".format(who), self.LGWNEM) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… bump version to 3.0.11
The UCAR People DB/API no longer exists, so ucar_user_info() and its pgperson/pgusername helpers can never succeed. dssdb.dssgrp is now the only source of GDEX specialist information; a user missing from dssgrp gets a minimal dssdb.user record filled with UNKNOWN placeholders. Closed dssdb.user records are no longer reopened.