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
jayacryl authored Oct 31, 2024
2 parents c972bf2 + 5c0377a commit 7895c29
Show file tree
Hide file tree
Showing 59 changed files with 1,129 additions and 319 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.linkedin.datahub.upgrade.config.restoreindices;

import com.linkedin.datahub.upgrade.config.SystemUpdateCondition;
import com.linkedin.datahub.upgrade.system.NonBlockingSystemUpgrade;
import com.linkedin.datahub.upgrade.system.restoreindices.structuredproperties.PropertyDefinitions;
import com.linkedin.metadata.entity.AspectDao;
import com.linkedin.metadata.entity.EntityService;
import io.datahubproject.metadata.context.OperationContext;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
@Conditional(SystemUpdateCondition.NonBlockingSystemUpdateCondition.class)
public class PropertyDefinitionsConfig {

@Bean
public NonBlockingSystemUpgrade propertyDefinitions(
final OperationContext opContext,
final EntityService<?> entityService,
final AspectDao aspectDao,
@Value("${systemUpdate.propertyDefinitions.enabled}") final boolean enabled,
@Value("${systemUpdate.propertyDefinitions.batchSize}") final Integer batchSize,
@Value("${systemUpdate.propertyDefinitions.delayMs}") final Integer delayMs,
@Value("${systemUpdate.propertyDefinitions.limit}") final Integer limit) {
return new PropertyDefinitions(
opContext, entityService, aspectDao, enabled, batchSize, delayMs, limit);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.linkedin.datahub.upgrade.config;
package com.linkedin.datahub.upgrade.config.restoreindices;

import com.linkedin.datahub.upgrade.config.SystemUpdateCondition;
import com.linkedin.datahub.upgrade.system.NonBlockingSystemUpgrade;
import com.linkedin.datahub.upgrade.system.domaindescription.ReindexDomainDescription;
import com.linkedin.datahub.upgrade.system.restoreindices.domaindescription.ReindexDomainDescription;
import com.linkedin.metadata.entity.AspectDao;
import com.linkedin.metadata.entity.EntityService;
import io.datahubproject.metadata.context.OperationContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.linkedin.datahub.upgrade.config.graph;
package com.linkedin.datahub.upgrade.config.restoreindices.graph;

import com.linkedin.datahub.upgrade.config.SystemUpdateCondition;
import com.linkedin.datahub.upgrade.system.NonBlockingSystemUpgrade;
import com.linkedin.datahub.upgrade.system.graph.vianodes.ReindexDataJobViaNodesCLL;
import com.linkedin.datahub.upgrade.system.restoreindices.graph.vianodes.ReindexDataJobViaNodesCLL;
import com.linkedin.metadata.entity.AspectDao;
import com.linkedin.metadata.entity.EntityService;
import io.datahubproject.metadata.context.OperationContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.linkedin.datahub.upgrade.config.graph;
package com.linkedin.datahub.upgrade.config.restoreindices.graph;

import com.linkedin.datahub.upgrade.config.SystemUpdateCondition;
import com.linkedin.datahub.upgrade.system.NonBlockingSystemUpgrade;
import com.linkedin.datahub.upgrade.system.graph.edgestatus.ReindexEdgeStatus;
import com.linkedin.datahub.upgrade.system.restoreindices.graph.edgestatus.ReindexEdgeStatus;
import com.linkedin.metadata.entity.AspectDao;
import com.linkedin.metadata.entity.EntityService;
import io.datahubproject.metadata.context.OperationContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.linkedin.datahub.upgrade.system.domaindescription;
package com.linkedin.datahub.upgrade.system.restoreindices.domaindescription;

import com.google.common.collect.ImmutableList;
import com.linkedin.datahub.upgrade.UpgradeStep;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.linkedin.datahub.upgrade.system.domaindescription;
package com.linkedin.datahub.upgrade.system.restoreindices.domaindescription;

import static com.linkedin.metadata.Constants.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.linkedin.datahub.upgrade.system.graph.edgestatus;
package com.linkedin.datahub.upgrade.system.restoreindices.graph.edgestatus;

import com.google.common.collect.ImmutableList;
import com.linkedin.datahub.upgrade.UpgradeStep;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.linkedin.datahub.upgrade.system.graph.edgestatus;
package com.linkedin.datahub.upgrade.system.restoreindices.graph.edgestatus;

import static com.linkedin.metadata.Constants.STATUS_ASPECT_NAME;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.linkedin.datahub.upgrade.system.graph.vianodes;
package com.linkedin.datahub.upgrade.system.restoreindices.graph.vianodes;

import com.google.common.collect.ImmutableList;
import com.linkedin.datahub.upgrade.UpgradeStep;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.linkedin.datahub.upgrade.system.graph.vianodes;
package com.linkedin.datahub.upgrade.system.restoreindices.graph.vianodes;

import static com.linkedin.metadata.Constants.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package com.linkedin.datahub.upgrade.system.restoreindices.structuredproperties;

import com.google.common.collect.ImmutableList;
import com.linkedin.datahub.upgrade.UpgradeStep;
import com.linkedin.datahub.upgrade.system.NonBlockingSystemUpgrade;
import com.linkedin.metadata.entity.AspectDao;
import com.linkedin.metadata.entity.EntityService;
import io.datahubproject.metadata.context.OperationContext;
import java.util.List;
import javax.annotation.Nonnull;
import lombok.extern.slf4j.Slf4j;

/**
* A job that reindexes all domain aspects as part of reindexing descriptions This is required to
* fix the analytics for domains
*/
@Slf4j
public class PropertyDefinitions implements NonBlockingSystemUpgrade {

private final List<UpgradeStep> _steps;

public PropertyDefinitions(
@Nonnull OperationContext opContext,
EntityService<?> entityService,
AspectDao aspectDao,
boolean enabled,
Integer batchSize,
Integer batchDelayMs,
Integer limit) {
if (enabled) {
_steps =
ImmutableList.of(
new PropertyDefinitionsStep(
opContext, entityService, aspectDao, batchSize, batchDelayMs, limit));
} else {
_steps = ImmutableList.of();
}
}

@Override
public String id() {
return this.getClass().getName();
}

@Override
public List<UpgradeStep> steps() {
return _steps;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.linkedin.datahub.upgrade.system.restoreindices.structuredproperties;

import static com.linkedin.metadata.Constants.*;

import com.linkedin.datahub.upgrade.system.AbstractMCLStep;
import com.linkedin.metadata.entity.AspectDao;
import com.linkedin.metadata.entity.EntityService;
import io.datahubproject.metadata.context.OperationContext;
import javax.annotation.Nonnull;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.Nullable;

@Slf4j
public class PropertyDefinitionsStep extends AbstractMCLStep {

public PropertyDefinitionsStep(
OperationContext opContext,
EntityService<?> entityService,
AspectDao aspectDao,
Integer batchSize,
Integer batchDelayMs,
Integer limit) {
super(opContext, entityService, aspectDao, batchSize, batchDelayMs, limit);
}

@Override
public String id() {
return "structured-property-definitions-v1";
}

@Nonnull
@Override
protected String getAspectName() {
return STRUCTURED_PROPERTY_DEFINITION_ASPECT_NAME;
}

@Nullable
@Override
protected String getUrnLike() {
return "urn:li:" + STRUCTURED_PROPERTY_ENTITY_NAME + ":%";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.linkedin.datahub.upgrade.impl.DefaultUpgradeManager;
import com.linkedin.datahub.upgrade.system.SystemUpdateNonBlocking;
import com.linkedin.datahub.upgrade.system.bootstrapmcps.BootstrapMCPStep;
import com.linkedin.datahub.upgrade.system.graph.vianodes.ReindexDataJobViaNodesCLL;
import com.linkedin.datahub.upgrade.system.restoreindices.graph.vianodes.ReindexDataJobViaNodesCLL;
import com.linkedin.metadata.boot.kafka.MockSystemUpdateDeserializer;
import com.linkedin.metadata.boot.kafka.MockSystemUpdateSerializer;
import com.linkedin.metadata.config.kafka.KafkaConfiguration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import React, { useState } from 'react';
import { message, Modal, Button, Form, Input, Typography, Select } from 'antd';
import { useApolloClient } from '@apollo/client';
import TextArea from 'antd/lib/input/TextArea';
import styled from 'styled-components';
import analytics, { EventType, EntityActionType } from '../../../../../analytics';
import { useEntityData } from '../../../EntityContext';
import { EntityType, IncidentSourceType, IncidentState, IncidentType } from '../../../../../../types.generated';
import { INCIDENT_DISPLAY_TYPES, PAGE_SIZE, addActiveIncidentToCache } from '../incidentUtils';
import { useRaiseIncidentMutation } from '../../../../../../graphql/mutations.generated';
import handleGraphQLError from '../../../../../shared/handleGraphQLError';
import { useUserContext } from '../../../../../context/useUserContext';
import { Editor } from '../../Documentation/components/editor/Editor';
import { ANTD_GRAY } from '../../../constants';

const StyledEditor = styled(Editor)`
border: 1px solid ${ANTD_GRAY[4.5]};
`;

type AddIncidentProps = {
open: boolean;
Expand Down Expand Up @@ -112,6 +118,7 @@ export const AddIncidentModal = ({ open, onClose, refetch }: AddIncidentProps) =
open={open}
destroyOnClose
onCancel={handleClose}
width={600}
footer={[
<Button type="text" onClick={handleClose}>
Cancel
Expand Down Expand Up @@ -174,7 +181,17 @@ export const AddIncidentModal = ({ open, onClose, refetch }: AddIncidentProps) =
},
]}
>
<TextArea placeholder="Provide some additional details" />
<StyledEditor
doNotFocus
className="add-incident-description"
onKeyDown={(e) => {
// Preventing the modal from closing when the Enter key is pressed
if (e.key === 'Enter') {
e.preventDefault();
e.stopPropagation();
}
}}
/>
</Form.Item>
</Form>
</Modal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { useUpdateIncidentStatusMutation } from '../../../../../../graphql/mutat
import { ResolveIncidentModal } from './ResolveIncidentModal';
import handleGraphQLError from '../../../../../shared/handleGraphQLError';
import { MenuItemStyle } from '../../../../view/menu/item/styledComponent';
import MarkdownViewer from '../../../components/legacy/MarkdownViewer';

type Props = {
incident: any;
Expand Down Expand Up @@ -227,7 +228,7 @@ export default function IncidentListItem({ incident, refetch }: Props) {
</TitleContainer>
<DescriptionContainer>
<IncidentDescriptionLabel>Description</IncidentDescriptionLabel>
<IncidentDescriptionText>{incident?.description}</IncidentDescriptionText>
<MarkdownViewer source={incident?.description} />
{incident.status.state === IncidentState.Resolved ? (
<>
<IncidentDescriptionLabel>Resolution Note</IncidentDescriptionLabel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const QuickstartContent = ({}) => {
<div className="quickstart__text__head">{data.title}</div>
<div className="quickstart__text__desc">
<p dangerouslySetInnerHTML={{ __html: data.description }} />
{/* <span className="learn_more">Learn More →</span> */}
<a className="learn_more" href={data.link}>Learn More →</a>
</div>
</div>
<div className="quickstart__img">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ const quickstartData = [
description:
"Enable everyone in your organization to effortlessly discover trustworthy data, with experiences tailored for each persona.<span></span>Eliminate breaking changes with detailed cross-platform and column-level lineage. <span></span> Build confidence in your data with a comprehensive view of business, operational, and technical context, all in one place.",
image: "/img/quickstart_discovery.png",
link: "/solutions/discovery",
},
{
heading: "Observability",
title: "Build trust in your data",
description:
"Effortlessly detect data quality issues with automated checks and AI-driven anomaly detection. <span></span> Notify your team where they work when issues arise and keep stakeholders in the loop with centralized incident tracking. <span></span> Spend minutes, not days, resolving issues with detailed lineage, documentation, and ownership information all in one place.",
image: "/img/quickstart_observability.png",
link: "/solutions/observability",
},
{
heading: "Governance",
title: "Minimize compliance risk, effortlessly",
description:
"Ensure every data asset is accounted for and responsibility governed by defining and enforcing documentation standards. <span></span> Automate your governance program to automatically classify assets as they evolve over time. <span></span> Minimize redundant, manual work with GenAI documentation, AI-driven classification, smart propagation, and more.",
image: "/img/quickstart_governance.png",
link: "/solutions/governance",

},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@
.learn_more {
color: #1890FF;
font-weight: 500;

&:hover {
text-decoration: none !important;
opacity: 0.8;
}
}
}
}
Expand Down
Loading

0 comments on commit 7895c29

Please sign in to comment.