Skip to content

Commit

Permalink
Merge 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
harshach committed Jun 8, 2024
2 parents 4d16531 + b0f0c45 commit 0451d65
Show file tree
Hide file tree
Showing 136 changed files with 2,976 additions and 2,082 deletions.
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>platform</artifactId>
<groupId>org.open-metadata</groupId>
<version>1.5.0-SNAPSHOT</version>
<version>1.4.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ volumes:
services:
ingestion:
container_name: openmetadata_ingestion
image: docker.getcollate.io/openmetadata/ingestion:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/ingestion:1.4.2
environment:
AIRFLOW__API__AUTH_BACKENDS: "airflow.api.auth.backend.basic_auth,airflow.api.auth.backend.session"
AIRFLOW__CORE__EXECUTOR: LocalExecutor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
execute-migrate-all:
container_name: execute_migrate_all
command: "./bootstrap/openmetadata-ops.sh migrate"
image: docker.getcollate.io/openmetadata/server:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/server:1.4.2
environment:
OPENMETADATA_CLUSTER_NAME: ${OPENMETADATA_CLUSTER_NAME:-openmetadata}
SERVER_PORT: ${SERVER_PORT:-8585}
Expand Down Expand Up @@ -223,7 +223,7 @@ services:
openmetadata-server:
container_name: openmetadata_server
restart: always
image: docker.getcollate.io/openmetadata/server:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/server:1.4.2
environment:
OPENMETADATA_CLUSTER_NAME: ${OPENMETADATA_CLUSTER_NAME:-openmetadata}
SERVER_PORT: ${SERVER_PORT:-8585}
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose-quickstart/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Build stage
FROM alpine:3.19 AS build
ARG RI_VERSION="1.5.0-SNAPSHOT"
ARG RI_VERSION="1.4.2"
ENV RELEASE_URL="https://github.com/open-metadata/OpenMetadata/releases/download/${RI_VERSION}-release/openmetadata-${RI_VERSION}.tar.gz"

RUN mkdir -p /opt/openmetadata && \
Expand All @@ -21,7 +21,7 @@ RUN mkdir -p /opt/openmetadata && \

# Final stage
FROM alpine:3.19
ARG RI_VERSION="1.5.0-SNAPSHOT"
ARG RI_VERSION="1.4.2"
ARG BUILD_DATE
ARG COMMIT_ID
LABEL maintainer="OpenMetadata"
Expand Down
8 changes: 4 additions & 4 deletions docker/docker-compose-quickstart/docker-compose-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ volumes:
services:
postgresql:
container_name: openmetadata_postgresql
image: docker.getcollate.io/openmetadata/postgresql:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/postgresql:1.4.2
restart: always
command: "--work_mem=10MB"
environment:
Expand Down Expand Up @@ -61,7 +61,7 @@ services:

execute-migrate-all:
container_name: execute_migrate_all
image: docker.getcollate.io/openmetadata/server:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/server:1.4.2
command: "./bootstrap/openmetadata-ops.sh migrate"
environment:
OPENMETADATA_CLUSTER_NAME: ${OPENMETADATA_CLUSTER_NAME:-openmetadata}
Expand Down Expand Up @@ -271,7 +271,7 @@ services:
openmetadata-server:
container_name: openmetadata_server
restart: always
image: docker.getcollate.io/openmetadata/server:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/server:1.4.2
environment:
OPENMETADATA_CLUSTER_NAME: ${OPENMETADATA_CLUSTER_NAME:-openmetadata}
SERVER_PORT: ${SERVER_PORT:-8585}
Expand Down Expand Up @@ -476,7 +476,7 @@ services:

ingestion:
container_name: openmetadata_ingestion
image: docker.getcollate.io/openmetadata/ingestion:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/ingestion:1.4.2
depends_on:
elasticsearch:
condition: service_started
Expand Down
8 changes: 4 additions & 4 deletions docker/docker-compose-quickstart/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ volumes:
services:
mysql:
container_name: openmetadata_mysql
image: docker.getcollate.io/openmetadata/db:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/db:1.4.2
command: "--sort_buffer_size=10M"
restart: always
environment:
Expand Down Expand Up @@ -59,7 +59,7 @@ services:

