Skip to content

pg_dbi.py: drop the retired UCAR People DB and use dssdb.dssgrp only;… - #119

Merged
zaihuaji merged 1 commit into
mainfrom
hua-work-common
Aug 26, 2026
Merged

zaihuaji merged 1 commit into
mainfrom
hua-work-common

Conversation

@zaihuaji

Copy link
Copy Markdown
Collaborator

… 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.

… 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>
Copilot AI lite review requested due to automatic review settings August 26, 2026 15:45
@zaihuaji
zaihuaji merged commit 246f528 into main Aug 26, 2026
1 check passed

Copilot AI 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.

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 dssgrp or a minimal UNKNOWN-filled stub.
  • Stop reactivating closed dssdb.user records 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 thread pyproject.toml
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)
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