Repository navigation
fix: EnrichmentTarget call in DataInsightsEnricherBehaviorIT passes 7 args to 5-component record (main compile error blocking #151) - #152
Merged
Conversation
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
主干编译修复:EnrichmentTarget 调用实参数量错误
问题
maven-sonarcloud-ci在主干代码上编译失败,挡住了 PR #151 的合入:openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/DataInsightsEnricherBehaviorIT.java:552:constructor EnrichmentTarget in record ...EnrichmentTarget cannot be applied to given types该 workflow 只在
pull_request_target(paths 含openmetadata-service/**)时运行,主干 push 不触发;PR #151 因含 2 个 Java 文件(Bai 的 spotless 删除 import)触发了它,暴露了主干上已有的 breakage。证据链(均已逐字核对官方 pin
a3012259ca)EnrichmentTarget(entity, entityMap, changeSummary, context, shape)—— 5 个分量。new EnrichmentTarget(table, entityMap, Map.of(), context, VersionShape.LATEST_HYDRATED)—— 5 个实参。0L, 86_400_000L正是EnrichmentContext的窗口起止时间戳,上一行new EnrichmentContext("table", TABLE_FIELDS, 0L, 86_400_000L)里已经传过一次 —— 移植时把 context 的参数重复写进了 target 调用。new EnrichmentTarget(调用点逐个核对:其余 8 处均为 5 个实参,只有这一处是 7 个。修复
只改这一处调用,去掉多余的两个实参;修后的行与官方 :552 逐字节相同。record 定义不动,其他文件不动,PR #151 分支不动。
验证(请注意)
maven-sonar-build.yml的 paths 不含openmetadata-integration-tests/**;openmetadata-service-unit-tests.yml的 in-job filter 也不含它;integration-tests 系列 workflow 只在 push 时触发。因此本 PR 合入后,由以下两处验证:mvn clean install -pl :openmetadata-integration-tests -am,含该文件编译);openmetadata-service/**文件触发maven-sonarcloud-ci,mvn verify -DskipTests会全 reactor test-compile,含该文件。合入由 parent 在复核后做。
方案 (a):4 行 import 删除已并入(2026-11-06)
MetricGroupResource.java删import java.util.Map;(1 行);MetricResource.java删import org.openmetadata.service.exception.EntityNotFoundException;、import org.openmetadata.service.security.AuthorizationException;、import org.openmetadata.service.security.policyevaluator.ResourceContext;(3 行)。4 行删除与 Bai 在 Airflow plugin Phase 2: clean-room rebuild of openmetadata-airflow-apis (steps 0-7) #151 分支的ad1c3374逐字节相同(已cmp核实),PR 现为 3 文件 +1/−6。java-checkstyle(mvn spotless:apply后git diff-files)失败,挡住了本 PR 的合入;主干自身跑该 job 亦失败。对齐程度(Bai 2026-11-06 20:41 要求:明确写出,不要只写“已修复”/“已对齐”)
EnrichmentTargetrecord 定义与官方逐字节相同(5 个分量,顺序一致)。spotless通过(合规),不是与官方对齐——不要把删除理解为对齐官方。MetricGroupResource.java与MetricResource.java仍缺官方的以下代码,须在合入后移植一轮中补齐:MetricGroupResource的MembershipVisibility记录与membershipVisibility()方法(成员可见性解析,逐请求缓存);MetricResource的导航栏域过滤逻辑(pickedMetrics/canViewMetric/groupInPick,经EntityUtil.navbarDomainMemberIds);MetricResource的ResourceContext相关代码(new ResourceContext<>(...)构造与catch (AuthorizationException | EntityNotFoundException ...))。这三项在主干全树零命中(
MembershipVisibility、navbarDomainMemberIds、cachedDecisions、groupInDomainPick均无命中),系 Wave 0 (g) 移植(2c1b4626)漏掉的权限相关代码。