Skip to content

Commit e05d575

Browse files
snazyadutraMonkeyCanCoderenovate-botXN137
authored
Dremio merge 2025 08 12 09 21 (apache#102)
* Helm Chart: remove duplicate line in authenticationOptions template (apache#2297) * Move python client Makefile into the root level one (apache#2140) * Move python client Makefile into the root level one * Update workflow * add client-lint to pre-commit * Update README.md to include client * fix(deps): update dependency boto3 to v1.40.5 (apache#2300) * fix(deps): update dependency org.assertj:assertj-core to v3.27.4 (apache#2298) * Fix python CI client-integration-test (apache#2305) `CONTAINER_TOOL` got renamed to `DOCKER` in 6764a88 but then eda7074 added more `CONTAINER_TOOL` usage * fix(docs): update BasePolarisAuthenticator to DefaultAuthenticator (apache#2303) * Fix Hadoop federation to initialize the configuration prior to catalog initialization (apache#2282) This PR addresses the gap in Hadoop federation to ensure that we initialize the hadoop configuration prior to initializing the catalog object. The iceberg library expects the hadoop configuration to be initialized before creating a HadoopCatalog object. This change ensures that Polaris is compatible with the underlying iceberg library. Additionally, since the config initialization is based on the underlying (default) core-site.xml file, the change ensures that the federated catalog was created using `IMPLICIT` authentication mode. Testing: Due to current limitations in the current test setup, tested the change manually. [TODO] Add a regtest with hadoop federation once the change is baked into the apache/polaris docker image. * fix(deps): update dependency boto3 to v1.40.6 (apache#2308) * fix(deps): update dependency io.opentelemetry:opentelemetry-bom to v1.53.0 (apache#2309) * Perform force repair when polaris not found (apache#2313) * fix(deps): update dependency com.github.spotbugs:spotbugs-annotations to v4.9.4 (apache#2312) * chore(deps): update dependency pre-commit to v4.3.0 (apache#2311) * fix(deps): update dependency software.amazon.awssdk:bom to v2.32.19 (apache#2314) * fix(deps): update dependency com.gradleup.shadow:shadow-gradle-plugin to v9.0.1 (apache#2310) * Separate Cloud Integration Tests (apache#2283) Currently, cloud integration tests are part of the regular test suite but require cloud credentials to execute properly. This creates unnecessary overhead for developers who just want to run local builds or for CI jobs that don't have cloud access configured. * chore(deps): update actions/checkout action to v5 (apache#2319) * CatalogEntity: internal endpoint not considered (apache#2292) Setting an S3 internal endpoint doesn't work, because the property's not carried over from the OpenAPI model type into `AwsStorageConfigInfo`. * client/python: loosen boto3 dep (apache#2188) It's hard to depend on this package when the boto3 dependency is so strict. * fix(deps): update dependency io.micrometer:micrometer-bom to v1.15.3 (apache#2321) * NoSQL: test adjustment * Last merged commit 45e8e02 --------- Co-authored-by: Alexandre Dutra <adutra@apache.org> Co-authored-by: Yong Zheng <yongzheng0809@gmail.com> Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: Christopher Lambert <xn137@gmx.de> Co-authored-by: Yujiang Zhong <42907416+zhongyujiang@users.noreply.github.com> Co-authored-by: Pooja Nilangekar <poojan@umd.edu> Co-authored-by: Tamas Mate <50709850+tmater@users.noreply.github.com> Co-authored-by: Tyler Rockwood <rockwotj@gmail.com>
1 parent eabd45d commit e05d575

File tree

37 files changed

+281
-261
lines changed

37 files changed

+281
-261
lines changed

.github/workflows/gradle.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
permissions:
4141
contents: read
4242
steps:
43-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
43+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4444
- name: Set up JDK 21
4545
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
4646
with:
@@ -80,7 +80,7 @@ jobs:
8080
permissions:
8181
contents: read
8282
steps:
83-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
83+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
8484
- name: Set up JDK 21
8585
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
8686
with:
@@ -117,7 +117,7 @@ jobs:
117117
permissions:
118118
contents: read
119119
steps:
120-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
120+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
121121
- name: Set up JDK 21
122122
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
123123
with:
@@ -154,7 +154,7 @@ jobs:
154154
- quarkus-tests
155155
- integration-tests
156156
steps:
157-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
157+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
158158
- name: Set up JDK 21
159159
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
160160
with:

.github/workflows/helm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
steps:
4141
- name: Checkout
42-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
42+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4343
with:
4444
fetch-depth: 0
4545

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
if: github.repository == 'apache/polaris'
4747
steps:
4848
- name: Checkout
49-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
49+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
5050
- name: Set up JDK 21
5151
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
5252
with:

.github/workflows/python-client.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
steps:
4444
- name: Checkout Polaris project
45-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
45+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4646

4747
- name: Set up JDK for Gradle
4848
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
@@ -59,14 +59,12 @@ jobs:
5959
python-version: ${{ matrix.python-version }}
6060

6161
- name: Lint
62-
working-directory: client/python
6362
run: |
64-
make lint
63+
make client-lint
6564
6665
- name: Generated Client Tests
67-
working-directory: client/python
6866
run: |
69-
make test-client
67+
make client-unit-test
7068
7169
- name: Image build
7270
run: |
@@ -76,6 +74,5 @@ jobs:
7674
-Dquarkus.container-image.build=true
7775
7876
- name: Integration Tests
79-
working-directory: client/python
8077
run: |
81-
make test-integration
78+
make client-integration-test

.github/workflows/regtest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
contents: read
3333

3434
steps:
35-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
35+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
3636

3737
- name: Set up JDK 21
3838
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4

.github/workflows/site.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
runs-on: ubuntu-latest
3030

3131
steps:
32-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
33-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
32+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
33+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
3434
with:
3535
ref: "versioned-docs"
3636
path: site/content/releases

.github/workflows/spark_client_regtests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
contents: read
3333

3434
steps:
35-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
35+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
3636

3737
- name: Set up JDK 21
3838
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4

Makefile

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ DOCKER ?= docker
2626
MINIKUBE_PROFILE ?= minikube
2727
DEPENDENCIES ?= ct helm helm-docs java21 git
2828
OPTIONAL_DEPENDENCIES := jq kubectl minikube
29+
VENV_DIR := .venv
30+
PYTHON_CLIENT_DIR := client/python
31+
ACTIVATE_AND_CD = source $(VENV_DIR)/bin/activate && cd $(PYTHON_CLIENT_DIR)
2932

3033
## Version information
3134
BUILD_VERSION := $(shell cat version.txt)
3235
GIT_COMMIT := $(shell git rev-parse HEAD)
36+
POETRY_VERSION := $(shell cat client/python/pyproject.toml | grep requires-poetry | sed 's/requires-poetry *= *"\(.*\)"/\1/')
3337

3438
##@ General
3539

@@ -41,6 +45,7 @@ help: ## Display this help
4145
version: ## Display version information
4246
@echo "Build version: ${BUILD_VERSION}"
4347
@echo "Git commit: ${GIT_COMMIT}"
48+
@echo "Poetry version: ${POETRY_VERSION}"
4449

4550
##@ Polaris Build
4651

@@ -99,6 +104,79 @@ spotless-apply: check-dependencies ## Apply code formatting using Spotless Gradl
99104
@./gradlew spotlessApply
100105
@echo "--- Spotless formatting applied ---"
101106

107+
##@ Polaris Client
108+
109+
# Target to create the virtual environment directory
110+
$(VENV_DIR):
111+
@echo "Setting up Python virtual environment at $(VENV_DIR)..."
112+
@python3 -m venv $(VENV_DIR)
113+
@echo "Virtual environment created."
114+
115+
.PHONY: client-install-dependencies
116+
client-install-dependencies: $(VENV_DIR)
117+
@echo "Installing Poetry and project dependencies into $(VENV_DIR)..."
118+
@$(VENV_DIR)/bin/pip install --upgrade pip
119+
@if [ ! -f "$(VENV_DIR)/bin/poetry" ]; then \
120+
$(VENV_DIR)/bin/pip install --upgrade "poetry$(POETRY_VERSION)"; \
121+
fi
122+
@$(ACTIVATE_AND_CD) && poetry install --all-extras
123+
@echo "Poetry and dependencies installed."
124+
125+
.PHONY: client-setup-env
126+
client-setup-env: $(VENV_DIR) client-install-dependencies
127+
128+
.PHONY: client-lint
129+
client-lint: client-setup-env ## Run linting checks for Polaris client
130+
@echo "--- Running client linting checks ---"
131+
@$(ACTIVATE_AND_CD) && poetry run pre-commit run --files integration_tests/* python/cli/*
132+
@echo "--- Client linting checks complete ---"
133+
134+
.PHONY: client-regenerate
135+
client-regenerate: client-setup-env ## Regenerate the client code
136+
@echo "--- Regenerating client code ---"
137+
@client/templates/regenerate.sh
138+
@echo "--- Client code regeneration complete ---"
139+
140+
.PHONY: client-unit-test
141+
client-unit-test: client-setup-env ## Run client unit tests
142+
@echo "--- Running client unit tests ---"
143+
@$(ACTIVATE_AND_CD) && SCRIPT_DIR="non-existing-mock-directory" poetry run pytest test/
144+
@echo "--- Client unit tests complete ---"
145+
146+
.PHONY: client-integration-test
147+
client-integration-test: client-setup-env ## Run client integration tests
148+
@echo "--- Starting client integration tests ---"
149+
@echo "Ensuring Docker Compose services are stopped and removed..."
150+
@$(DOCKER) compose -f $(PYTHON_CLIENT_DIR)/docker-compose.yml kill || true # `|| true` prevents make from failing if containers don't exist
151+
@$(DOCKER) compose -f $(PYTHON_CLIENT_DIR)/docker-compose.yml rm -f || true # `|| true` prevents make from failing if containers don't exist
152+
@echo "Bringing up Docker Compose services in detached mode..."
153+
@$(DOCKER) compose -f $(PYTHON_CLIENT_DIR)/docker-compose.yml up -d
154+
@echo "Waiting for Polaris HTTP health check to pass..."
155+
@until curl -s -f http://localhost:8182/q/health > /dev/null; do \
156+
echo "Still waiting for HTTP 200 from /q/health (sleeping 2s)..."; \
157+
sleep 2; \
158+
done
159+
@echo "Polaris is healthy. Starting integration tests..."
160+
@$(ACTIVATE_AND_CD) && poetry run pytest integration_tests/
161+
@echo "--- Client integration tests complete ---"
162+
@echo "Tearing down Docker Compose services..."
163+
@$(DOCKER) compose -f $(PYTHON_CLIENT_DIR)/docker-compose.yml down || true # Ensure teardown even if tests fail
164+
165+
.PHONY: client-cleanup
166+
client-cleanup: ## Cleanup virtual environment and Python cache files
167+
@echo "--- Cleaning up virtual environment and Python cache files ---"
168+
@echo "Attempting to remove virtual environment directory: $(VENV_DIR)..."
169+
@if [ -n "$(VENV_DIR)" ] && [ -d "$(VENV_DIR)" ]; then \
170+
rm -rf "$(VENV_DIR)"; \
171+
echo "Virtual environment removed."; \
172+
else \
173+
echo "Virtual environment directory '$(VENV_DIR)' not found or VENV_DIR is empty. No action taken."; \
174+
fi
175+
@echo "Cleaning up Python cache files..."
176+
@find $(PYTHON_CLIENT_DIR) -type f -name "*.pyc" -delete
177+
@find $(PYTHON_CLIENT_DIR) -type d -name "__pycache__" -delete
178+
@echo "--- Virtual environment and Python cache cleanup complete ---"
179+
102180
##@ Helm
103181

104182
helm-doc-generate: DEPENDENCIES := helm-docs
@@ -178,7 +256,7 @@ minikube-cleanup: check-dependencies ## Cleanup the Minikube cluster
178256
##@ Pre-commit
179257

180258
.PHONY: pre-commit
181-
pre-commit: spotless-apply helm-doc-generate ## Run tasks for pre-commit
259+
pre-commit: spotless-apply helm-doc-generate client-lint ## Run tasks for pre-commit
182260

183261
##@ Dependencies
184262

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ To streamline the developer experience, especially for common setup and build ta
8787
- Managing development clusters: e.g., `make minikube-start-cluster, make minikube-cleanup`
8888
- Automating Helm tasks: e.g., `make helm-doc-generate, make helm-unittest`
8989
- Handling dependencies: e.g., `make install-dependencies-brew`
90+
- Managing client operations: e.g., `make client-lint, make client-regenerate`
9091

9192
To see available commands:
9293
```bash

build-logic/src/main/kotlin/polaris-runtime.gradle.kts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ testing {
3131
// See https://github.com/quarkusio/quarkus/issues/22844
3232
systemProperty("junit.jupiter.extensions.autodetection.enabled", "true")
3333
}
34-
35-
if (testTask.name != "test") {
34+
}
35+
}
36+
fun intTestSuiteConfigure(testSuite: JvmTestSuite) =
37+
testSuite.run {
38+
targets.all {
3639
testTask.configure {
3740
// For Quarkus...
3841
//
@@ -42,15 +45,22 @@ testing {
4245
dependsOn(tasks.named("quarkusBuild"))
4346
}
4447
}
45-
}
46-
}
47-
register<JvmTestSuite>("intTest") {
48-
targets.all {
49-
tasks.named("compileIntTestJava").configure {
50-
dependsOn(tasks.named("compileQuarkusTestGeneratedSourcesJava"))
48+
tasks.named(sources.compileJavaTaskName).configure {
49+
dependsOn("compileQuarkusTestGeneratedSourcesJava")
5150
}
51+
configurations.named(sources.runtimeOnlyConfigurationName).configure {
52+
extendsFrom(configurations.getByName("testRuntimeOnly"))
53+
}
54+
configurations.named(sources.implementationConfigurationName).configure {
55+
// Let the test's implementation config extend testImplementation, so it also inherits the
56+
// project's "main" implementation dependencies (not just the "api" configuration)
57+
extendsFrom(configurations.getByName("testImplementation"))
58+
}
59+
sources { java.srcDirs(tasks.named("quarkusGenerateCodeTests")) }
5260
}
53-
sources { java.srcDirs(tasks.named("quarkusGenerateCodeTests")) }
61+
62+
listOf("intTest", "cloudTest").forEach {
63+
register<JvmTestSuite>(it).configure { intTestSuiteConfigure(this) }
5464
}
5565
}
5666
}
@@ -72,14 +82,6 @@ configurations.all {
7282
}
7383
}
7484

75-
// Let the test's implementation config extend testImplementation, so it also inherits the
76-
// project's "main" implementation dependencies (not just the "api" configuration)
77-
configurations.named("intTestImplementation").configure {
78-
extendsFrom(configurations.getByName("testImplementation"))
79-
}
80-
81-
dependencies { add("intTestImplementation", java.sourceSets.getByName("test").output.dirs) }
82-
8385
configurations.named("intTestRuntimeOnly").configure {
8486
extendsFrom(configurations.getByName("testRuntimeOnly"))
8587
}

0 commit comments

Comments
 (0)