Skip to content

[DRAFT] RHCLOUD-43569: Indicative PR for merging inventory-api and relations-api#1102

Closed
merlante wants to merge 4 commits intomainfrom
RHCLOUD-43569-Relations-api-merge
Closed

[DRAFT] RHCLOUD-43569: Indicative PR for merging inventory-api and relations-api#1102
merlante wants to merge 4 commits intomainfrom
RHCLOUD-43569-Relations-api-merge

Conversation

@merlante
Copy link
Copy Markdown
Contributor

PR Template:

Describe your changes

  • Merged ZanzibarRepository interface from relations-api with Authorizer interface from inventory-api to form the new common interface between inventory and the relations repository, preferring ZanzibarRepository naming and relations-domain typed arguments.
  • Removed kessel authorizer implementation from inventory-api and replace with SpiceDbRepository ZanzibarRepository implementation from relations-api, which implements the new interface.
  • Replaced kessel authorizer config with spicedb repository config, effectively removing an unnecessary layer of abstraction.
  • Dispensed with the relations-api proto specification, but retained many of the relations-domain structs, which are now simply domain objects.
  • SpiceDb becomes a configurable and switchable dependency of inventory-api.
  • SpiceDbRepository ported over with minimal (i.e. cosmetic) changes. [TODO: double check this with cross repo diff]
  • SpiceDbRepository integration tests (i.e. repository tests against a spicedb test container) ported over to inventory-api provide a strong regression test for this layer (along with the testcontainer code).
  • Only the minimal changes to accomplish the above and fix the tests were made.

Next steps/not yet done:

  1. Refactor the "Authorizer" and associated files to be a "repository" in internal/data alongside resourcerepository, etc. This should be very straightforward, except that there is already a legacy relationshiprepository that is kind of "in the way".

Ticket reference (if applicable)

Fixes #RHCLOUD-43569

Checklist

  • Are the agreed upon acceptance criteria fulfilled?

  • Was the 4-eye-principle applied? (async PR review, pairing, ensembling)

  • Do your changes have passing automated tests and sufficient observability?

  • Are the work steps you introduced repeatable by others, either through automation or documentation?

    • If automation is possible but not done due to other constraints, a ticket to the tech debt sprint is added
    • An SOP (Standard Operating Procedure) was created
  • The Changes were automatically built, tested, and - if needed, behind a feature flag - deployed to our production environment. (Please check this when the new deployment is done and you could verify it.)

  • Are the agreed upon coding/architectural practices applied?

  • Are security needs fullfilled? (e.g. no internal URL)

  • Is the corresponding Ticket in the right state? (should be on "review" now, put to done when this change made it to production)

  • For changes to the public API / code dependencies: Was the whole team (or a sufficient amount of ppl) able to review?

@app-sre-bot
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Sorry @merlante, your pull request is larger than the review limit of 150000 diff characters

Comment thread internal/authz/model/types.go
Comment thread internal/authz/api/authz-service.go
@merlante merlante closed this Mar 20, 2026
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.

3 participants