Skip to content

Commit

Permalink
Merge branch 'master' into auto_lowercase_dataset_urns
Browse files Browse the repository at this point in the history
  • Loading branch information
treff7es authored Oct 6, 2023
2 parents eb4346e + ea87feb commit 669ba6a
Show file tree
Hide file tree
Showing 248 changed files with 16,270 additions and 1,915 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/airflow-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- "metadata-models/**"
pull_request:
branches:
- master
- "**"
paths:
- ".github/**"
- "metadata-ingestion-modules/airflow-plugin/**"
Expand All @@ -32,16 +32,21 @@ jobs:
strategy:
matrix:
include:
- python-version: "3.7"
extraPythonRequirement: "apache-airflow~=2.1.0"
- python-version: "3.7"
extraPythonRequirement: "apache-airflow~=2.2.0"
- python-version: "3.8"
extra_pip_requirements: "apache-airflow~=2.1.4"
extra_pip_extras: plugin-v1
- python-version: "3.8"
extra_pip_requirements: "apache-airflow~=2.2.4"
extra_pip_extras: plugin-v1
- python-version: "3.10"
extraPythonRequirement: "apache-airflow~=2.4.0"
extra_pip_requirements: "apache-airflow~=2.4.0"
extra_pip_extras: plugin-v2
- python-version: "3.10"
extraPythonRequirement: "apache-airflow~=2.6.0"
extra_pip_requirements: "apache-airflow~=2.6.0"
extra_pip_extras: plugin-v2
- python-version: "3.10"
extraPythonRequirement: "apache-airflow>2.6.0"
extra_pip_requirements: "apache-airflow>=2.7.0"
extra_pip_extras: plugin-v2
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand All @@ -51,13 +56,13 @@ jobs:
cache: "pip"
- name: Install dependencies
run: ./metadata-ingestion/scripts/install_deps.sh
- name: Install airflow package and test (extras ${{ matrix.extraPythonRequirement }})
run: ./gradlew -Pextra_pip_requirements='${{ matrix.extraPythonRequirement }}' :metadata-ingestion-modules:airflow-plugin:lint :metadata-ingestion-modules:airflow-plugin:testQuick
- name: Install airflow package and test (extras ${{ matrix.extra_pip_requirements }})
run: ./gradlew -Pextra_pip_requirements='${{ matrix.extra_pip_requirements }}' -Pextra_pip_extras='${{ matrix.extra_pip_extras }}' :metadata-ingestion-modules:airflow-plugin:lint :metadata-ingestion-modules:airflow-plugin:testQuick
- name: pip freeze show list installed
if: always()
run: source metadata-ingestion-modules/airflow-plugin/venv/bin/activate && pip freeze
- uses: actions/upload-artifact@v3
if: ${{ always() && matrix.python-version == '3.10' && matrix.extraPythonRequirement == 'apache-airflow>2.6.0' }}
if: ${{ always() && matrix.python-version == '3.10' && matrix.extra_pip_requirements == 'apache-airflow>=2.7.0' }}
with:
name: Test Results (Airflow Plugin ${{ matrix.python-version}})
path: |
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "**.md"
pull_request:
branches:
- master
- "**"
paths-ignore:
- "docs/**"
- "**.md"
Expand All @@ -24,17 +24,12 @@ jobs:
strategy:
fail-fast: false
matrix:
command:
[
"./gradlew build -x :metadata-ingestion:build -x :metadata-ingestion:check -x docs-website:build -x :metadata-integration:java:spark-lineage:test -x :metadata-io:test -x :metadata-ingestion-modules:airflow-plugin:build -x :datahub-frontend:build -x :datahub-web-react:build --parallel",
"./gradlew :datahub-frontend:build :datahub-web-react:build --parallel",
"./gradlew :metadata-ingestion-modules:airflow-plugin:build --parallel"
]
timezone:
[
"UTC",
"America/New_York",
command: [
# metadata-ingestion and airflow-plugin each have dedicated build jobs
"except_metadata_ingestion",
"frontend"
]
timezone: ["UTC", "America/New_York"]
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand All @@ -51,10 +46,17 @@ jobs:
java-version: 11
- uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Gradle build (and test)
python-version: "3.10"
cache: pip
- name: Gradle build (and test) for metadata ingestion
# we only need the timezone runs for frontend tests
if: ${{ matrix.command == 'except_metadata_ingestion' && matrix.timezone == 'America/New_York' }}
run: |
./gradlew build -x :metadata-ingestion:build -x :metadata-ingestion:check -x docs-website:build -x :metadata-integration:java:spark-lineage:test -x :metadata-io:test -x :metadata-ingestion-modules:airflow-plugin:build -x :metadata-ingestion-modules:airflow-plugin:check -x :datahub-frontend:build -x :datahub-web-react:build --parallel
- name: Gradle build (and test) for frontend
if: ${{ matrix.command == 'frontend' }}
run: |
${{ matrix.command }}
./gradlew :datahub-frontend:build :datahub-web-react:build --parallel
env:
NODE_OPTIONS: "--max-old-space-size=3072"
- uses: actions/upload-artifact@v3
Expand All @@ -81,7 +83,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.10"
- name: Download YQ
uses: chrisdickinson/[email protected]
with:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/check-datahub-jars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- "**.md"
pull_request:
branches:
- master
- "**"
paths-ignore:
- "docker/**"
- "docs/**"
Expand All @@ -28,12 +28,7 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
command:
[
"datahub-client",
"datahub-protobuf",
"spark-lineage"
]
command: ["datahub-client", "datahub-protobuf", "spark-lineage"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
days-before-issue-stale: 30
days-before-issue-close: 30
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io"
stale-issue-message:
"This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io.\
\ For feature requests please use https://feature-requests.datahubproject.io"
close-issue-message: "This issue was closed because it has been inactive for 30 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- ".github/workflows/code-checks.yml"
pull_request:
branches:
- master
- "**"
paths:
- "metadata-io/**"
- "datahub-web-react/**"
Expand All @@ -21,17 +21,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true


jobs:
code_check:
strategy:
fail-fast: false
matrix:
command:
[
"check_event_type.py",
"check_policies.py"
]
command: ["check_event_type.py", "check_policies.py"]
name: run code checks
runs-on: ubuntu-latest
steps:
Expand All @@ -43,5 +38,5 @@ jobs:
with:
python-version: "3.10"
- name: run check ${{ matrix.command }}
run: |
python .github/scripts/${{ matrix.command }}
run: |-
python .github/scripts/${{ matrix.command }}
3 changes: 1 addition & 2 deletions .github/workflows/docker-postgres-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- ".github/workflows/docker-postgres-setup.yml"
pull_request:
branches:
- master
- "**"
paths:
- "docker/postgres-setup/**"
- ".github/workflows/docker-postgres-setup.yml"
Expand Down Expand Up @@ -61,4 +61,3 @@ jobs:
context: .
file: ./docker/postgres-setup/Dockerfile
platforms: linux/amd64,linux/arm64

7 changes: 3 additions & 4 deletions .github/workflows/docker-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "**.md"
pull_request:
branches:
- master
- "**"
paths-ignore:
- "docs/**"
- "**.md"
Expand Down Expand Up @@ -545,7 +545,6 @@ jobs:
id: tag
run: echo "tag=${{ steps.filter.outputs.datahub-ingestion-base == 'true' && needs.setup.outputs.unique_full_tag || 'head' }}" >> $GITHUB_OUTPUT


datahub_ingestion_slim_build:
name: Build and Push DataHub Ingestion Docker Images
runs-on: ubuntu-latest
Expand Down Expand Up @@ -809,8 +808,8 @@ jobs:
DATAHUB_VERSION: ${{ needs.setup.outputs.unique_tag }}
DATAHUB_ACTIONS_IMAGE: ${{ env.DATAHUB_INGESTION_IMAGE }}
ACTIONS_VERSION: ${{ needs.datahub_ingestion_slim_build.outputs.tag }}
ACTIONS_EXTRA_PACKAGES: 'acryl-datahub-actions[executor]==0.0.13 acryl-datahub-actions==0.0.13 acryl-datahub==0.10.5'
ACTIONS_CONFIG: 'https://raw.githubusercontent.com/acryldata/datahub-actions/main/docker/config/executor.yaml'
ACTIONS_EXTRA_PACKAGES: "acryl-datahub-actions[executor]==0.0.13 acryl-datahub-actions==0.0.13 acryl-datahub==0.10.5"
ACTIONS_CONFIG: "https://raw.githubusercontent.com/acryldata/datahub-actions/main/docker/config/executor.yaml"
run: |
./smoke-test/run-quickstart.sh
- name: sleep 60s
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: documentation
on:
pull_request:
branches:
- master
- "**"
push:
branches:
- master
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/lint-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ name: Lint actions
on:
pull_request:
paths:
- '.github/workflows/**'
- ".github/workflows/**"

branches:
- "**"
jobs:
actionlint:
runs-on: ubuntu-latest
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/metadata-ingestion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "metadata-models/**"
pull_request:
branches:
- master
- "**"
paths:
- ".github/**"
- "metadata-ingestion/**"
Expand All @@ -34,11 +34,10 @@ jobs:
python-version: ["3.7", "3.10"]
command:
[
"lint",
"testQuick",
"testIntegration",
"testIntegrationBatch0",
"testIntegrationBatch1",
"testSlowIntegration",
"testIntegrationBatch2",
]
include:
- python-version: "3.7"
Expand All @@ -54,21 +53,28 @@ jobs:
run: ./metadata-ingestion/scripts/install_deps.sh
- name: Install package
run: ./gradlew :metadata-ingestion:installPackageOnly
- name: Run lint alongwith testQuick
if: ${{ matrix.command == 'testQuick' }}
run: ./gradlew :metadata-ingestion:lint
- name: Run metadata-ingestion tests
run: ./gradlew :metadata-ingestion:${{ matrix.command }}
- name: pip freeze show list installed
- name: Debug info
if: always()
run: source metadata-ingestion/venv/bin/activate && pip freeze
run: |
source metadata-ingestion/venv/bin/activate && pip freeze
set -x
df -hl
docker image ls
docker system df
- uses: actions/upload-artifact@v3
if: ${{ always() && matrix.command != 'lint' }}
with:
name: Test Results (metadata ingestion ${{ matrix.python-version }})
path: |
**/build/reports/tests/test/**
**/build/test-results/test/**
**/junit.*.xml
- name: Upload coverage to Codecov
if: ${{ always() && matrix.python-version == '3.10' && matrix.command != 'lint' }}
if: ${{ always() && matrix.python-version == '3.10' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/metadata-io.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- "metadata-io/**"
pull_request:
branches:
- master
- "**"
paths:
- "**/*.gradle"
- "li-utils/**"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spark-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- ".github/workflows/spark-smoke-test.yml"
pull_request:
branches:
- master
- "**"
paths:
- "metadata_models/**"
- "metadata-integration/java/datahub-client/**"
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ project.ext.externalDependency = [
'springBootStarterValidation': "org.springframework.boot:spring-boot-starter-validation:$springBootVersion",
'springKafka': 'org.springframework.kafka:spring-kafka:2.8.11',
'springActuator': "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion",
'swaggerAnnotations': 'io.swagger.core.v3:swagger-annotations:2.1.12',
'swaggerCli': 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.41',
'swaggerAnnotations': 'io.swagger.core.v3:swagger-annotations:2.2.15',
'swaggerCli': 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.46',
'testngJava8': 'org.testng:testng:7.5.1',
'testng': 'org.testng:testng:7.8.0',
'testContainers': 'org.testcontainers:testcontainers:' + testContainersVersion,
Expand Down
29 changes: 24 additions & 5 deletions buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
import com.google.common.collect.ImmutableSet;
import com.linkedin.metadata.models.registry.config.Entities;
import com.linkedin.metadata.models.registry.config.Entity;
import org.gradle.internal.Pair;
Expand All @@ -16,7 +17,12 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
Expand All @@ -37,10 +43,23 @@ public class OpenApiEntities {
private String entityRegistryYaml;
private Path combinedDirectory;

private final static Set<String> SUPPORTED_ASPECT_PATHS = Set.of(
"domains", "ownership", "deprecation", "status", "globalTags", "glossaryTerms", "dataContractInfo",
"browsePathsV2"
);
private final static ImmutableSet<Object> SUPPORTED_ASPECT_PATHS = ImmutableSet.builder()
.add("domains")
.add("ownership")
.add("deprecation")
.add("status")
.add("globalTags")
.add("glossaryTerms")
.add("dataContractInfo")
.add("browsePathsV2")
.add("datasetProperties").add("editableDatasetProperties")
.add("chartInfo").add("editableChartProperties")
.add("dashboardInfo").add("editableDashboardProperties")
.add("notebookInfo").add("editableNotebookProperties")
.add("dataProductProperties")
.add("institutionalMemory")
.build();


public OpenApiEntities(JsonNodeFactory NODE_FACTORY) {
this.NODE_FACTORY = NODE_FACTORY;
Expand Down
Loading

0 comments on commit 669ba6a

Please sign in to comment.