execute-migrate-all:
container_name: execute_migrate_all
image: docker.getcollate.io/openmetadata/server:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/server:1.4.2
command: "./bootstrap/openmetadata-ops.sh migrate"
environment:
OPENMETADATA_CLUSTER_NAME: ${OPENMETADATA_CLUSTER_NAME:-openmetadata}
Expand Down Expand Up @@ -269,7 +269,7 @@ services:
openmetadata-server:
container_name: openmetadata_server
restart: always
image: docker.getcollate.io/openmetadata/server:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/server:1.4.2
environment:
OPENMETADATA_CLUSTER_NAME: ${OPENMETADATA_CLUSTER_NAME:-openmetadata}
SERVER_PORT: ${SERVER_PORT:-8585}
Expand Down Expand Up @@ -474,7 +474,7 @@ services:

ingestion:
container_name: openmetadata_ingestion
image: docker.getcollate.io/openmetadata/ingestion:1.5.0-SNAPSHOT
image: docker.getcollate.io/openmetadata/ingestion:1.4.2
depends_on:
elasticsearch:
condition: service_started
Expand Down
2 changes: 1 addition & 1 deletion ingestion/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ARG INGESTION_DEPENDENCY="all"
ENV PIP_NO_CACHE_DIR=1
# Make pip silent
ENV PIP_QUIET=1
ARG RI_VERSION="1.5.0.0.dev0"
ARG RI_VERSION="1.4.2.0"
RUN pip install --upgrade pip
RUN pip install "openmetadata-managed-apis~=${RI_VERSION}" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.7.3/constraints-3.10.txt"
RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion ingestion/operators/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ENV PIP_QUIET=1
RUN pip install --upgrade pip

ARG INGESTION_DEPENDENCY="all"
ARG RI_VERSION="1.5.0.0.dev0"
ARG RI_VERSION="1.4.2.0"
RUN pip install --upgrade pip
RUN pip install "openmetadata-ingestion[airflow]~=${RI_VERSION}"
RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion ingestion/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
# since it helps us organize and isolate version management
[project]
name = "openmetadata-ingestion"
version = "1.5.0.0.dev0"
version = "1.4.2.0"
dynamic = ["readme", "dependencies", "optional-dependencies"]
authors = [
{name = "OpenMetadata Committers"}
Expand Down
4 changes: 2 additions & 2 deletions ingestion/tests/integration/ometa/test_ometa_glossary.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def test_patch_reviewer(self):
)

self.assertIsNotNone(res_glossary_term)
self.assertEqual(1, len(res_glossary_term.reviewers.__root__))
self.assertEqual(2, len(res_glossary_term.reviewers.__root__))
self.assertEqual(self.user_1.id, res_glossary_term.reviewers.__root__[0].id)
dest_glossary_term_1 = deepcopy(res_glossary_term)
dest_glossary_term_1.reviewers.__root__.pop(0)
Expand All @@ -449,7 +449,7 @@ def test_patch_reviewer(self):
destination=dest_glossary_term_1,
)
self.assertIsNotNone(res_glossary_term)
self.assertEqual(0, len(res_glossary_term.reviewers.__root__))
self.assertEqual(2, len(res_glossary_term.reviewers.__root__))

