Skip to content

Commit 43b8d7b

Browse files
snazyrenovate-botolsoloviovsinghpk234flyrain
authored
Dremio merge 2025 11 01 20 57 (apache#150)
* Fix Jandex Maven coordinates (apache#2888) The entry `jandex = { module = "io.smallrye.jandex:jandex", version ="3.5.0" }` is wrong (coordinates are `io.smallrye:jandex`), and Jandex is defined elsewhere as `smallrye-jandex`. Interestingly, these (broken) coordinates seem to cause the consistent re-creation of the Quarkus 3.29.0 PR (the cause is a mystery). * Update plugin com.gradle.develocity to v4.2.2 (apache#2597) * Site: Hugo docs relative links (apache#2892) * Update dependency software.amazon.awssdk:bom to v2.36.2 (apache#2901) * Update GitHub Artifact Actions (apache#2895) * Formatting: apply Spotless to :polaris-distribution (apache#2900) * Build: Capture jcstress output in a log file (apache#2890) The jcstress output is pretty verbose and prints a lot to the console. This change captures the output in a log file. In case of a test failure, the output is logged to the console, but only in case of a failure. * Prep: Site for 1.2 release (apache#2877) * Adding 1.2.0 as one of active releases (apache#2916) Co-authored-by: Yufei Gu <yufei.apache.org> * Use official spark image (apache#2899) * Update dependency ipykernel to v7.1.0 (apache#2918) * Added missing features doc (apache#2898) * Added missing features doc * Added missing features doc * Site: Add a blog for StarRocks and Apache Polaris Integration (apache#2851) * NoSQL: Node IDs - API, SPI + general implementation (apache#2728) * NoSQL: Node IDs - API, SPI + general implementation This PR provides a mechanism to assign a Polaris-cluster-wide unique node-ID to each Polaris instance, which is then used when generating Polaris-cluster-wide unique Snowflake-IDs. The change is fundamental for the NoSQL work, but also demanded for the existing relational JDBC persistence. Does not include any persistence specific implementation. * NoSQL: Fail node-management-impl init after timeout Also move the expensive part to a `@PostConstruct` to not block CDI entirely from initializing. * Update dependency io.prometheus:prometheus-metrics-exporter-servlet-jakarta to v1.4.2 (apache#2929) * Build-logic: `GitInfo` refactor (apache#2908) Allows use of `GitInfo` for other use cases than just Jar manifest attributes. SBOM generation will be another use case for Git information. * Memoize ASF project information (apache#2909) Information included in Polaris publications pulls some information about the project from ASF project metadata sources (Whimsey). This information is currently only used when generating Maven poms, but will also be needed in SBOMs. This change adds a new, memoized `AsfProject` information object, which holds the project infromation from Whimsey. * Build: Simplify signing + fix execution in polaris-distribution (apache#2906) This change simplifies generation of non-publication artifacts by adding a function taking the task which outputs shall be signed. That function takes care of setting up the correct task dependencies and task execution. Also fixes an issue that signing does not always happen when running `./gradlew :polaris-distribution:assemble`, because the task dependency graph for the archive tasks and the corresponding signing tasks isn't properly set up. * Proposed Test Fix (apache#2936) Co-authored-by: Travis Michael Bowen <travis.bowen@snowflake.com> * Update docker.io/prom/prometheus Docker tag to v3.7.3 (apache#2944) * Update Quarkus Platform and Group to v3.29.0 (apache#2934) * Update Gradle to v9.2.0 (apache#2938) Co-authored-by: Robert Stupp <snazy@snazy.de> * Update dependency openapi-generator-cli to v7.17.0 (apache#2940) * Implement OpaPolarisAuthorizer (apache#2680) * Update dependency com.github.ben-manes.caffeine:caffeine to v3.2.3 (apache#2923) * Prefer PolarisPrincipal.getRoles in Resolver (apache#2925) it should be sufficient to rely on `SecurityContext.getUserPrincipal` alone, we dont need to call `isUserInRole` explicitly. note due to the `ResolverTest` testing with non-existent roles we have to add null-filtering to the `Resolver`. * Move `nodeids` to `nosql` package parent (apache#2931) Following up on apache#2728 this change moves "nodeids" code to the `org.apache.polaris.persistence.nosql.nodeids` package. * Update actions/stale digest to 39bea7d (apache#2950) * Update dependency org.junit:junit-bom to v5.14.1 (apache#2951) * docs(2843): Add documentation around Polaris-Tools (apache#2946) * Add documentation around Polaris-Tools * Related to apache#2843 * Add getting started with Apache Ozone (apache#2853) * Add getting started with Apache Ozone Use Apache Ozone as an example S3 impl. that does not have STS. * fix typo in MinIO readme * Update dependency com.azure:azure-sdk-bom to v1.3.0 (apache#2754) * docs: add feature configuration section to Hive federation guide (apache#2952) Add documentation for required feature flags when enabling Hive Metastore federation. Users must configure three properties in `application.properties` before Hive federation will work: - `SUPPORTED_CATALOG_CONNECTION_TYPES` - `SUPPORTED_EXTERNAL_CATALOG_AUTHENTICATION_TYPES` - `ENABLE_CATALOG_FEDERATION` Inspired from [this](https://apache-polaris.slack.com/archives/C084XDM50CB/p1761851426511259) Slack thread. Co-authored-by: Prathyush Shankar <prathyush2018@gmail.com> * Change getting-start docker file to use official spark image from outdated jupyter image (apache#2943) * Use official spark image * Use official spark image * Use official spark image * Use official spark image * Use official spark image * Use Iterable for realms in BootstrapCommand (apache#2956) * Simplify digest generation (apache#2907) Similarly to the change to simplify artifact signing, this change simplifies digest generation by introducing a function to digest the output files of any task. That function takes care of setting up the correct task dependencies and task execution. Also removes an unnecessary double buffering during digest generation. * Build: `GitInfo` function to build a raw github content URL (apache#2910) * NoSQL: nodeids renames * NoSQL: Update test for Caffeine 3.2.3 The read of `Eviction` properties is "just" a volatile read since Caffeine 3.2.3 and trigger cleanups asynchronously. Before 3.2.3, cleanups happened synchronously. This change breaks the initially present assertions of this test, but not the functionality of the production code. See ben-manes/caffeine#1897 * Last merged commit cec41c4 --------- Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: olsoloviov <40199597+olsoloviov@users.noreply.github.com> Co-authored-by: Prashant Singh <35593236+singhpk234@users.noreply.github.com> Co-authored-by: Yufei Gu <yufei@apache.org> Co-authored-by: Yong Zheng <yongzheng0809@gmail.com> Co-authored-by: Youngwb <yangwenbo_mailbox@163.com> Co-authored-by: Travis Bowen <122238243+travis-bowen@users.noreply.github.com> Co-authored-by: Travis Michael Bowen <travis.bowen@snowflake.com> Co-authored-by: Sung Yun <107272191+sungwy@users.noreply.github.com> Co-authored-by: Christopher Lambert <xn137@gmx.de> Co-authored-by: Dmitri Bourlatchkov <dmitri.bourlatchkov@gmail.com> Co-authored-by: Adam Christian <105929021+adam-christian-software@users.noreply.github.com> Co-authored-by: carc-prathyush-shankar <prathyush.shankar@carbonarc.co> Co-authored-by: Prathyush Shankar <prathyush2018@gmail.com>
1 parent bb5aa4e commit 43b8d7b

File tree

114 files changed

+4990
-576
lines changed

Some content is hidden

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

114 files changed

+4990
-576
lines changed

.github/actions/ci-incr-build-cache-prepare/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ runs:
7676
run: ./gradlew -h
7777

7878
- name: Download existing workflow artifacts
79-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
79+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
8080
# Just in case, don't know the exact inner workings of Gradle's build cache and whether
8181
# the download-action complains about duplicate files.
8282
continue-on-error: true

.github/actions/ci-incr-build-cache-save/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ runs:
6161
echo "::endgroup::"
6262
fi
6363
- name: Archive code-checks incremental
64-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
64+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
6565
with:
6666
name: ci-gradle-caches-${{ inputs.job-name }}-${{ inputs.java-version }}
6767
path: ~/ci-gradle-caches-${{ inputs.job-name }}-${{ inputs.java-version }}.tar

.github/workflows/gradle.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
with:
7474
job-name: 'unit-tests'
7575
- name: Archive test results
76-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
76+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
7777
if: always()
7878
with:
7979
name: upload-unit-test-artifacts
@@ -110,7 +110,7 @@ jobs:
110110
with:
111111
job-name: 'quarkus-runtime-tests'
112112
- name: Archive test results
113-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
113+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
114114
if: always()
115115
with:
116116
name: upload-quarkus-runtime-test-artifacts
@@ -145,7 +145,7 @@ jobs:
145145
with:
146146
job-name: 'quarkus-runtime-inttests'
147147
- name: Archive test results
148-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
148+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
149149
if: always()
150150
with:
151151
name: upload-quarkus-runtime-inttest-artifacts
@@ -180,7 +180,7 @@ jobs:
180180
with:
181181
job-name: 'quarkus-admin-tests'
182182
- name: Archive test results
183-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
183+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
184184
if: always()
185185
with:
186186
name: upload-quarkus-admin-test-artifacts
@@ -222,7 +222,7 @@ jobs:
222222
with:
223223
job-name: 'integration-tests'
224224
- name: Archive test results
225-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
225+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
226226
if: always()
227227
with:
228228
name: upload-integration-test-artifacts

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
stale:
2323
runs-on: ubuntu-24.04
2424
steps:
25-
- uses: actions/stale@e46bbabb3ede15841d25946157759558dd16306e
25+
- uses: actions/stale@39bea7de61dd70ce4705a976f904f33d5e1e0f49
2626
with:
2727
days-before-close: 5
2828
days-before-stale: 30

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ In addition to modules, there are:
9595
- [server-templates](./server-templates) - OpenAPI Generator templates to generate the server code
9696
- [site](./site/README.md) - The Polaris website
9797

98+
Outside of this repository, there are several other tools that can be found in a separate [Polaris-Tools](https://github.com/apache/polaris-tools) repository.
99+
98100
## Building and Running
99101

100102
Apache Polaris is built using Gradle with Java 21+ and Docker 27+.

bom/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ dependencies {
8888
api(project(":polaris-eclipselink"))
8989
api(project(":polaris-relational-jdbc"))
9090

91+
api(project(":polaris-extensions-auth-opa"))
92+
9193
api(project(":polaris-admin"))
9294
api(project(":polaris-runtime-common"))
9395
api(project(":polaris-runtime-test-common"))
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import org.gradle.api.Project
21+
import org.gradle.kotlin.dsl.extra
22+
23+
/**
24+
* Container to memoize Git information retrieved via `git` command executions across all Gradle
25+
* projects.
26+
*/
27+
class GitInfo(val gitHead: String, val gitDescribe: String, private val rawLinkRef: String) {
28+
29+
fun rawGithubLink(file: String): String =
30+
"https://raw.githubusercontent.com/apache/polaris/$rawLinkRef/$file"
31+
32+
companion object {
33+
private fun execGit(rootProject: Project, vararg args: Any): String {
34+
val out =
35+
rootProject.providers
36+
.exec {
37+
executable = "git"
38+
args(args.toList())
39+
}
40+
.standardOutput
41+
.asText
42+
.get()
43+
return out.trim()
44+
}
45+
46+
fun memoized(project: Project): GitInfo {
47+
val rootProject = project.rootProject
48+
return if (rootProject.extra.has("gitInfo")) {
49+
@Suppress("UNCHECKED_CAST")
50+
rootProject.extra["gitInfo"] as GitInfo
51+
} else {
52+
val isRelease =
53+
rootProject.hasProperty("release") || rootProject.hasProperty("jarWithGitInfo")
54+
val gitHead = execGit(rootProject, "rev-parse", "HEAD")
55+
val gitDescribe =
56+
if (isRelease)
57+
try {
58+
execGit(rootProject, "describe", "--tags")
59+
} catch (_: Exception) {
60+
execGit(rootProject, "describe", "--always", "--dirty")
61+
}
62+
else ""
63+
val rawLinkRef = if (isRelease) gitDescribe else "HEAD"
64+
val gitInfo = GitInfo(gitHead, gitDescribe, rawLinkRef)
65+
rootProject.extra["gitInfo"] = gitInfo
66+
return gitInfo
67+
}
68+
}
69+
}
70+
}
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package asf
21+
22+
import groovy.json.JsonException
23+
import groovy.json.JsonSlurper
24+
import java.io.FileNotFoundException
25+
import java.net.URI
26+
import org.gradle.api.Project
27+
import org.gradle.kotlin.dsl.extra
28+
29+
class AsfProject(
30+
val apacheId: String,
31+
val name: String,
32+
val description: String,
33+
val website: String,
34+
val repository: String,
35+
val licenseUrl: String,
36+
val bugDatabase: String,
37+
val inceptionYear: Int,
38+
) {
39+
companion object {
40+
41+
fun memoized(project: Project, asfName: String): AsfProject {
42+
val rootProject = project.rootProject
43+
return if (rootProject.extra.has("asfProject")) {
44+
unsafeCast(rootProject.extra["asfProject"]) as AsfProject
45+
} else {
46+
val asfProject = fetchProjectInformation(asfName)
47+
rootProject.extra["asfProject"] = asfProject
48+
return asfProject
49+
}
50+
}
51+
52+
internal fun <T : Any> unsafeCast(o: Any?): T {
53+
@Suppress("UNCHECKED_CAST")
54+
return o as T
55+
}
56+
57+
internal fun <T : Any> parseJson(urlStr: String): T {
58+
val url = URI(urlStr).toURL()
59+
60+
val headers = mutableMapOf<String, String>()
61+
if (url.host == "api.github.com" && url.protocol == "https") {
62+
val githubToken = System.getenv("GITHUB_TOKEN")
63+
if (githubToken != null) {
64+
// leverage the GH token to benefit from higher rate limits
65+
headers["Authorization"] = "Bearer $githubToken"
66+
// recommended for GH API requests
67+
headers["X-GitHub-Api-Version"] = "2022-11-28"
68+
headers["Accept"] = "application/vnd.github+json"
69+
}
70+
}
71+
72+
// See org.codehaus.groovy.runtime.ResourceGroovyMethods.newReader(URL, Map)
73+
val params = mapOf("requestProperties" to headers)
74+
75+
val slurper = JsonSlurper()
76+
var attempt = 0
77+
while (true) {
78+
try {
79+
return unsafeCast(slurper.parse(params, url)) as T
80+
} catch (e: JsonException) {
81+
if (e.cause is FileNotFoundException) {
82+
throw e
83+
}
84+
if (attempt == 5) {
85+
throw e
86+
}
87+
Thread.sleep(1000L)
88+
}
89+
attempt++
90+
}
91+
}
92+
93+
/** Retrieves the project name, for example `Polaris` using the lower-case project ID. */
94+
internal fun fetchAsfProjectName(apacheId: String): String {
95+
val project = projectMap(apacheId)
96+
val isPodlingCurrent = project.containsKey("podling") && project["podling"] == "current"
97+
if (isPodlingCurrent) {
98+
val podling = podlingMap(apacheId)
99+
return podling["name"] as String
100+
} else {
101+
// top-level-project
102+
val committee = projectCommitteeMap(apacheId)
103+
return committee["display_name"] as String
104+
}
105+
}
106+
107+
internal fun projectCommitteeMap(apacheId: String): Map<String, Any> {
108+
val committeesAll: Map<String, Map<String, Any>> =
109+
parseJson("https://whimsy.apache.org/public/committee-info.json")
110+
val committees = unsafeCast<Map<String, Map<String, Any>>>(committeesAll["committees"])
111+
return unsafeCast(committees[apacheId])
112+
}
113+
114+
internal fun projectMap(apacheId: String): Map<String, Any> {
115+
val projectsAll: Map<String, Map<String, Any>> =
116+
parseJson("https://whimsy.apache.org/public/public_ldap_projects.json")
117+
val projects = unsafeCast<Map<String, Map<String, Any>>>(projectsAll["projects"])
118+
val project =
119+
projects[apacheId]
120+
?: throw IllegalArgumentException(
121+
"No project '$apacheId' found in https://whimsy.apache.org/public/public_ldap_projects.json"
122+
)
123+
return project
124+
}
125+
126+
internal fun podlingMap(apacheId: String): Map<String, Any> {
127+
val podlingsAll: Map<String, Map<String, Any>> =
128+
parseJson("https://whimsy.apache.org/public/public_podlings.json")
129+
val podlings = unsafeCast<Map<String, Map<String, Any>>>(podlingsAll["podling"])
130+
val podling =
131+
podlings[apacheId]
132+
?: throw IllegalArgumentException(
133+
"No podling '$apacheId' found in https://whimsy.apache.org/public/public_podlings.json"
134+
)
135+
return podling
136+
}
137+
138+
internal fun fetchProjectInformation(apacheId: String): AsfProject {
139+
val project = projectMap(apacheId)
140+
val isPodlingCurrent = project.containsKey("podling") && project["podling"] == "current"
141+
142+
val inceptionYear =
143+
(project["createTimestamp"] as String).subSequence(0, 4).toString().toInt()
144+
145+
val projectName: String
146+
val description: String
147+
val website: String
148+
val repository: String
149+
val licenseUrl: String
150+
val bugDatabase: String
151+
if (isPodlingCurrent) {
152+
val podling = podlingMap(apacheId)
153+
projectName = podling["name"] as String
154+
description = podling["description"] as String
155+
val podlingStatus = unsafeCast(podling["podlingStatus"]) as Map<String, Any>
156+
website = podlingStatus["website"] as String
157+
// No repository for podlings??
158+
repository = "https://github.com/apache/$apacheId.git"
159+
bugDatabase = "https://github.com/apache/$apacheId/issues"
160+
licenseUrl = "https://www.apache.org/licenses/LICENSE-2.0.txt"
161+
} else {
162+
// top-level-project
163+
val tlpPrj: Map<String, Any> =
164+
parseJson("https://projects.apache.org/json/projects/$apacheId.json")
165+
website = tlpPrj["homepage"] as String
166+
repository = (unsafeCast(tlpPrj["repository"]) as List<String>)[0]
167+
bugDatabase = tlpPrj["bug-database"] as String
168+
licenseUrl = tlpPrj["license"] as String
169+
170+
val committee = projectCommitteeMap(apacheId)
171+
projectName = committee["display_name"] as String
172+
description = committee["description"] as String
173+
}
174+
175+
return AsfProject(
176+
apacheId,
177+
projectName,
178+
description,
179+
website,
180+
repository,
181+
licenseUrl,
182+
bugDatabase,
183+
inceptionYear,
184+
)
185+
}
186+
}
187+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ plugins.withType<JandexPlugin>().configureEach {
4848
version =
4949
versionCatalogs
5050
.named("libs")
51-
.findLibrary("jandex")
51+
.findLibrary("smallrye-jandex")
5252
.orElseThrow { GradleException("jandex version not found in libs.versions.toml") }
5353
.get()
5454
.version

0 commit comments

Comments
 (0)