Skip to content

initial commit for multidb#7862

Draft
YasenT wants to merge 7 commits into
pulp:mainfrom
YasenT:multidb-implementation
Draft

initial commit for multidb#7862
YasenT wants to merge 7 commits into
pulp:mainfrom
YasenT:multidb-implementation

Conversation

@YasenT

@YasenT YasenT commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Initial PR for the multidb implementation. To test github actions. etc

@YasenT

YasenT commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

/retest

YasenT and others added 3 commits July 15, 2026 15:13
getattr(value, 'pulp_domain_id', None) silently returns None for models
that reach their domain transitively rather than through their own field
(RepositoryVersion.repository, RepositoryContent.repository,
ContentArtifact.content, PublishedArtifact.publication). RepositoryVersion
is the single most common CreatedResource target in pulpcore (every
sync/publish creates one), so this meant most real-world post-move
CreatedResource rows for satellite-hosted domains silently resolved
content_object on the wrong (control-plane) alias instead of raising or
logging -- the exact KI-18 landmine, reached via an uncovered path.

Found via live validation against a real two-Postgres environment: a
genuine post-move CreatedResource pointing at a satellite RepositoryVersion
resolved to a stale pre-cleanup copy on 'default' instead of the live row
on the satellite alias.

Fixes by walking the target's concrete FK/O2O fields (bounded depth,
cycle-guarded) to find any related object exposing pulp_domain_id, rather
than a hardcoded model list -- covers all four known cases generically and
any future/plugin model with the same shape.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant