chore: import upstream snapshot with attribution
Integration Tests - MySQL + Elasticsearch / Detect Changes (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / integration-tests-mysql-elasticsearch (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / integration-tests-postgres-elasticsearch-redis (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / integration-tests-postgres-opensearch (push) Has been cancelled
Java Checkstyle / java-checkstyle (push) Has been cancelled
Maven Collate Tests / maven-collate-ci (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests-status (push) Has been cancelled
Publish Package to Maven Central Repository / publish-maven-packages (push) Has been cancelled
OpenMetadata Service Unit Tests / Detect Changes (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests (push) Has been cancelled
OpenMetadata Service Unit Tests / k8s_operator-unit-tests (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:35:45 +08:00
commit bf2343b7e4
16049 changed files with 3531137 additions and 0 deletions
@@ -0,0 +1,75 @@
name: Prepare for Docker Build&Push
description: Set up Docker Build&Push dependencies and generate Docker Tags.
inputs:
image:
description: image name
required: true
tag:
description: Docker tag to use
required: true
push_latest:
description: true will push the 'latest' tag.
required: true
default: "false"
is_ingestion:
description: true if we are building an Ingestion image, false otherwise
required: true
default: "false"
release_version:
description: OpenMetadata Release Version
dockerhub_username:
description: Dockerhub Username
required: true
dockerhub_token:
description: Dockerhub Token
required: true
outputs:
tags:
description: Generated Docker Tags
value: ${{ steps.meta.outputs.tags }}
runs:
using: composite
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ inputs.dockerhub_username }}
password: ${{ inputs.dockerhub_token }}
- name: Install Ubuntu dependencies
if: inputs.is_ingestion == true
shell: bash
run: |
sudo apt-get install -y python3-venv
- name: Install open-metadata dependencies
if: inputs.is_ingestion == true
shell: bash
run: |
python3 -m venv env
source env/bin/activate
pip install --upgrade pip
sudo make install_antlr_cli
make install_dev generate
- name: Docker Meta
id: meta
uses: docker/metadata-action@v5
with:
flavor:
latest=${{ inputs.push_latest }}
images: |
${{ inputs.image }}
sep-tags: ','
tags: |
type=raw,value=${{ inputs.release_version }},enable=${{ inputs.is_ingestion == 'true' }}
type=raw,${{ inputs.tag }}
@@ -0,0 +1,59 @@
name: Prepare for Docker Build
description: Set up Docker Build dependencies (without pushing) and run Maven build
inputs:
image:
description: Image name
required: true
tag:
description: Docker tag to use
required: true
is_ingestion:
description: true if we are building an Ingestion image, false otherwise
required: true
default: "false"
release_version:
description: OpenMetadata Release Version
outputs:
tags:
description: Generated Docker Tags
value: ${{ steps.meta.outputs.tags }}
runs:
using: composite
steps:
- name: Install Ubuntu dependencies
shell: bash
run: |
# stop relying on apt cache of GitHub runners
sudo apt-get update
sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \
librdkafka-dev unixodbc-dev libevent-dev wkhtmltopdf libkrb5-dev jq
- name: Set up JDK 21
if: inputs.is_ingestion == 'false'
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- name: Install antlr cli
shell: bash
run: |
sudo make install_antlr_cli
- name: Build OpenMetadata Server Application
if: inputs.is_ingestion == 'false'
shell: bash
run: |
mvn -DskipTests clean package
- name: Install OpenMetadata Ingestion Dependencies
if: inputs.is_ingestion == 'true'
shell: bash
run: |
python3 -m venv env
source env/bin/activate
pip install --upgrade pip
sudo make install_antlr_cli
make install_dev generate
@@ -0,0 +1,112 @@
name: Setup OpenMetadata Test Environment
description: Steps needed to have a coherent test environment
inputs:
python-version:
description: Python Version to install
required: true
java-version:
description: Java Version to install
default: '21'
npm-version:
description: NPM Version to install
default: 'v22.x'
args:
description: Arguments to pass to run_local_docker.sh
required: false
default: "-m no-ui -d mysql" # Use "-d postgresql" for postgres and Opensearch
startup-script:
description: Startup script used to launch the local OpenMetadata test environment
required: false
default: "./docker/run_local_docker.sh"
ingestion_dependency:
description: Ingestion dependency to pass to run_local_docker.sh
required: false
default: "mysql,elasticsearch,sample-data"
install-server:
description: Whether to install Java, Node, and the OpenMetadata server
required: false
default: "true"
runs:
using: composite
steps:
# ---- Install Ubuntu Dependencies ---------------------------------------------
- name: Install Ubuntu dependencies
run: |
sudo apt-get update && sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \
libevent-dev python3-dev libkrb5-dev tdsodbc && ACCEPT_EULA=Y sudo apt-get -qq install -y msodbcsql18
shell: bash
# ------------------------------------------------------------------------------
# ---- Setup Java --------------------------------------------------------------
- name: Setup JDK ${{ inputs.java-version }}
if: ${{ inputs.install-server == 'true' }}
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.java-version }}
distribution: 'temurin'
# ------------------------------------------------------------------------------
# ---- Setup Node --------------------------------------------------------------
- name: Use Node.js ${{ inputs.npm-version }}
if: ${{ inputs.install-server == 'true' }}
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.npm-version }}
- name: Install yarn
if: ${{ inputs.install-server == 'true' }}
run: corepack enable
shell: bash
# ------------------------------------------------------------------------------
# ---- Setup Python Test Environment -------------------------------------------
- name: Setup Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Generate Models
run: |
python3 -m venv env
source env/bin/activate
sudo make install_antlr_cli
uv pip install "${{ github.workspace }}/ingestion[dev]"
make generate
shell: bash
- name: Install Python Dependencies
run: |
source env/bin/activate
uv pip install "setuptools<81"
uv pip install --no-build-isolation "cx_Oracle>=8.3.0,<9"
uv pip install --no-deps "sqlalchemy-redshift==0.8.14" "sqlalchemy-ibmi==0.9.3" "pydoris-custom==1.1.0"
uv pip install "${{ github.workspace }}/ingestion[all]"
uv pip install "${{ github.workspace }}/ingestion[test]"
uv pip install nox
shell: bash
# ------------------------------------------------------------------------------
# ---- Start OpenMetadata Server and ingest Sample Data ------------------------
- name: Configure Test Session Limit
if: ${{ inputs.install-server == 'true' }}
run: |
if [ -z "${AUTHENTICATION_MAX_ACTIVE_SESSIONS_PER_USER:-}" ]; then
echo "AUTHENTICATION_MAX_ACTIVE_SESSIONS_PER_USER=10000" >> "$GITHUB_ENV"
fi
shell: bash
- name: Start Server and Ingest Sample Data
if: ${{ inputs.install-server == 'true' }}
uses: nick-fields/retry@v3.0.2
env:
INGESTION_DEPENDENCY: ${{ inputs.ingestion_dependency }}
with:
timeout_minutes: 60
max_attempts: 2
retry_on: error
command: ${{ inputs.startup-script }} ${{ inputs.args }}
@@ -0,0 +1,215 @@
# Copyright 2025 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Validate OpenMetadata Docker Compose
description: Build and validate OpenMetadata Docker Compose with health checks
inputs:
compose_file:
description: Path to docker-compose file
required: false
default: ./docker/docker-compose-quickstart/docker-compose.yml
health_check_timeout:
description: Timeout in seconds for health checks
required: false
default: "300"
runs:
using: composite
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
dotnet: true
large-packages: true
docker-images: true
swap-storage: true
# shell: bash
# run: |
# echo "Disk space before cleanup:"
# df -h
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf /opt/ghc
# sudo rm -rf "/usr/local/share/boost"
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# echo "Disk space after cleanup:"
# df -h
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Validate docker-compose file syntax
shell: bash
run: |
docker compose -f ${{ inputs.compose_file }} config --quiet
- name: Pull Docker images
shell: bash
run: |
docker compose -f ${{ inputs.compose_file }} pull
- name: Start services
shell: bash
run: |
docker compose -f ${{ inputs.compose_file }} up -d
- name: Wait for services to be healthy
shell: bash
run: |
echo "Waiting for services to become healthy..."
TIMEOUT=${{ inputs.health_check_timeout }}
ELAPSED=0
INTERVAL=10
while [ $ELAPSED -lt $TIMEOUT ]; do
echo "Checking service health (${ELAPSED}s/${TIMEOUT}s)..."
# Check MySQL health
MYSQL_HEALTH=$(docker inspect --format='{{.State.Health.Status}}' openmetadata_mysql 2>/dev/null || echo "starting")
echo "MySQL: $MYSQL_HEALTH"
# Check Elasticsearch health
ES_HEALTH=$(docker inspect --format='{{.State.Health.Status}}' openmetadata_elasticsearch 2>/dev/null || echo "starting")
echo "Elasticsearch: $ES_HEALTH"
# Check OpenMetadata Server health
OM_HEALTH=$(docker inspect --format='{{.State.Health.Status}}' openmetadata_server 2>/dev/null || echo "starting")
echo "OpenMetadata Server: $OM_HEALTH"
# Check if all services are healthy
if [ "$MYSQL_HEALTH" = "healthy" ] && [ "$ES_HEALTH" = "healthy" ] && [ "$OM_HEALTH" = "healthy" ]; then
echo "All services are healthy!"
break
fi
# Check for unhealthy services
if [ "$MYSQL_HEALTH" = "unhealthy" ] || [ "$ES_HEALTH" = "unhealthy" ] || [ "$OM_HEALTH" = "unhealthy" ]; then
echo "One or more services are unhealthy"
docker compose -f ${{ inputs.compose_file }} ps
docker compose -f ${{ inputs.compose_file }} logs
exit 1
fi
sleep $INTERVAL
ELAPSED=$((ELAPSED + INTERVAL))
done
if [ $ELAPSED -ge $TIMEOUT ]; then
echo "Timeout waiting for services to become healthy"
docker compose -f ${{ inputs.compose_file }} ps
docker compose -f ${{ inputs.compose_file }} logs
exit 1
fi
- name: Verify OpenMetadata API endpoint
shell: bash
run: |
echo "Testing OpenMetadata API health endpoint..."
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8585/health-check)
if [ "$RESPONSE" != "200" ]; then
echo "OpenMetadata API health check failed with status code: $RESPONSE"
exit 1
fi
echo "OpenMetadata API is responding correctly (HTTP $RESPONSE)"
- name: Verify Elasticsearch endpoint
shell: bash
run: |
echo "Testing Elasticsearch endpoint..."
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:9200/_cluster/health)
if [ "$RESPONSE" != "200" ]; then
echo "Elasticsearch health check failed with status code: $RESPONSE"
exit 1
fi
echo "Elasticsearch is responding correctly (HTTP $RESPONSE)"
- name: Wait for ingestion container to initialize
shell: bash
run: |
echo "Waiting for ingestion container to fully initialize..."
TIMEOUT=180
ELAPSED=0
INTERVAL=10
INGESTION_HEALTH_ENDPOINTS=(
"http://localhost:8080/api/v2/monitor/health"
"http://localhost:8080/health"
)
while [ $ELAPSED -lt $TIMEOUT ]; do
echo "Checking ingestion health (${ELAPSED}s/${TIMEOUT}s)..."
INGESTION_STATUS=$(docker inspect --format='{{.State.Status}}' openmetadata_ingestion 2>/dev/null || echo "not_found")
echo "Ingestion container status: $INGESTION_STATUS"
if [ "$INGESTION_STATUS" = "running" ]; then
for ENDPOINT in "${INGESTION_HEALTH_ENDPOINTS[@]}"; do
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "$ENDPOINT" 2>/dev/null || true)
RESPONSE=${RESPONSE:-000}
echo "Ingestion health endpoint ${ENDPOINT} response: $RESPONSE"
if [ "$RESPONSE" = "200" ]; then
echo "Ingestion service is healthy and responding at ${ENDPOINT}!"
break 2
fi
done
fi
sleep $INTERVAL
ELAPSED=$((ELAPSED + INTERVAL))
done
if [ $ELAPSED -ge $TIMEOUT ]; then
echo "Timeout waiting for ingestion to become healthy"
docker logs openmetadata_ingestion
exit 1
fi
- name: Verify ingestion endpoint
shell: bash
run: |
echo "Testing ingestion endpoint..."
INGESTION_HEALTH_ENDPOINTS=(
"http://localhost:8080/api/v2/monitor/health"
"http://localhost:8080/health"
)
for ENDPOINT in "${INGESTION_HEALTH_ENDPOINTS[@]}"; do
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "$ENDPOINT" 2>/dev/null || true)
RESPONSE=${RESPONSE:-000}
if [ "$RESPONSE" = "200" ]; then
echo "ingestion is responding correctly at ${ENDPOINT} (HTTP $RESPONSE)"
exit 0
fi
echo "ingestion health check for ${ENDPOINT} returned status code: $RESPONSE"
done
exit 1
- name: Display service status
shell: bash
if: always()
run: |
echo "Docker Compose service status:"
docker compose -f ${{ inputs.compose_file }} ps
- name: Display logs on failure
shell: bash
if: failure()
run: |
echo "Docker Compose logs:"
docker compose -f ${{ inputs.compose_file }} logs
- name: Cleanup
shell: bash
if: always()
run: |
docker compose -f ${{ inputs.compose_file }} down -v