OpenMetadata/ingestion-core
Matt 9e4d8d709d
Support swapping default roles (#2868)
* Support swapping default roles

Pseudocode:

```
A. patchRole(role1, default=True):
B.   set role1.default = True
     for all users:
       add role1 to user.roles
C.   for role in roles if role != role1:
       set role.default = False
       for all users:
         delete role from user.roles
```

This ensures that changeDescription for the role(s) and user(s) are updated accordingly.

Potential optimization:
Adding role1 and removing role from user.roles could be considered/implemented as one change.
However, increases code complexity.

* Set DataConsumer as default role

* Fix tests

* Fix code smell
2022-02-20 11:27:32 -08:00
..

This guide will help you set up OpenMetadata Core Models
This guide will help you set up OpenMetadata Core Models

Python version 3.8+

These models are pydantic models automatically generated from the central JSON Schemas that define our APIs and Entities.

Prerequisites

  • Python >= 3.8.x

Docs

Please refer to the documentation here https://docs.open-metadata.org/connectors

Contribution

In order to contribute to this package:

cd ingestion-core
python -m virtualenv venv
source venv/bin/activate
python -m pip install ".[dev]"

OBS: During development we might need to treat this in a different virtual environment if we are yet to update the reference to the core package in openmetadata-ingestion.