Skip to content

Commit

Permalink
Merge branch 'datahub-project:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Nov 20, 2024
2 parents 3cc4903 + 37bb0c9 commit cf90056
Show file tree
Hide file tree
Showing 157 changed files with 447 additions and 400 deletions.
5 changes: 3 additions & 2 deletions datahub-frontend/app/auth/sso/oidc/OidcCallbackLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ public Object perform(
CallContext ctx = ctxResult.getFirst();
Result result = (Result) ctxResult.getSecond();

setContextRedirectUrl(ctx);

// Handle OIDC authentication errors.
if (OidcResponseErrorHandler.isError(ctx)) {
return OidcResponseErrorHandler.handleError(ctx);
Expand Down Expand Up @@ -192,6 +190,9 @@ private Pair<CallContext, Object> superPerform(
}
}

// Set the redirect url from cookie before creating action
setContextRedirectUrl(ctx);

action = this.redirectToOriginallyRequestedUrl(ctx, defaultUrl);
}
} catch (RuntimeException var20) {
Expand Down
13 changes: 7 additions & 6 deletions datahub-web-react/src/app/entity/group/GroupMembers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,13 @@ export default function GroupMembers({ urn, pageSize, isExternalGroup, onChangeM
}, 3000);
};

const onRemoveMember = (memberUrn: string) => {
const onRemoveMember = (memberEntity: CorpUser) => {
const memberName = entityRegistry.getDisplayName(EntityType.CorpUser, memberEntity);
Modal.confirm({
title: `Confirm Group Member Removal`,
content: `Are you sure you want to remove this user from the group?`,
content: `Are you sure you want to remove ${memberName} user from the group?`,
onOk() {
removeGroupMember(memberUrn);
removeGroupMember(memberEntity?.urn);
},
onCancel() {},
okText: 'Yes',
Expand All @@ -155,7 +156,7 @@ export default function GroupMembers({ urn, pageSize, isExternalGroup, onChangeM
const total = relationships?.total || 0;
const groupMembers = relationships?.relationships?.map((rel) => rel.entity as CorpUser) || [];

const getItems = (urnID: string): MenuProps['items'] => {
const getItems = (userEntity: CorpUser): MenuProps['items'] => {
return [
{
key: 'make',
Expand All @@ -169,7 +170,7 @@ export default function GroupMembers({ urn, pageSize, isExternalGroup, onChangeM
{
key: 'remove',
disabled: isExternalGroup,
onClick: () => onRemoveMember(urnID),
onClick: () => onRemoveMember(userEntity),
label: (
<span>
<UserDeleteOutlined /> Remove from Group
Expand Down Expand Up @@ -210,7 +211,7 @@ export default function GroupMembers({ urn, pageSize, isExternalGroup, onChangeM
</MemberColumn>
<MemberColumn xl={1} lg={1} md={1} sm={1} xs={1}>
<MemberEditIcon>
<Dropdown menu={{ items: getItems(item.urn) }}>
<Dropdown menu={{ items: getItems(item) }}>
<MoreOutlined />
</Dropdown>
</MemberEditIcon>
Expand Down
11 changes: 11 additions & 0 deletions docs-website/filterTagIndexes.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,17 @@
"Features": "Stateful Ingestion, UI Ingestion, Status Aspect"
}
},
{
"Path": "https://hudi.apache.org/docs/syncing_datahub/",
"imgPath": "img/logos/platforms/hudi.png",
"Title": "Apache Hudi",
"Description": "Apache Hudi is an open-source data lake framework that provides ACID transactions, efficient upserts, time travel queries, and incremental data processing for large-scale datasets.",
"tags": {
"Platform Type": "Datastore",
"Connection Type": "Pull",
"Features": ""
}
},
{
"Path": "docs/generated/ingestion/sources/iceberg",
"imgPath": "img/logos/platforms/iceberg.png",
Expand Down
Binary file added docs-website/static/img/logos/platforms/hudi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/api/restli/restli-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ curl -X POST 'http://localhost:8080/entities?action=search' \
"and": [
{
"field": "title",
"value": "Baz Chart 1",
"values": ["Baz Chart 1"],
"condition": "EQUAL"
}
]
Expand Down Expand Up @@ -1261,7 +1261,7 @@ curl -X POST 'http://localhost:8080/entities?action=autocomplete' \
"and": [
{
"field": "tool",
"value": "looker",
"values": ["looker"],
"condition": "EQUAL"
}
]
Expand Down
13 changes: 12 additions & 1 deletion docs/deploy/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,18 @@ ip-192-168-64-56.us-west-2.compute.internal Ready <none> 3h v1.18.9-ek
ip-192-168-8-126.us-west-2.compute.internal Ready <none> 3h v1.18.9-eks-d1db3c
```

Once your cluster is running, make sure to install the EBS CSI driver, Core DNS, and VPC CNI plugin for Kubernetes. [add-ons](https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html)
### Install EBS CSI driver, Core DNS, and VPC CNI plugin for Kubernetes

Once your cluster is running, make sure to install the EBS CSI driver, Core DNS, and VPC CNI plugin for Kubernetes. [add-ons](https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html). By default Core DNS and VPC CNI plugins are installed. You need to manually install the EBS CSI driver. It show look this in your console when you are done.

![Screenshot 2024-11-15 at 4 42 09 PM](https://github.com/user-attachments/assets/5a9a2af0-e804-4896-85bb-dc5834208719)

### Add the AmazonEBSCSIDriverPolicy role to the EKS node group

Next is to add the AmazonEBSCSIDriverPolicy role to the EKS node group. You will from the EKS Node group by going to the Compute tab in your EKS cluster and clicking on the IAM entry for the EKS node group. Add the AmazonEBSCSIDriverPolicy policy.

![Screenshot 2024-11-15 at 4 42 29 PM](https://github.com/user-attachments/assets/8971c8d6-8543-408b-9a07-814aacb2532d)
![Screenshot 2024-11-15 at 4 42 46 PM](https://github.com/user-attachments/assets/397f9131-5f13-4d9f-a664-9921d9bbf44e)

## Setup DataHub using Helm

Expand Down
1 change: 0 additions & 1 deletion metadata-ingestion/examples/cli_usage/gen_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class CorpGroupFile(BaseModel):


with open("user/user.dhub.yaml_schema.json", "w") as fp:

fp.write(json.dumps(CorpUserFile.schema(), indent=4))

with open("group/group.dhub.yaml_schema.json", "w") as fp:
Expand Down
4 changes: 2 additions & 2 deletions metadata-ingestion/scripts/avro_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ def generate(
import importlib
from typing import TYPE_CHECKING
from datahub._codegen.aspect import _Aspect
from datahub._codegen.aspect import _Aspect as _Aspect
from datahub.utilities.docs_build import IS_SPHINX_BUILD
from datahub.utilities._custom_package_loader import get_custom_models_package
Expand Down Expand Up @@ -802,7 +802,7 @@ def generate(
from datahub.utilities.docs_build import IS_SPHINX_BUILD
from datahub.utilities._custom_package_loader import get_custom_urns_package
from datahub.utilities.urns._urn_base import Urn # noqa: F401
from datahub.utilities.urns._urn_base import Urn as Urn # noqa: F401
_custom_package_path = get_custom_urns_package()
Expand Down
10 changes: 9 additions & 1 deletion metadata-ingestion/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exclude =
__pycache__
per-file-ignores =
# imported but unused
__init__.py: F401
__init__.py: F401, I250
ban-relative-imports = true

[mypy]
Expand All @@ -53,6 +53,14 @@ disallow_untyped_defs = no
# try to be a bit more strict in certain areas of the codebase
[mypy-datahub.*]
ignore_missing_imports = no
implicit_reexport = no
[mypy-datahub.metadata.*]
# TODO: Remove this once all the code has been updated.
implicit_reexport = yes
[mypy-datahub.ingestion.*]
# TODO: Remove this once all the code has been updated.
implicit_reexport = yes

[mypy-datahub_provider.*]
ignore_missing_imports = no
[mypy-tests.*]
Expand Down
21 changes: 13 additions & 8 deletions metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,22 +591,26 @@
"memray",
}

base_dev_requirements = {
*base_requirements,
*framework_common,
*mypy_stubs,
*s3_base,
lint_requirements = {
# This is pinned only to avoid spurious errors in CI.
# We should make an effort to keep it up to date.
"black==22.12.0",
"coverage>=5.1",
"faker>=18.4.0",
"black==23.3.0",
"flake8>=6.0.0",
"flake8-tidy-imports>=4.3.0",
"flake8-bugbear==23.3.12",
"isort>=5.7.0",
"mypy==1.10.1",
}

base_dev_requirements = {
*base_requirements,
*framework_common,
*mypy_stubs,
*s3_base,
*lint_requirements,
*test_api_requirements,
"coverage>=5.1",
"faker>=18.4.0",
"pytest-asyncio>=0.16.0",
"pytest-cov>=2.8.1",
"pytest-random-order~=1.1.0",
Expand Down Expand Up @@ -931,6 +935,7 @@
),
"cloud": ["acryl-datahub-cloud"],
"dev": list(dev_requirements),
"lint": list(lint_requirements),
"testing-utils": list(test_api_requirements), # To import `datahub.testing`
"integration-tests": list(full_test_dev_requirements),
"debug": list(debug_requirements),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@
)

requests_logger.setLevel(logging.WARNING)

__all__ = [
"AssertionCircuitBreaker",
"AssertionCircuitBreakerConfig",
"OperationCircuitBreaker",
"OperationCircuitBreakerConfig",
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from gql.transport.requests import RequestsHTTPTransport
from pydantic import Field

from datahub.configuration import ConfigModel
from datahub.configuration.common import ConfigModel

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
from datahub.api.entities.datajob.dataflow import DataFlow
from datahub.api.entities.datajob.datajob import DataJob

# TODO: Remove this and start importing directly from the inner files.
__all__ = ["DataFlow", "DataJob"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import Callable, Dict, Iterable, List, Optional, Set, cast

import datahub.emitter.mce_builder as builder
from datahub.configuration.source_common import ALL_ENV_TYPES
from datahub.emitter.generic_emitter import Emitter
from datahub.emitter.mcp import MetadataChangeProposalWrapper
from datahub.metadata.schema_classes import (
Expand Down Expand Up @@ -114,7 +113,7 @@ def generate_tags_aspect(self) -> List[GlobalTagsClass]:

def _get_env(self) -> Optional[str]:
env: Optional[str] = None
if self.env and self.env.upper() in ALL_ENV_TYPES:
if self.env and self.env.upper() in builder.ALL_ENV_TYPES:
env = self.env.upper()
else:
logger.debug(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import Callable, Dict, Iterable, List, Optional, Set

import datahub.emitter.mce_builder as builder
from datahub.configuration.source_common import ALL_ENV_TYPES
from datahub.emitter.generic_emitter import Emitter
from datahub.emitter.mcp import MetadataChangeProposalWrapper
from datahub.metadata.schema_classes import (
Expand Down Expand Up @@ -109,7 +108,7 @@ def generate_mcp(
self, materialize_iolets: bool = True
) -> Iterable[MetadataChangeProposalWrapper]:
env: Optional[str] = None
if self.flow_urn.cluster.upper() in ALL_ENV_TYPES:
if self.flow_urn.cluster.upper() in builder.ALL_ENV_TYPES:
env = self.flow_urn.cluster.upper()
else:
logger.debug(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ def create(file: str, graph: Optional[DataHubGraph] = None) -> None:

@classmethod
def from_datahub(cls, graph: DataHubGraph, urn: str) -> "StructuredProperties":

with StructuredPropertiesConfig.use_graph(graph):
structured_property: Optional[
StructuredPropertyDefinitionClass
Expand Down
2 changes: 2 additions & 0 deletions metadata-ingestion/src/datahub/api/graphql/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from datahub.api.graphql.assertion import Assertion
from datahub.api.graphql.operation import Operation

__all__ = ["Assertion", "Operation"]
3 changes: 2 additions & 1 deletion metadata-ingestion/src/datahub/cli/put_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

from datahub.cli.cli_utils import post_entity
from datahub.configuration.config_loader import load_config_file
from datahub.emitter.mcp import MetadataChangeProposalWrapper, SystemMetadataClass
from datahub.emitter.mcp import MetadataChangeProposalWrapper
from datahub.ingestion.graph.client import get_default_graph
from datahub.metadata.schema_classes import (
DataPlatformInfoClass as DataPlatformInfo,
PlatformTypeClass,
SystemMetadataClass,
)
from datahub.telemetry import telemetry
from datahub.upgrade import upgrade
Expand Down
5 changes: 2 additions & 3 deletions metadata-ingestion/src/datahub/configuration/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from datahub.configuration.common import (
ConfigModel,
ConfigurationMechanism,
DynamicTypedConfig,
ConfigModel as ConfigModel,
DynamicTypedConfig as DynamicTypedConfig,
)
2 changes: 1 addition & 1 deletion metadata-ingestion/src/datahub/configuration/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from pydantic.fields import Field
from typing_extensions import Protocol

from datahub.configuration._config_enum import ConfigEnum
from datahub.configuration._config_enum import ConfigEnum as ConfigEnum # noqa: I250
from datahub.configuration.pydantic_migration_helpers import PYDANTIC_VERSION_2
from datahub.utilities.dedup_list import deduplicate_list

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
from typing import IO

from datahub.configuration import ConfigurationMechanism
from datahub.configuration.common import ConfigurationMechanism


class JsonConfigurationMechanism(ConfigurationMechanism):
Expand Down
8 changes: 2 additions & 6 deletions metadata-ingestion/src/datahub/configuration/source_common.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
from typing import Dict, Optional, Set
from typing import Dict, Optional

from pydantic import validator
from pydantic.fields import Field

from datahub.configuration.common import ConfigModel
from datahub.emitter.enum_helpers import get_enum_options
from datahub.metadata.schema_classes import FabricTypeClass

DEFAULT_ENV = FabricTypeClass.PROD
ALL_ENV_TYPES: Set[str] = set(get_enum_options(FabricTypeClass))
from datahub.emitter.mce_builder import ALL_ENV_TYPES, DEFAULT_ENV


class PlatformInstanceConfigMixin(ConfigModel):
Expand Down
2 changes: 1 addition & 1 deletion metadata-ingestion/src/datahub/configuration/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import yaml

from datahub.configuration import ConfigurationMechanism
from datahub.configuration.common import ConfigurationMechanism


class YamlConfigurationMechanism(ConfigurationMechanism):
Expand Down
6 changes: 5 additions & 1 deletion metadata-ingestion/src/datahub/emitter/mce_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
Any,
List,
Optional,
Set,
Tuple,
Type,
TypeVar,
Expand All @@ -24,7 +25,6 @@
import typing_inspect
from avrogen.dict_wrapper import DictWrapper

from datahub.configuration.source_common import DEFAULT_ENV
from datahub.emitter.enum_helpers import get_enum_options
from datahub.metadata.schema_classes import (
AssertionKeyClass,
Expand All @@ -35,6 +35,7 @@
DatasetKeyClass,
DatasetLineageTypeClass,
DatasetSnapshotClass,
FabricTypeClass,
GlobalTagsClass,
GlossaryTermAssociationClass,
GlossaryTermsClass as GlossaryTerms,
Expand All @@ -56,6 +57,9 @@
logger = logging.getLogger(__name__)
Aspect = TypeVar("Aspect", bound=AspectAbstract)

DEFAULT_ENV = FabricTypeClass.PROD
ALL_ENV_TYPES: Set[str] = set(get_enum_options(FabricTypeClass))

DEFAULT_FLOW_CLUSTER = "prod"
UNKNOWN_USER = "urn:li:corpuser:unknown"
DATASET_URN_TO_LOWER: bool = (
Expand Down
Loading

0 comments on commit cf90056

Please sign in to comment.