Skip to content

Feat/multi tenancy v2 adapter and connector processor#465

Merged
hari-kuriakose merged 5 commits into
mainfrom
feat/MultiTenancyV2-AdapterAndConnectorProcess
Jul 18, 2024
Merged

Feat/multi tenancy v2 adapter and connector processor#465
hari-kuriakose merged 5 commits into
mainfrom
feat/MultiTenancyV2-AdapterAndConnectorProcess

Conversation

@muhammad-ali-e

Copy link
Copy Markdown
Contributor

NOTE

  • This PR is intended to make a copy of the existing applications to facilitate the transition to v2. It does not aim to change or optimize the existing code.
  • Review comments can be added as TODO items for future enhancements.

What

  • Introduced v2 changes for the adapter_processor and connector_processor applications.

Why

  • To align with the updated architecture and ensure compatibility with v2 applications.
  • To streamline the handling of organization contexts without relying on django_tenants.

How

  • Updated imports to reference v2 instead of v1 applications.
  • Revised the get_organization method to utilize the user context.
  • Renamed application in apps.py of adapter_processor.
  • Added new models with updated table names in adapter_processor with a mixin DefaultOrganizationMixin.
  • Added AdapterInstanceModelManager with DefaultOrganizationManagerMixin to get the organization data.

Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

  • The new methods are self-contained and changes are under feature flags ensuring no impact on current functionality.

Database Migrations

Env Config

Relevant Docs

Related Issues or PRs

  1. unstract-multi-tenantV2 feature-flag changes #422
  2. Feat/multi tenancy v2 context and organization #430
  3. Version 2 of User/Organization Account Module #431
  4. version 2 of user/organization tenant account module - UN-1424 #432
  5. v2 changes of platform settings #447
  6. v2 changes of connector and connector_auth #461
  7. v2 changes of workflow with endpoints #464

Dependencies Versions

Notes on Testing

Screenshots

Checklist

I have read and understood the Contribution Guidelines.

@muhammad-ali-e muhammad-ali-e marked this pull request as draft July 9, 2024 10:54

@hari-kuriakose hari-kuriakose left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@muhammad-ali-e Models look good.

Ignoring duplication for now. Also all the migration files can be generated later together.

@gaya3-vijayakumar gaya3-vijayakumar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't we need the organization fields for Connector also? Not seeing this in this PR> Is there another PR where this is covered? @muhammad-ali-e

@muhammad-ali-e

Copy link
Copy Markdown
Contributor Author

Don't we need the organization fields for Connector also? Not seeing this in this PR> Is there another PR where this is covered? @muhammad-ali-e

@gaya3-zipstack Here it is #461

@gaya3-vijayakumar gaya3-vijayakumar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good.

@github-actions

Copy link
Copy Markdown
Contributor
filepath function $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{worker/src/unstract/worker/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_logs}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{worker/src/unstract/worker/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{worker/src/unstract/worker/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup\_skip}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{worker/src/unstract/worker/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_client\_init}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{worker/src/unstract/worker/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_exists}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{worker/src/unstract/worker/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{worker/src/unstract/worker/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{worker/src/unstract/worker/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config\_without\_mount}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{worker/src/unstract/worker/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_run\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{9}}$$ $$\textcolor{#23d18b}{\tt{9}}$$

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
69.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@hari-kuriakose hari-kuriakose merged commit 8a081fa into main Jul 18, 2024
@hari-kuriakose hari-kuriakose deleted the feat/MultiTenancyV2-AdapterAndConnectorProcess branch July 18, 2024 13:46
pk-zipstack pushed a commit that referenced this pull request Aug 20, 2025
* v2 changes of workflow with endpoints

* v2 changes of adapter processor and connector processor

* Reverted unrelated changes from this PR

---------

Co-authored-by: Gayathri <142381512+gaya3-zipstack@users.noreply.github.com>
Co-authored-by: Hari John Kuriakose <hari@zipstack.com>
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.

4 participants