Skip to content

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

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

ENG-9909 add support for path-based multi-tenancy#93
dfreidin wants to merge 3 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.

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