Skip to content

[clientpython] feat(pyoaev): add multi-tenancy (#205)#208

Draft
Megafredo wants to merge 1 commit intorelease/currentfrom
feat/205-multi-tenancy
Draft

[clientpython] feat(pyoaev): add multi-tenancy (#205)#208
Megafredo wants to merge 1 commit intorelease/currentfrom
feat/205-multi-tenancy

Conversation

@Megafredo
Copy link
Copy Markdown
Member

Proposed changes

1. Client-side implementation using Python (pyoaev)

  • 1.1 Managing the tenant_id in the configuration (settings_loader.py)

    • Add the expected optional tenant_id field to ConfigLoaderOAEV
    • Implement a check that the expected value is a valid UUID tenant_id: UUID
    • Accept backward compatibility by accepting the missing field tenant_id: UUID | None
    • Explicitly set default=None, for now and replace it with default="2cffad3a-0001-4078-b0e2-ef74274022c3", once the migration is officially live
  • 1.2 Managing the tenant_id in the pyoaev (client.py)

    • Add the optional argument tenant_id: Optional[UUID] to the client constructor
    • Update _build_url() to support:
      • base_url and path normalization
      • Accept url_legacy if no tenant_id exists
      • Accept url_tenant if tenant_id exists
  • 1.3 Managing the tenant_id in the pyoaev (helper.py)

    • Update OpenAEVInjectorHelper
    • Retrieve the tenant_id from the config and send OpenAEV
  • 1.4 Managing the tenant_id in the pyoaev (utils.py)

    • Small addition to indicate the tenant_id triggered during PingAlive
    • Small addition to indicate the tenant_id when stopping PingAlive
  • 1.5 Managing the tenant_id in daemons (base_daemon.py)

    • Retrieve tenant_id for self.api in BaseDaemon
    • Update __get_default_api_client with the tenant_id

2. Tests

  • Test without tenant_id (legacy)
    • Injector
    • Collector
    • Catalog
  • Test with valid tenant_id UUID
    • Injector
    • Collector
    • Catalog
  • Test with invalid tenant_id UUID (must fail)
    • Injector
    • Collector
    • Catalog

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

@Megafredo Megafredo requested a review from Kakudou April 16, 2026 07:27
@Megafredo Megafredo self-assigned this Apr 16, 2026
@Megafredo Megafredo added the filigran team use to identify PR from the Filigran team label Apr 16, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/current@5bf4ce1). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pyoaev/utils.py 33.33% 2 Missing ⚠️
pyoaev/client.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##             release/current     #208   +/-   ##
==================================================
  Coverage                   ?   70.63%           
==================================================
  Files                      ?       58           
  Lines                      ?     2350           
  Branches                   ?        0           
==================================================
  Hits                       ?     1660           
  Misses                     ?      690           
  Partials                   ?        0           
Flag Coverage Δ
connectors 70.63% <83.33%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Megafredo Megafredo changed the title [client-python] feat(pyoaev): add multi-tenancy (#205) [clientpython] feat(pyoaev): add multi-tenancy (#205) Apr 16, 2026
@Megafredo Megafredo force-pushed the feat/205-multi-tenancy branch from 15bc188 to 9e3ed3f Compare April 16, 2026 08:25
Copy link
Copy Markdown
Member

@Kakudou Kakudou left a comment

Choose a reason for hiding this comment

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

LGTM, everything seem in place, thanks. 🔥
If you can add some tests for that it would be perfects. 🤘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants