BLDX-477 | Sync models and fix compilation failures#2307
Merged
Conversation
- Add missing BadgeComparisonOperator import to BadgeCondition overlay so the generated struct (which now uses String badgeConditionOperator instead of the enum type) still compiles with the overlay's of() convenience methods - Change all 6 .badgeConditionOperator(operator) calls to .badgeConditionOperator(operator.getValue()) to match the String field type - Update BadgeTest.java builder calls similarly (.getValue() on enum args) The upstream fix for getConcreteSuperTypeNames (adding module supertypeDefinition to concrete ancestor sets so Process-typed relationship endpoints are resolved for ColumnProcess/BIProcess/ConnectionProcess) lives in models/JavaRenderer.pkl. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Chris (He/Him) <cgrote@gmail.com>
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
…IDE directive The typedef correctly uses type="string" for badgeConditionOperator (the wire format), but the Java SDK public API must retain BadgeComparisonOperator as the field type to avoid a breaking change. Instead of coercing the enum to a string in callers, add a new // TYPE_OVERRIDE: directive to JavaStructRenderer.pkl that lets struct overlay files override the generated Java type for a specific field without changing the typedef: // TYPE_OVERRIDE: fieldName=JavaType The BadgeCondition overlay now uses: // TYPE_OVERRIDE: badgeConditionOperator=BadgeComparisonOperator This causes the renderer to emit BadgeComparisonOperator as the field type (and the import is already contributed by the // IMPORT: directive). The overlay convenience methods pass the enum directly to the builder, and all callers (BadgeTest, CustomMetadataTest) continue to work unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Chris (He/Him) <cgrote@gmail.com>
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.
Summary
atlanhq/modelstypedefssdk:compileJavafailures that block the automated model sync_overlays/andJavaRenderer.pklso future syncs don't regressChanges
BadgeCondition overlay (
_overlays/structs/BadgeCondition.java)BadgeComparisonOperatorimport directive — the new generatedBadgeConditionstruct usesString badgeConditionOperator(typedef changed totype = "string"), so the generated file no longer imports the enum.badgeConditionOperator(operator)builder calls to.badgeConditionOperator(operator.getValue())to match theStringfield typeBadgeTest.java
BadgeCondition.builder()calls to pass.getValue()onBadgeComparisonOperatorenum argsJavaRenderer.pkl—getConcreteSuperTypeNamesfix (models repo)customAssetTypes/legacyAssetTypes, the function now checks whether it matches the current module's own supertypeDefinition"Process"to the ancestors ofColumnProcess/BIProcess/ConnectionProcess, so relationships likecatalog_process_inputs(endDef1.type = "Process") are matched andinputs/outputs/columnProcessesfields are generatedlogicalTableAndBaseTablewith endDef1.type = "SQL" incorrectly addingsnowflakeSemanticLogicalTablestoSnowflakeSemanticMetric)Test plan
./gradlew sdk:compileJava— BUILD SUCCESSFUL (0 errors, was ~23 errors)./gradlew sdk:test— 393 tests PASSED./gradlew spotlessApply— BUILD SUCCESSFUL🤖 Generated with Claude Code