Skip to content

Commit

Permalink
Merge pull request #14 from rtekal/rtekal-pl-join-ui-ERModelRelation
Browse files Browse the repository at this point in the history
Rtekal pl join UI er model relation
  • Loading branch information
rtekal authored Feb 2, 2024
2 parents 07c6a18 + 2369e07 commit dd09115
Show file tree
Hide file tree
Showing 2,694 changed files with 146,784 additions and 95,411 deletions.
79 changes: 79 additions & 0 deletions .github/actions/ci-optimization/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: 'Identify CI Optimizations'
description: 'Determine if code changes are specific to certain modules.'

outputs:
frontend-only:
description: "Frontend only change"
value: ${{ steps.filter.outputs.frontend == 'true' && steps.filter.outputs.ingestion == 'false' && steps.filter.outputs.backend == 'false' }}
ingestion-only:
description: "Ingestion only change"
value: ${{ steps.filter.outputs.frontend == 'false' && steps.filter.outputs.ingestion == 'true' && steps.filter.outputs.backend == 'false' }}
backend-only:
description: "Backend only change"
value: ${{ steps.filter.outputs.frontend == 'false' && steps.filter.outputs.ingestion == 'false' && steps.filter.outputs.backend == 'true' }}
backend-change:
description: "Backend code has changed"
value: ${{ steps.filter.outputs.backend == 'true' }}
ingestion-change:
description: "Ingestion code has changed"
value: ${{ steps.filter.outputs.ingestion == 'true' }}
frontend-change:
description: "Frontend code has changed"
value: ${{ steps.filter.outputs.frontend == 'true' }}
docker-change:
description: "Docker code has changed"
value: ${{ steps.filter.outputs.docker == 'true' }}
kafka-setup-change:
description: "Kafka setup docker change"
value: ${{ steps.filter.outputs.kafka-setup == 'true' }}
mysql-setup-change:
description: "Mysql setup docker change"
value: ${{ steps.filter.outputs.mysql-setup == 'true' }}
postgres-setup-change:
description: "Postgres setup docker change"
value: ${{ steps.filter.outputs.postgres-setup == 'true' }}
elasticsearch-setup-change:
description: "Elasticsearch setup docker change"
value: ${{ steps.filter.outputs.elasticsearch-setup == 'true' }}
runs:
using: "composite"
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
frontend:
- "datahub-frontend/**"
- "datahub-web-react/**"
- "smoke-test/tests/cypress/**"
- "docker/datahub-frontend/**"
ingestion:
- "metadata-ingestion-modules/**"
- "metadata-ingestion/**"
- "metadata-models/**"
- "smoke-test/**"
- "docker/datahub-ingestion-**"
docker:
- "docker/**"
backend:
- "metadata-models/**"
- "datahub-upgrade/**"
- "entity-registry/**"
- "li-utils/**"
- "metadata-auth/**"
- "metadata-dao-impl/**"
- "metadata-events/**"
- "metadata-io/**"
- "metadata-jobs/**"
- "metadata-service/**"
- "metadata-utils/**"
- "smoke-test/**"
- "docker/**"
kafka-setup:
- "docker/kafka-setup/**"
mysql-setup:
- "docker/mysql-setup/**"
postgres-setup:
- "docker/postgres-setup/**"
elasticsearch-setup:
- "docker/elasticsearch-setup/**"
17 changes: 14 additions & 3 deletions .github/workflows/airflow-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,33 @@ jobs:
strategy:
matrix:
include:
# Note: this should be kept in sync with tox.ini.
- 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"
extra_pip_requirements: "apache-airflow~=2.4.0"
extra_pip_requirements: 'apache-airflow~=2.4.0 pluggy==1.0.0 "pendulum<3.0" "Flask-Session<0.6.0"'
extra_pip_extras: plugin-v2
- python-version: "3.10"
extra_pip_requirements: "apache-airflow~=2.6.0"
extra_pip_requirements: 'apache-airflow~=2.6.0 "pendulum<3.0" "Flask-Session<0.6.0"'
extra_pip_extras: plugin-v2
- python-version: "3.10"
extra_pip_requirements: "apache-airflow>=2.7.0"
extra_pip_requirements: 'apache-airflow~=2.7.0 pydantic==2.4.2 "Flask-Session<0.6.0"'
extra_pip_extras: plugin-v2
- python-version: "3.10"
extra_pip_requirements: 'apache-airflow>=2.8.0 pydantic>=2.4.2 "Flask-Session<0.6.0"'
extra_pip_extras: plugin-v2
fail-fast: false
steps:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17
- uses: gradle/gradle-build-action@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
Expand All @@ -69,6 +79,7 @@ jobs:
**/build/reports/tests/test/**
**/build/test-results/test/**
**/junit.*.xml
!**/binary/**
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v3
Expand Down
61 changes: 40 additions & 21 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@ concurrency:
cancel-in-progress: true

jobs:
setup:
runs-on: ubuntu-latest
outputs:
frontend_change: ${{ steps.ci-optimize.outputs.frontend-change == 'true' }}
ingestion_change: ${{ steps.ci-optimize.outputs.ingestion-change == 'true' }}
backend_change: ${{ steps.ci-optimize.outputs.backend-change == 'true' }}
docker_change: ${{ steps.ci-optimize.outputs.docker-change == 'true' }}
frontend_only: ${{ steps.ci-optimize.outputs.frontend-only == 'true' }}
ingestion_only: ${{ steps.ci-optimize.outputs.ingestion-only == 'true' }}
kafka_setup_change: ${{ steps.ci-optimize.outputs.kafka-setup-change == 'true' }}
mysql_setup_change: ${{ steps.ci-optimize.outputs.mysql-setup-change == 'true' }}
postgres_setup_change: ${{ steps.ci-optimize.outputs.postgres-setup-change == 'true' }}
elasticsearch_setup_change: ${{ steps.ci-optimize.outputs.elasticsearch-setup-change == 'true' }}
steps:
- name: Check out the repo
uses: hsheth2/sane-checkout-action@v1
- uses: ./.github/actions/ci-optimization
id: ci-optimize

build:
strategy:
fail-fast: false
Expand All @@ -29,30 +48,37 @@ jobs:
"except_metadata_ingestion",
"frontend",
]
timezone: ["UTC", "America/New_York"]
timezone: ["UTC"]
include:
# We only need the timezone variation for frontend tests.
- command: "frontend"
timezone: "America/New_York"
runs-on: ubuntu-latest
timeout-minutes: 60
needs: setup
steps:
- uses: szenius/set-timezone@v1.0
- uses: szenius/set-timezone@v1.2
with:
timezoneLinux: ${{ matrix.timezone }}
- uses: hsheth2/sane-checkout-action@v1
- name: Set up JDK 11
- name: Check out the repo
uses: hsheth2/sane-checkout-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 11
java-version: 17
- uses: gradle/gradle-build-action@v2
- uses: actions/setup-python@v4
if: ${{ needs.setup.outputs.ingestion_change == 'true' }}
with:
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' }}
- name: Gradle build (and test) for NOT metadata ingestion
if: ${{ matrix.command == 'except_metadata_ingestion' && needs.setup.outputs.backend_change == 'true' }}
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' }}
if: ${{ matrix.command == 'frontend' && needs.setup.outputs.frontend_change == 'true' }}
run: |
./gradlew :datahub-frontend:build :datahub-web-react:build --parallel
env:
Expand All @@ -65,27 +91,20 @@ jobs:
**/build/reports/tests/test/**
**/build/test-results/test/**
**/junit.*.xml
!**/binary/**
- name: Ensure codegen is updated
uses: ./.github/actions/ensure-codegen-updated
- name: Slack failure notification
if: failure() && github.event_name == 'push'
uses: kpritam/slack-job-status-action@v1
with:
job-status: ${{ job.status }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel: github-activities

quickstart-compose-validation:
runs-on: ubuntu-latest
needs: setup
if: ${{ needs.setup.outputs.docker_change == 'true' }}
steps:
- uses: actions/checkout@v3
- name: Check out the repo
uses: hsheth2/sane-checkout-action@v1
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Download YQ
uses: chrisdickinson/[email protected]
with:
yq-version: v4.28.2
- name: Quickstart Compose Validation
run: ./docker/quickstart/generate_and_compare.sh

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/check-datahub-jars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: hsheth2/sane-checkout-action@v1
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 11
java-version: 17
- uses: gradle/gradle-build-action@v2
- uses: actions/setup-python@v4
with:
python-version: "3.10"
Expand Down
Loading

0 comments on commit dd09115

Please sign in to comment.