Skip to content

Commit

Permalink
Merge branch 'main' into feat-#15380
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachin-chaurasiya authored Dec 20, 2024
2 parents cbdb680 + 3d83f41 commit 80d4760
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 38 deletions.
5 changes: 0 additions & 5 deletions ingestion/tests/cli_e2e/common/test_cli_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"""
Test database connectors which extend from `CommonDbSourceService` with CLI
"""
import json
import os
from abc import ABC, abstractmethod
from pathlib import Path
Expand Down Expand Up @@ -152,10 +151,6 @@ def assert_for_table_with_profiler_time_partition(
self.assertEqual(
column_profile[key], expected_column_profile[key]
)
if sample_data:
self.assertGreater(
len(json.loads(sample_data.json()).get("rows")), 0
)

def assert_for_delete_table_is_marked_as_deleted(
self, source_status: Status, sink_status: Status
Expand Down
4 changes: 2 additions & 2 deletions openmetadata-docs/content/v1.6.x/deployment/docker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ This docker compose file contains only the docker compose services for OpenMetad
You can also run the below command to fetch the docker compose file directly from the terminal -

```bash
wget https://github.com/open-metadata/OpenMetadata/releases/download/1.5.8-release/docker-compose-openmetadata.yml
wget https://github.com/open-metadata/OpenMetadata/releases/download/1.6.1-release/docker-compose-openmetadata.yml
```

### 3. Update Environment Variables required for OpenMetadata Dependencies
Expand Down Expand Up @@ -192,7 +192,7 @@ You can validate that all containers are up by running with command `docker ps`.
```commandline
❯ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
470cc8149826 openmetadata/server:1.5.8 "./openmetadata-star…" 45 seconds ago Up 43 seconds 3306/tcp, 9200/tcp, 9300/tcp, 0.0.0.0:8585-8586->8585-8586/tcp openmetadata_server
470cc8149826 openmetadata/server:1.6.1 "./openmetadata-star…" 45 seconds ago Up 43 seconds 3306/tcp, 9200/tcp, 9300/tcp, 0.0.0.0:8585-8586->8585-8586/tcp openmetadata_server
```

In a few seconds, you should be able to access the OpenMetadata UI at [http://localhost:8585](http://localhost:8585)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Install the `openmetadata-ingestion` package in your Airflow environment. This a
pip3 install openmetadata-ingestion[<plugin>]==x.y.z
```
-Replace [<plugin>](https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/setup.py) with the sources to ingest, such as mysql, snowflake, or s3.
-Replace x.y.z with the OpenMetadata version matching your server (e.g., 1.5.12).
-Replace x.y.z with the OpenMetadata version matching your server (e.g., 1.6.1).

### Example
```
pip3 install openmetadata-ingestion[mysql,snowflake,s3]==1.5.12
pip3 install openmetadata-ingestion[mysql,snowflake,s3]==1.6.1
```
### Example DAG

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ openmetadata:
{% note %}
- Note that the `openmetadata-ingestion` only supports Python versions 3.7, 3.8, 3.9 and 3.10.
- - The supported Airflow versions are 2.3, 2.4, 2.5, 2.6, and 2.7. Starting from release 1.5, OpenMetadata will support compatibility with Airflow versions up to 2.9.
- - The supported Airflow versions are 2.3, 2.4, 2.5, 2.6, and 2.7. Starting from release 1.6, OpenMetadata will support compatibility with Airflow versions up to 2.9.
{% /note %}

You will need to follow three steps:
Expand Down
4 changes: 2 additions & 2 deletions openmetadata-docs/content/v1.6.x/sdk/python/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ We are now going to present a high-level Python API as a type-safe and gentle wr
The Python SDK is part of the `openmetadata-ingestion` base package. You can install it from [PyPI](https://pypi.org/project/openmetadata-ingestion/).

Make sure to use the same `openmetadata-ingestion` version as your server version. For example, if you have the OpenMetadata
server at version 1.5.12, you will need to install:
server at version 1.6.1, you will need to install:

```python
pip install "openmetadata-ingestion~=1.5.12.0"
pip install "openmetadata-ingestion~=1.6.1.0"
```

{% /note %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ This docker compose file contains only the docker compose services for OpenMetad
You can also run the below command to fetch the docker compose file directly from the terminal -

```bash
wget https://github.com/open-metadata/OpenMetadata/releases/download/1.5.8-release/docker-compose-openmetadata.yml
wget https://github.com/open-metadata/OpenMetadata/releases/download/1.6.1-release/docker-compose-openmetadata.yml
```

### 3. Update Environment Variables required for OpenMetadata Dependencies
Expand Down Expand Up @@ -192,7 +192,7 @@ You can validate that all containers are up by running with command `docker ps`.
```commandline
❯ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
470cc8149826 openmetadata/server:1.5.8 "./openmetadata-star…" 45 seconds ago Up 43 seconds 3306/tcp, 9200/tcp, 9300/tcp, 0.0.0.0:8585-8586->8585-8586/tcp openmetadata_server
470cc8149826 openmetadata/server:1.6.1 "./openmetadata-star…" 45 seconds ago Up 43 seconds 3306/tcp, 9200/tcp, 9300/tcp, 0.0.0.0:8585-8586->8585-8586/tcp openmetadata_server
```

In a few seconds, you should be able to access the OpenMetadata UI at [http://localhost:8585](http://localhost:8585)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Install the `openmetadata-ingestion` package in your Airflow environment. This a
pip3 install openmetadata-ingestion[<plugin>]==x.y.z
```
-Replace [<plugin>](https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/setup.py) with the sources to ingest, such as mysql, snowflake, or s3.
-Replace x.y.z with the OpenMetadata version matching your server (e.g., 1.5.12).
-Replace x.y.z with the OpenMetadata version matching your server (e.g., 1.6.1).

### Example
```
pip3 install openmetadata-ingestion[mysql,snowflake,s3]==1.5.12
pip3 install openmetadata-ingestion[mysql,snowflake,s3]==1.6.1
```
### Example DAG

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ openmetadata:
{% note %}
- Note that the `openmetadata-ingestion` only supports Python versions 3.7, 3.8, 3.9 and 3.10.
- - The supported Airflow versions are 2.3, 2.4, 2.5, 2.6, and 2.7. Starting from release 1.5, OpenMetadata will support compatibility with Airflow versions up to 2.9.
- - The supported Airflow versions are 2.3, 2.4, 2.5, 2.6, and 2.7. Starting from release 1.6, OpenMetadata will support compatibility with Airflow versions up to 2.9.
{% /note %}

You will need to follow three steps:
Expand Down
4 changes: 2 additions & 2 deletions openmetadata-docs/content/v1.7.x-SNAPSHOT/sdk/python/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ We are now going to present a high-level Python API as a type-safe and gentle wr
The Python SDK is part of the `openmetadata-ingestion` base package. You can install it from [PyPI](https://pypi.org/project/openmetadata-ingestion/).

Make sure to use the same `openmetadata-ingestion` version as your server version. For example, if you have the OpenMetadata
server at version 1.5.12, you will need to install:
server at version 1.6.1, you will need to install:

```python
pip install "openmetadata-ingestion~=1.5.12.0"
pip install "openmetadata-ingestion~=1.6.1.0"
```

{% /note %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2289,4 +2289,16 @@ protected void assertFieldLists(List<FieldChange> expectedList, List<FieldChange
actualListCopy.get(i).getOldValue());
}
}

public EventSubscription updateEventSubscriptionPollInterval(String fqn, int pollInterval)
throws HttpResponseException {
EventSubscriptionResourceTest eventSubscriptionResourceTest =
new EventSubscriptionResourceTest();
EventSubscription originalSub =
eventSubscriptionResourceTest.getEntityByName(fqn, ADMIN_AUTH_HEADERS);
EventSubscription updatedSub =
JsonUtils.deepCopy(originalSub, EventSubscription.class).withPollInterval(pollInterval);
return eventSubscriptionResourceTest.patchEntityUsingFqn(
fqn, JsonUtils.pojoToJson(originalSub), updatedSub, ADMIN_AUTH_HEADERS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
import org.openmetadata.service.jdbi3.GlossaryRepository.GlossaryCsv;
import org.openmetadata.service.resources.EntityResourceTest;
import org.openmetadata.service.resources.databases.TableResourceTest;
import org.openmetadata.service.resources.events.EventSubscriptionResourceTest;
import org.openmetadata.service.resources.feeds.FeedResource;
import org.openmetadata.service.resources.feeds.FeedResourceTest;
import org.openmetadata.service.resources.feeds.MessageParser;
Expand Down Expand Up @@ -757,6 +758,10 @@ invalidCustomPropertyKeyRecord, invalidCustomPropertyKey(11, "invalidCustomPrope

@Test
void testGlossaryImportExport() throws IOException {
EventSubscriptionResourceTest eventSubscriptionResourceTest =
new EventSubscriptionResourceTest();
// Update poll Interval to allow Status change from workflow to take some time
eventSubscriptionResourceTest.updateEventSubscriptionPollInterval("WorkflowEventConsumer", 120);
Glossary glossary = createEntity(createRequest("importExportTest"), ADMIN_AUTH_HEADERS);
String user1 = USER1.getName();
String user2 = USER2.getName();
Expand Down Expand Up @@ -934,25 +939,11 @@ void testGlossaryImportExport() throws IOException {
List<String> newRecords =
listOf(
",g3,dsp0,dsc0,h1;h2;h3,,term0;http://term0,PII.Sensitive,,,Approved,\"\"\"glossaryTermTableCol1Cp:row_1_col1_Value,,\"\";\"\"glossaryTermTableCol3Cp:row_1_col1_Value,row_1_col2_Value,row_1_col3_Value|row_2_col1_Value,row_2_col2_Value,row_2_col3_Value\"\"\"");
Awaitility.await()
.atMost(Duration.ofMillis(120 * 1000L))
.pollInterval(Duration.ofMillis(2000L))
.ignoreExceptions()
.until(
() -> {
try {
testImportExport(
glossary.getName(),
GlossaryCsv.HEADERS,
createRecords,
updateRecords,
newRecords);
return true;
} catch (Exception e) {
// Return false to retry
return false;
}
});
testImportExport(
glossary.getName(), GlossaryCsv.HEADERS, createRecords, updateRecords, newRecords);

// Reset poll Interval to allow Status change from workflow
eventSubscriptionResourceTest.updateEventSubscriptionPollInterval("WorkflowEventConsumer", 10);
}

@Test
Expand Down

0 comments on commit 80d4760

Please sign in to comment.