Skip to content

perf(ingest/gc): batch hard-delete soft-deleted entities #15008

perf(ingest/gc): batch hard-delete soft-deleted entities

perf(ingest/gc): batch hard-delete soft-deleted entities #15008

name: Prefect Plugin
on:
push:
branches:
- master
- releases/**
paths:
- ".github/workflows/prefect-plugin.yml"
- "metadata-ingestion-modules/prefect-plugin/**"
- "metadata-ingestion/setup.py"
- "metadata-ingestion/pyproject.toml"
- "metadata-ingestion/constraints.txt"
- "metadata-ingestion/build.gradle"
- "metadata-ingestion/src/datahub/api/**"
- "metadata-ingestion/src/datahub/emitter/**"
- "metadata-ingestion/src/datahub/ingestion/graph/**"
- "metadata-ingestion/src/datahub/metadata/**"
- "metadata-ingestion/src/datahub/utilities/**"
- "metadata-models/**"
pull_request:
branches:
- "**"
paths:
- ".github/workflows/prefect-plugin.yml"
- "metadata-ingestion-modules/prefect-plugin/**"
- "metadata-ingestion/setup.py"
- "metadata-ingestion/pyproject.toml"
- "metadata-ingestion/constraints.txt"
- "metadata-ingestion/build.gradle"
- "metadata-ingestion/src/datahub/api/**"
- "metadata-ingestion/src/datahub/emitter/**"
- "metadata-ingestion/src/datahub/ingestion/graph/**"
- "metadata-ingestion/src/datahub/metadata/**"
- "metadata-ingestion/src/datahub/utilities/**"
- "metadata-models/**"
release:
types: [published]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
DEPOT_PROJECT_ID: "${{ vars.DEPOT_PROJECT_ID }}"
jobs:
prefect-plugin:
runs-on: ${{ vars.DEPOT_PROJECT_ID != '' && 'depot-ubuntu-latest' || 'ubuntu-latest' }}
env:
DATAHUB_TELEMETRY_ENABLED: false
strategy:
matrix:
python-version: ["3.10", "3.11"]
fail-fast: false
steps:
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
distribution: "zulu"
java-version: 21
- uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- uses: acryldata/sane-checkout-action@186e92cc5948a9c3e1cc7a96eaff9f776f3fc8e3 # v7
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: ./metadata-ingestion/scripts/install_deps.sh
- name: Install prefect package
run: ./gradlew :metadata-ingestion-modules:prefect-plugin:lint :metadata-ingestion-modules:prefect-plugin:testFull
- name: pip freeze show list installed
if: always()
run: source metadata-ingestion-modules/prefect-plugin/venv/bin/activate && uv pip freeze
- name: Report test results
if: (!cancelled())
uses: ./.github/actions/report-test-results
with:
artifact-name: ingestion-prefect-test-results-${{ strategy.job-index }}
test-results-paths: "metadata-ingestion-modules/prefect-plugin/test-results/**"
junit-file-globs: "metadata-ingestion-modules/prefect-plugin/test-results/*.xml"
- name: Upload coverage to Codecov with ingestion flag
if: always()
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./build/coverage-reports/metadata-ingestion-modules/prefect-plugin/
fail_ci_if_error: false
flags: ingestion-prefect-plugin
name: pytest-prefect-${{ strategy.job-index }}
verbose: true
override_branch: ${{ github.head_ref || github.ref_name }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results
override_branch: ${{ github.head_ref || github.ref_name }}
event-file:
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: Event File
path: ${{ github.event_path }}