Skip to content

Commit eabd45d

Browse files
snazyrenovate-botXN137adutraMonkeyCanCode
authored
Dremio merge 2025 08 07 12 36 (apache#101)
* fix(deps): update dependency com.nimbusds:nimbus-jose-jwt to v10.4.1 (apache#2270) * chore(deps): update actions/download-artifact action to v5 (apache#2271) * fix(deps): update dependency boto3 to v1.40.3 (apache#2269) * Prefer diagnostics field in Resolver (apache#2247) * Stop mocking PolarisDiagnostics (apache#2248) if diagnostis checks are failing in our tests we want to know about it * Add TestServices.newCallContext (apache#2249) also add local `newCallContext` helper in some test classes * Nit: simplify runtime-service dependencies (apache#2273) Dependency "io.quarkus:quarkus-jdbc-postgresql" doesn't need any excludes (these excludes were for `SparkIT` which is now isolated in a separate module). * Minor fixes and enhancements to External IDP documentation (apache#2274) * Standardize logging libraries in tests (apache#2268) This change enforces the following test logging patterns: - Non-Quarkus modules use Logback Classic, configured via logback-test.xml - Quarkus modules use JBoss Logging Manager, configured in Quarkus configuration files. This change also introduces a workaround for the "duplicate log messages" issues with Gradle + JBoss Logging Manager. See this issue for context: quarkusio/quarkus#22844 The workaround implemented in this PR is very similar to the one proposed in this comment: quarkusio/quarkus#22844 (comment) Note: it's not entirely possible imho to suppress the following message on the console: ``` The Agroal dependency is present but no JDBC datasources have been defined. ``` This is because: 1. The message happens during augmentation phase, not during tests 2. And it suffers from the "duplicate message" issue with (it's actually Gradle that prints those messages). * Use Mockito Java agent for mock instrumentation (apache#2275) This change fixes the following warning during tests: Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3 WARNING: A Java agent has been loaded dynamically (.../byte-buddy-agent-1.17.5.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release * Use injected PolarisDiagnostics in MetaStoreManagerFactory impls (apache#2251) * Clean exit when running repair mode for client (apache#2287) * Clean exit when running repair mode for client * Clean exit when running repair mode for client * chore(deps): update dependency poetry to v2.1.4 (apache#2259) * chore(deps): update dependency poetry to v2.1.4 * fix pyproject --------- Co-authored-by: Robert Stupp <snazy@snazy.de> * fix(deps): update dependency com.gradleup.shadow:shadow-gradle-plugin to v9 (apache#2289) * chore(deps): update docker.io/jaegertracing/all-in-one docker tag to v1.72.0 (apache#2285) * fix(deps): update dependency boto3 to v1.40.4 (apache#2284) * Remove PolarisCallContext.getClock (apache#2250) the clock is application scoped and thus should not be put into any realm or call specific context class. * Add PolarisAdminService.loadEntities helper (apache#2261) `PolarisAdminService` has multiple spots where it is working around the sub-optimal `PolarisMetaStoreManager` APIs. This results in multiple fixes like apache#1949 and apache#2258 While eventually the underlying APIs should be improved, for now we can make a single central workaround and clean up some redundant code. Also we can improve the return types as callers are not interested in details of the entity layer. * fix(deps): update dependency com.google.cloud:google-cloud-storage-bom to v2.55.0 (apache#2281) * fix: typo in server template files. (apache#2288) * NoSQL: merge related adoptions * Last merged commit d753e3d --------- Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: Christopher Lambert <xn137@gmx.de> Co-authored-by: Alexandre Dutra <adutra@apache.org> Co-authored-by: Yong Zheng <yongzheng0809@gmail.com> Co-authored-by: Yujiang Zhong <42907416+zhongyujiang@users.noreply.github.com>
1 parent 4741fc6 commit eabd45d

File tree

73 files changed

+647
-527
lines changed

Some content is hidden

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

73 files changed

+647
-527
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
@@ -55,7 +55,7 @@ runs:
5555
run: ./gradlew -h
5656

5757
- name: Download existing workflow artifacts
58-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
58+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
5959
# Just in case, don't know the exact inner workings of Gradle's build cache and whether
6060
# the download-action complains about duplicate files.
6161
continue-on-error: true

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

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,13 @@ testing {
107107
dependencies {
108108
implementation(project())
109109
implementation(testFixtures(project()))
110-
runtimeOnly(
111-
libs.findLibrary("logback-classic").orElseThrow {
112-
GradleException("logback-classic not declared in libs.versions.toml")
113-
}
114-
)
110+
if (!plugins.hasPlugin("io.quarkus")) {
111+
implementation(
112+
libs.findLibrary("logback-classic").orElseThrow {
113+
GradleException("logback-classic not declared in libs.versions.toml")
114+
}
115+
)
116+
}
115117
implementation(
116118
libs.findLibrary("assertj-core").orElseThrow {
117119
GradleException("assertj-core not declared in libs.versions.toml")
@@ -138,6 +140,8 @@ testing {
138140
}
139141
}
140142

143+
val mockitoAgent = configurations.create("mockitoAgent")
144+
141145
dependencies {
142146
val libs = versionCatalogs.named("libs")
143147
testFixturesImplementation(
@@ -153,18 +157,24 @@ dependencies {
153157
GradleException("assertj-core not declared in libs.versions.toml")
154158
}
155159
)
156-
testFixturesImplementation(
160+
val mockitoCoreLib =
157161
libs.findLibrary("mockito-core").orElseThrow {
158162
GradleException("mockito-core not declared in libs.versions.toml")
159163
}
160-
)
164+
165+
testFixturesImplementation(mockitoCoreLib)
166+
167+
mockitoAgent(mockitoCoreLib) { isTransitive = false }
161168
}
162169

163170
tasks.withType<Test>().configureEach {
164171
systemProperty("file.encoding", "UTF-8")
165172
systemProperty("user.language", "en")
166173
systemProperty("user.country", "US")
167174
systemProperty("user.variant", "")
175+
jvmArgumentProviders.add(
176+
CommandLineArgumentProvider { listOf("-javaagent:${mockitoAgent.asPath}") }
177+
)
168178
}
169179

170180
tasks.withType<Jar>().configureEach {

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ testing {
2424
suites {
2525
withType<JvmTestSuite> {
2626
targets.all {
27+
testTask.configure {
28+
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
29+
// Enable automatic extension detection to execute GradleDuplicateLoggingWorkaround
30+
// automatically.
31+
// See https://github.com/quarkusio/quarkus/issues/22844
32+
systemProperty("junit.jupiter.extensions.autodetection.enabled", "true")
33+
}
34+
2735
if (testTask.name != "test") {
2836
testTask.configure {
2937
// For Quarkus...
@@ -47,6 +55,23 @@ testing {
4755
}
4856
}
4957

58+
dependencies {
59+
// All Quarkus projects should use JBoss LogManager with SLF4J, instead of Logback
60+
implementation("org.jboss.slf4j:slf4j-jboss-logmanager")
61+
}
62+
63+
configurations.all {
64+
// Validate that Logback dependencies are not used in Quarkus modules.
65+
dependencies.configureEach {
66+
if (group == "ch.qos.logback") {
67+
throw GradleException(
68+
"Logback dependencies are not allowed in Quarkus modules. " +
69+
"Found $group:$name in ${project.name}."
70+
)
71+
}
72+
}
73+
}
74+
5075
// Let the test's implementation config extend testImplementation, so it also inherits the
5176
// project's "main" implementation dependencies (not just the "api" configuration)
5277
configurations.named("intTestImplementation").configure {

client/python/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies = [
3434
"python-dateutil>=2.8.2",
3535
"pydantic>=2.0.0",
3636
"typing-extensions>=4.7.1",
37-
"boto3==1.40.2",
37+
"boto3==1.40.4",
3838
]
3939

4040
[project.urls]
@@ -45,7 +45,7 @@ repository = "https://github.com/apache/polaris/"
4545
polaris = "cli.polaris_cli:main"
4646

4747
[tool.poetry]
48-
requires-poetry = "==2.1.3"
48+
requires-poetry = "==2.1.4"
4949
packages = [
5050
{ include = "polaris" },
5151
{ include = "cli" }

getting-started/telemetry/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ services:
8585

8686
# Jaeger (OpenTelemetry traces collector)
8787
jaeger:
88-
image: docker.io/jaegertracing/all-in-one:1.71.0
88+
image: docker.io/jaegertracing/all-in-one:1.72.0
8989
ports:
9090
# Jaeger gRPC collector, used by Polaris
9191
- "4317:4317"

gradle/baselibs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ errorprone = { module = "net.ltgt.gradle:gradle-errorprone-plugin", version = "4
2222
idea-ext = { module = "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext", version = "1.2" }
2323
license-report = { module = "com.github.jk1:gradle-license-report", version = "2.9" }
2424
nexus-publish = { module = "io.github.gradle-nexus:publish-plugin", version = "2.0.0" }
25-
shadow = { module = "com.gradleup.shadow:shadow-gradle-plugin", version = "8.3.9" }
25+
shadow = { module = "com.gradleup.shadow:shadow-gradle-plugin", version = "9.0.0" }
2626
spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version = "7.2.1" }

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ commons-text = { module = "org.apache.commons:commons-text", version = "1.14.0"
5353
docker-java-api = { module = "com.github.docker-java:docker-java-api", version = "3.5.3" }
5454
eclipselink = { module = "org.eclipse.persistence:eclipselink", version = "4.0.7" }
5555
errorprone = { module = "com.google.errorprone:error_prone_core", version = "2.41.0" }
56-
google-cloud-storage-bom = { module = "com.google.cloud:google-cloud-storage-bom", version = "2.54.0" }
56+
google-cloud-storage-bom = { module = "com.google.cloud:google-cloud-storage-bom", version = "2.55.0" }
5757
guava = { module = "com.google.guava:guava", version = "33.4.8-jre" }
5858
h2 = { module = "com.h2database:h2", version = "2.3.232" }
5959
dnsjava = { module = "dnsjava:dnsjava", version = "3.6.3" }

persistence/eclipselink/src/main/java/org/apache/polaris/extension/persistence/impl/eclipselink/EclipseLinkPolarisMetaStoreManagerFactory.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import jakarta.enterprise.context.ApplicationScoped;
2525
import jakarta.inject.Inject;
2626
import java.nio.file.Path;
27+
import java.time.Clock;
2728
import org.apache.polaris.core.PolarisDiagnostics;
2829
import org.apache.polaris.core.context.RealmContext;
2930
import org.apache.polaris.core.persistence.LocalPolarisMetaStoreManagerFactory;
@@ -45,13 +46,14 @@ public class EclipseLinkPolarisMetaStoreManagerFactory
4546
@Inject EclipseLinkConfiguration eclipseLinkConfiguration;
4647
@Inject PolarisStorageIntegrationProvider storageIntegrationProvider;
4748

49+
@SuppressWarnings("unused") // Required by CDI
4850
protected EclipseLinkPolarisMetaStoreManagerFactory() {
49-
this(null);
51+
this(null, null);
5052
}
5153

5254
@Inject
53-
protected EclipseLinkPolarisMetaStoreManagerFactory(PolarisDiagnostics diagnostics) {
54-
super(diagnostics);
55+
protected EclipseLinkPolarisMetaStoreManagerFactory(Clock clock, PolarisDiagnostics diagnostics) {
56+
super(clock, diagnostics);
5557
}
5658

5759
@Override

persistence/eclipselink/src/test/java/org/apache/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkMetaStoreManagerTest.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@
3030
import java.net.URL;
3131
import java.nio.file.Files;
3232
import java.nio.file.Path;
33-
import java.time.ZoneId;
3433
import java.util.Objects;
3534
import java.util.stream.Stream;
3635
import org.apache.polaris.core.PolarisCallContext;
3736
import org.apache.polaris.core.PolarisDefaultDiagServiceImpl;
3837
import org.apache.polaris.core.PolarisDiagnostics;
39-
import org.apache.polaris.core.config.PolarisConfigurationStore;
4038
import org.apache.polaris.core.context.RealmContext;
4139
import org.apache.polaris.core.entity.PolarisPrincipalSecrets;
4240
import org.apache.polaris.core.persistence.BasePolarisMetaStoreManagerTest;
@@ -89,14 +87,10 @@ protected PolarisTestMetaStoreManager createPolarisTestMetaStoreManager() {
8987
PolarisEclipseLinkMetaStoreSessionImpl session =
9088
new PolarisEclipseLinkMetaStoreSessionImpl(
9189
store, Mockito.mock(), realmContext, null, "polaris", RANDOM_SECRETS);
92-
return new PolarisTestMetaStoreManager(
93-
new TransactionalMetaStoreManagerImpl(),
94-
new PolarisCallContext(
95-
realmContext,
96-
session,
97-
diagServices,
98-
new PolarisConfigurationStore() {},
99-
timeSource.withZone(ZoneId.systemDefault())));
90+
TransactionalMetaStoreManagerImpl metaStoreManager =
91+
new TransactionalMetaStoreManagerImpl(clock);
92+
PolarisCallContext callCtx = new PolarisCallContext(realmContext, session, diagServices);
93+
return new PolarisTestMetaStoreManager(metaStoreManager, callCtx);
10094
}
10195

10296
@ParameterizedTest

persistence/nosql/persistence/metastore/src/main/java/org/apache/polaris/persistence/nosql/metastore/PersistenceMetaStoreManager.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import jakarta.annotation.Nonnull;
2525
import jakarta.annotation.Nullable;
26+
import java.time.Clock;
2627
import java.util.List;
2728
import java.util.Map;
2829
import java.util.Optional;
@@ -70,14 +71,17 @@ class PersistenceMetaStoreManager implements PolarisMetaStoreManager {
7071
private final Supplier<BaseResult> purgeRealm;
7172
private final RootCredentialsSet rootCredentialsSet;
7273
private final Supplier<PersistenceMetaStore> metaStoreSupplier;
74+
private final Clock clock;
7375

7476
PersistenceMetaStoreManager(
7577
Supplier<BaseResult> purgeRealm,
7678
RootCredentialsSet rootCredentialsSet,
77-
Supplier<PersistenceMetaStore> metaStoreSupplier) {
79+
Supplier<PersistenceMetaStore> metaStoreSupplier,
80+
Clock clock) {
7881
this.purgeRealm = purgeRealm;
7982
this.rootCredentialsSet = rootCredentialsSet;
8083
this.metaStoreSupplier = metaStoreSupplier;
84+
this.clock = clock;
8185
}
8286

8387
PersistenceMetaStore ms() {
@@ -525,7 +529,7 @@ public EntitiesResult loadTasks(
525529
PolarisTaskConstants.TASK_TIMEOUT_MILLIS);
526530
return taskState == null
527531
|| taskState.executor == null
528-
|| callCtx.getClock().millis() - taskState.lastAttemptStartTime > taskAgeTimeout;
532+
|| clock.millis() - taskState.lastAttemptStartTime > taskAgeTimeout;
529533
},
530534
Function.identity(),
531535
PageToken.readEverything());
@@ -540,8 +544,7 @@ public EntitiesResult loadTasks(
540544
var properties = PolarisObjectMapperUtil.deserializeProperties(task.getProperties());
541545
properties.put(PolarisTaskConstants.LAST_ATTEMPT_EXECUTOR_ID, executorId);
542546
properties.put(
543-
PolarisTaskConstants.LAST_ATTEMPT_START_TIME,
544-
String.valueOf(callCtx.getClock().millis()));
547+
PolarisTaskConstants.LAST_ATTEMPT_START_TIME, String.valueOf(clock.millis()));
545548
properties.put(
546549
PolarisTaskConstants.ATTEMPT_COUNT,
547550
String.valueOf(

0 commit comments

Comments
 (0)