def test_patch_glossary_term_synonyms(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion openmetadata-airflow-apis/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
# since it helps us organize and isolate version management
[project]
name = "openmetadata_managed_apis"
version = "1.5.0.0.dev0"
version = "1.4.2.0"
readme = "README.md"
authors = [
{name = "OpenMetadata Committers"}
Expand Down
2 changes: 1 addition & 1 deletion openmetadata-clients/openmetadata-java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>openmetadata-clients</artifactId>
<groupId>org.open-metadata</groupId>
<version>1.5.0-SNAPSHOT</version>
<version>1.4.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion openmetadata-clients/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>platform</artifactId>
<groupId>org.open-metadata</groupId>
<version>1.5.0-SNAPSHOT</version>
<version>1.4.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion openmetadata-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>platform</artifactId>
<groupId>org.open-metadata</groupId>
<version>1.5.0-SNAPSHOT</version>
<version>1.4.2</version>
</parent>

<artifactId>openmetadata-dist</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openmetadata-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>platform</artifactId>
<groupId>org.open-metadata</groupId>
<version>1.5.0-SNAPSHOT</version>
<version>1.4.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openmetadata-service</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ public void run(OpenMetadataApplicationConfig catalogConfig, Environment environ
// as first step register all the repositories
Entity.initializeRepositories(catalogConfig, jdbi);

// Init Settings Cache after repositories
SettingsCache.initialize(catalogConfig);

// Configure the Fernet instance
Fernet.getInstance().setFernetKey(catalogConfig);

// Init Settings Cache after repositories
SettingsCache.initialize(catalogConfig);

initializeWebsockets(catalogConfig, environment);

// init Secret Manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

package org.openmetadata.service.events;

import static org.openmetadata.common.utils.CommonUtil.nullOrEmpty;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
Expand Down Expand Up @@ -44,22 +46,26 @@ public EventFilter(OpenMetadataApplicationConfig config) {
registerEventHandlers(config);
}

@SuppressWarnings("unchecked")
private void registerEventHandlers(OpenMetadataApplicationConfig config) {
try {
if (!nullOrEmpty(config.getEventHandlerConfiguration())) {
Set<String> eventHandlerClassNames =
new HashSet<>(config.getEventHandlerConfiguration().getEventHandlerClassNames());
for (String eventHandlerClassName : eventHandlerClassNames) {
@SuppressWarnings("unchecked")
EventHandler eventHandler =
((Class<EventHandler>) Class.forName(eventHandlerClassName))
.getConstructor()
.newInstance();
eventHandler.init(config);
eventHandlers.add(eventHandler);
LOG.info("Added event handler {}", eventHandlerClassName);
try {
EventHandler eventHandler =
((Class<EventHandler>) Class.forName(eventHandlerClassName))
.getConstructor()
.newInstance();
eventHandler.init(config);
eventHandlers.add(eventHandler);
LOG.info("Added event handler {}", eventHandlerClassName);
} catch (Exception e) {
LOG.info("Exception ", e);
}
}
} catch (Exception e) {
LOG.info("Exception ", e);
} else {
LOG.info("Event handler configuration is empty");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ public static String notAdmin(String name) {
return String.format("Principal: CatalogPrincipal{name='%s'} is not admin", name);
}

public static String operationNotAllowed(String name, MetadataOperation operation) {
return String.format(
"Principal: CatalogPrincipal{name='%s'} operations [%s] not allowed",
name, operation.value());
}

public static String notReviewer(String name) {
return String.format("User '%s' is not a reviewer", name);
}
Expand Down Expand Up @@ -313,6 +319,10 @@ public static String invalidFieldForTask(String fieldName, TaskType type) {
return String.format("The field name %s is not supported for %s task.", fieldName, type);
}

public static String invalidReviewerType(String type) {
return String.format("Reviewers can only be a Team or User. Given Reviewer Type : %s", type);
}

public static String invalidEnumValue(Class<? extends Enum<?>> enumClass) {
String className = enumClass.getSimpleName();
String classNameWithLowercaseFirstLetter =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,13 @@ void deleteTo(
@Bind("relation") int relation,
@Bind("fromEntity") String fromEntity);

@SqlUpdate(
"DELETE from entity_relationship WHERE toId = :toId AND toEntity = :toEntity AND relation = :relation")
void deleteTo(
@BindUUID("toId") UUID toId,
@Bind("toEntity") String toEntity,
@Bind("relation") int relation);

@SqlUpdate(
"DELETE from entity_relationship WHERE (toId = :id AND toEntity = :entity) OR "
+ "(fromId = :id AND fromEntity = :entity)")
Expand Down
Loading

0 comments on commit 0451d65

Please sign in to comment.