Skip to content

ENG-9909 add support for path-based multi-tenancy#93

Open
dfreidin wants to merge 6 commits intomasterfrom
feature/ENG-9909_path_based_tenancy
Open

ENG-9909 add support for path-based multi-tenancy#93
dfreidin wants to merge 6 commits intomasterfrom
feature/ENG-9909_path_based_tenancy

Conversation

@dfreidin
Copy link
Copy Markdown
Contributor

@dfreidin dfreidin commented Mar 18, 2026

Add new support for path-based multi-tenancy, with options in client initialization.

  • new base_path parameter to explicitly set the base path for the environment
  • ability to extract the base path if a full base url is given at initialization
    • base_path parameter will take precedence
  • should be backwards compatible if no path is given

Manual testing can be done against https://sm-nested-path.test.sightmachine.io/nested/one/two/:

from smsdk import client

cli = client.Client('sm-nested-path.test', base_path='/nested/one/two/')

# OR:
# cli = client.Client('sm-nested-path.test.sightmachine.io/nested/one/two/')

cli.login('apikey', key_id='<your_api_key>', secret_id='<your_api_secret'>')

cli.get_machine_type_names()
# ['Packer', 'Palletizer', 'L1 Warmer', 'Electricity', 'Line 1', 'Filtec', 'Wrapper', 'L1-Depal', 'Empty Can Conveyor', 'L1 Case Conveyor', 'Filler', 'L1 Full Can Conveyor', 'Blender_1']

Also fixed some tests that were already failing in master. Most of these are due to the fact that it queries for data in the demo environment, and the data available has changed at some point. The final failing test, test_get_line_data, is an actual bug in MA, fixed with https://github.com/sightmachine/ma/pull/8631 .

@dfreidin dfreidin requested a review from mklein0 March 18, 2026 19:39
@dfreidin dfreidin force-pushed the feature/ENG-9909_path_based_tenancy branch 2 times, most recently from da4370c to 7ab1b51 Compare April 1, 2026 17:02
@dfreidin dfreidin force-pushed the feature/ENG-9909_path_based_tenancy branch from 7ab1b51 to 26732b9 Compare April 1, 2026 17:39
Copy link
Copy Markdown

@mklein0 mklein0 left a comment

Choose a reason for hiding this comment

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

Do we want pycoverage reports event if we do not do pycov? The MA report supports both reporting so that can be referenced.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.49%. Comparing base (2f79afa) to head (fd2a2d9).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master      #93       +/-   ##
===========================================
+ Coverage   22.54%   68.49%   +45.95%     
===========================================
  Files          11       29       +18     
  Lines        1433     2276      +843     
  Branches      342      497      +155     
===========================================
+ Hits          323     1559     +1236     
+ Misses       1110      567      -543     
- Partials        0      150      +150     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dfreidin dfreidin requested a review from mklein0 April 15, 2026 17:57
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