Skip to content

BLDX-477 | Sync models and fix compilation failures#2307

Merged
cmgrote merged 3 commits intomainfrom
sync-models-20260310-130508
Mar 11, 2026
Merged

BLDX-477 | Sync models and fix compilation failures#2307
cmgrote merged 3 commits intomainfrom
sync-models-20260310-130508

Conversation

@cmgrote
Copy link
Collaborator

@cmgrote cmgrote commented Mar 11, 2026

Summary

  • Regenerates the Java SDK from updated atlanhq/models typedefs
  • Fixes all sdk:compileJava failures that block the automated model sync
  • Fixes upstream root causes in _overlays/ and JavaRenderer.pkl so future syncs don't regress

Changes

BadgeCondition overlay (_overlays/structs/BadgeCondition.java)

  • Added missing BadgeComparisonOperator import directive — the new generated BadgeCondition struct uses String badgeConditionOperator (typedef changed to type = "string"), so the generated file no longer imports the enum
  • Changed all 6 .badgeConditionOperator(operator) builder calls to .badgeConditionOperator(operator.getValue()) to match the String field type

BadgeTest.java

  • Updated 2 direct BadgeCondition.builder() calls to pass .getValue() on BadgeComparisonOperator enum args

JavaRenderer.pklgetConcreteSuperTypeNames fix (models repo)

  • When a type name is not found in customAssetTypes/legacyAssetTypes, the function now checks whether it matches the current module's own supertypeDefinition
  • If it matches, the name is included in the ancestor set and traversal stops (does not cascade into abstract hierarchy supertypeDefinitions like Catalog → SQL)
  • This correctly adds "Process" to the ancestors of ColumnProcess/BIProcess/ConnectionProcess, so relationships like catalog_process_inputs (endDef1.type = "Process") are matched and inputs/outputs/columnProcesses fields are generated
  • Stopping at the supertypeDefinition prevents spurious matches (e.g. logicalTableAndBaseTable with endDef1.type = "SQL" incorrectly adding snowflakeSemanticLogicalTables to SnowflakeSemanticMetric)

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

- 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>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@cmgrote cmgrote enabled auto-merge March 11, 2026 11:10
…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>
@cmgrote cmgrote merged commit 5b6850a into main Mar 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant