Skip to content

Commit 3a8f527

Browse files
committed
feat: initial port
1 parent c615937 commit 3a8f527

104 files changed

Lines changed: 22749 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bumpversion.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[tool.bumpversion]
2+
current_version = "0.0.1"
3+
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(-(?P<pre_label>alpha|beta|rc)\\.(?P<pre_n>\\d+))?"
4+
serialize = [
5+
"{major}.{minor}.{patch}-{pre_label}.{pre_n}",
6+
"{major}.{minor}.{patch}"
7+
]
8+
search = "{current_version}"
9+
replace = "{new_version}"
10+
regex = false
11+
ignore_missing_files = false
12+
ignore_missing_version = false
13+
tag = false
14+
sign_tags = false
15+
tag_name = "v{new_version}"
16+
tag_message = "Release version {new_version}"
17+
allow_dirty = false
18+
commit = false
19+
message = "chore: bump version {current_version} → {new_version}"
20+
21+
[tool.bumpversion.parts.pre_label]
22+
optional_value = "stable"
23+
first_value = "stable"
24+
values = ["stable", "alpha", "beta", "rc"]
25+
26+
[tool.bumpversion.parts.pre_n]
27+
optional_value = "0"
28+
first_value = "0"
29+
30+
# Java pom.xml
31+
[[tool.bumpversion.files]]
32+
filename = "java/pom.xml"
33+
search = "<version>{current_version}</version>"
34+
replace = "<version>{new_version}</version>"
35+
36+
# Python pyproject.toml
37+
[[tool.bumpversion.files]]
38+
filename = "python/pyproject.toml"
39+
search = 'version = "{current_version}"'
40+
replace = 'version = "{new_version}"'

.github/workflows/docs.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
13+
name: Deploy Documentation
14+
15+
on:
16+
push:
17+
branches:
18+
- main
19+
paths:
20+
- docs/**
21+
- .github/workflows/docs.yml
22+
workflow_dispatch:
23+
24+
permissions:
25+
contents: read
26+
pages: write
27+
id-token: write
28+
29+
concurrency:
30+
group: "pages"
31+
cancel-in-progress: false
32+
33+
jobs:
34+
build:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
40+
- name: Set up Python
41+
uses: actions/setup-python@v5
42+
with:
43+
python-version: '3.11'
44+
45+
- name: Install uv
46+
uses: astral-sh/setup-uv@v4
47+
48+
- name: Install dependencies
49+
run: |
50+
uv pip install --system mkdocs-material mkdocs-awesome-pages-plugin
51+
52+
- name: Build docs
53+
working-directory: docs
54+
run: mkdocs build
55+
56+
- name: Setup Pages
57+
uses: actions/configure-pages@v4
58+
59+
- name: Upload artifact
60+
uses: actions/upload-pages-artifact@v3
61+
with:
62+
path: docs/site
63+
64+
deploy:
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
runs-on: ubuntu-latest
69+
needs: build
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v4
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Hive2 Integration Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'java/lance-namespace-hive2/**'
8+
- 'docker/hive2/**'
9+
- 'docker/docker-compose.yml'
10+
- '.github/workflows/integration-hive2.yml'
11+
pull_request:
12+
branches: [main]
13+
paths:
14+
- 'java/lance-namespace-hive2/**'
15+
- 'docker/hive2/**'
16+
- 'docker/docker-compose.yml'
17+
- '.github/workflows/integration-hive2.yml'
18+
workflow_dispatch:
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
integration-test:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 30
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Set up JDK 17
34+
uses: actions/setup-java@v4
35+
with:
36+
java-version: '17'
37+
distribution: 'temurin'
38+
cache: 'maven'
39+
40+
- name: Download PostgreSQL JDBC driver
41+
run: |
42+
mkdir -p docker/hive2
43+
curl -sSL -o docker/hive2/postgresql-42.7.3.jar \
44+
https://jdbc.postgresql.org/download/postgresql-42.7.3.jar
45+
46+
- name: Start Hive2 Metastore
47+
run: |
48+
docker compose -f docker/hive2/docker-compose.yml up -d
49+
echo "Waiting for services to start..."
50+
51+
- name: Wait for Hive2 Metastore to be ready
52+
run: |
53+
echo "Waiting for Hive2 Metastore to be ready..."
54+
timeout 180 bash -c '
55+
until docker compose -f docker/hive2/docker-compose.yml ps | grep -q "healthy"; do
56+
echo "Waiting for healthy status..."
57+
docker compose -f docker/hive2/docker-compose.yml ps
58+
sleep 10
59+
done
60+
' || {
61+
echo "Timeout waiting for Hive2 Metastore"
62+
docker compose -f docker/hive2/docker-compose.yml logs
63+
exit 1
64+
}
65+
echo "Hive2 Metastore is ready"
66+
67+
- name: Verify Hive2 connectivity
68+
run: |
69+
# Wait a bit more for thrift to be fully ready
70+
sleep 10
71+
nc -z localhost 9083 || {
72+
echo "Cannot connect to Hive2 Metastore on port 9083"
73+
docker compose -f docker/hive2/docker-compose.yml logs
74+
exit 1
75+
}
76+
echo "Hive2 Metastore is accepting connections on port 9083"
77+
78+
- name: Run Hive2 integration tests
79+
working-directory: java
80+
run: |
81+
./mvnw test -pl lance-namespace-hive2 \
82+
-Dtest="*IntegrationTest" \
83+
-DfailIfNoTests=false \
84+
-Dmaven.test.failure.ignore=false
85+
86+
- name: Collect logs on failure
87+
if: failure()
88+
run: |
89+
echo "=== Docker Compose Status ==="
90+
docker compose -f docker/hive2/docker-compose.yml ps
91+
echo ""
92+
echo "=== Hive2 Metastore Logs ==="
93+
docker compose -f docker/hive2/docker-compose.yml logs hive2-metastore
94+
echo ""
95+
echo "=== PostgreSQL Logs ==="
96+
docker compose -f docker/hive2/docker-compose.yml logs postgres-hive2
97+
98+
- name: Cleanup
99+
if: always()
100+
run: |
101+
docker compose -f docker/hive2/docker-compose.yml down -v
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Hive3 Integration Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'java/lance-namespace-hive3/**'
8+
- 'docker/hive3/**'
9+
- 'docker/docker-compose.yml'
10+
- '.github/workflows/integration-hive3.yml'
11+
pull_request:
12+
branches: [main]
13+
paths:
14+
- 'java/lance-namespace-hive3/**'
15+
- 'docker/hive3/**'
16+
- 'docker/docker-compose.yml'
17+
- '.github/workflows/integration-hive3.yml'
18+
workflow_dispatch:
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
integration-test:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 30
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Set up JDK 17
34+
uses: actions/setup-java@v4
35+
with:
36+
java-version: '17'
37+
distribution: 'temurin'
38+
cache: 'maven'
39+
40+
- name: Download PostgreSQL JDBC driver
41+
run: |
42+
mkdir -p docker/hive3
43+
curl -sSL -o docker/hive3/postgresql-42.7.3.jar \
44+
https://jdbc.postgresql.org/download/postgresql-42.7.3.jar
45+
46+
- name: Start Hive3 Metastore
47+
run: |
48+
docker compose -f docker/hive3/docker-compose.yml up -d
49+
echo "Waiting for services to start..."
50+
51+
- name: Wait for Hive3 Metastore to be ready
52+
run: |
53+
echo "Waiting for Hive3 Metastore to be ready..."
54+
timeout 180 bash -c '
55+
until docker compose -f docker/hive3/docker-compose.yml ps | grep -q "healthy"; do
56+
echo "Waiting for healthy status..."
57+
docker compose -f docker/hive3/docker-compose.yml ps
58+
sleep 10
59+
done
60+
' || {
61+
echo "Timeout waiting for Hive3 Metastore"
62+
docker compose -f docker/hive3/docker-compose.yml logs
63+
exit 1
64+
}
65+
echo "Hive3 Metastore is ready"
66+
67+
- name: Verify Hive3 connectivity
68+
run: |
69+
# Wait a bit more for thrift to be fully ready
70+
sleep 10
71+
nc -z localhost 9084 || {
72+
echo "Cannot connect to Hive3 Metastore on port 9084"
73+
docker compose -f docker/hive3/docker-compose.yml logs
74+
exit 1
75+
}
76+
echo "Hive3 Metastore is accepting connections on port 9084"
77+
78+
- name: Run Hive3 integration tests
79+
working-directory: java
80+
run: |
81+
./mvnw test -pl lance-namespace-hive3 \
82+
-Dtest="*IntegrationTest" \
83+
-DfailIfNoTests=false \
84+
-Dmaven.test.failure.ignore=false
85+
86+
- name: Collect logs on failure
87+
if: failure()
88+
run: |
89+
echo "=== Docker Compose Status ==="
90+
docker compose -f docker/hive3/docker-compose.yml ps
91+
echo ""
92+
echo "=== Hive3 Metastore Logs ==="
93+
docker compose -f docker/hive3/docker-compose.yml logs hive3-metastore
94+
echo ""
95+
echo "=== PostgreSQL Logs ==="
96+
docker compose -f docker/hive3/docker-compose.yml logs postgres-hive3
97+
98+
- name: Cleanup
99+
if: always()
100+
run: |
101+
docker compose -f docker/hive3/docker-compose.yml down -v

0 commit comments

Comments
 (0)