Skip to content

Switch out old APIs #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 70 commits into from
Jan 31, 2025
Merged

Switch out old APIs #259

merged 70 commits into from
Jan 31, 2025

Conversation

ken-zlai
Copy link
Contributor

@ken-zlai ken-zlai commented Jan 22, 2025

Summary

Ticket

This PR includes both frontend and backend updates. Since @nikhil-zlai and I reviewed the high-level changes today, it might be helpful for @sean-zlai and me to go over them during our sync tomorrow. There are some key points I'd like to highlight, but I wanted to get this up early for review.

Reminder: @sean-zlai will handle merging the new drift/summary functionality into the observability frontend.

Frontend Changes (@sean-zlai)

  • Added new endpoints for Conf, Confs, search, drift, summary, etc., currently called on the /thrift route for demonstration. The old endpoints can be removed once we wire in the new ones.
  • Created LogicalNodeTable.svelte to display all ConfTypes, including empty states.
  • Updated search functionality to work for all ConfTypes, though only risk.user_transactions.txn_join is enabled for now.

Backend Changes (@nikhil-zlai)

  • Implemented new endpoints using RouteHandlerWrapper.
  • Removed old endpoints (except /timeseries, which is still needed for charts).
  • Separated drift and summary into two distinct endpoints.
  • Introduced:
    • DriftHandler (handles drift and summaries).
    • ConfHandler (handles Conf, Confs, and Conf search).
  • Added filtering by column to DriftStore.
  • Improved and added various tests.
  • Developed a new serializer that integrates well with RouteHandlerWrapper.

Let me know if you have any questions!

Checklist

  • Added Unit Tests
  • Covered by existing CI
  • Integration tested
  • Documentation update

Summary by CodeRabbit

Release Notes

  • New Features

    • Added configuration management capabilities across joins, models, group bys, and staging queries.
    • Introduced drift analysis and summary tracking for configurations.
    • Enhanced API endpoints for retrieving and searching configurations.
    • New LogicalNodeTable component for displaying configuration data.
    • Added new structures and enumerations for handling configuration requests in the API.
  • Improvements

    • Refactored API response handling to use JSON serialization.
    • Improved null value handling in data processing with predefined constants.
    • Updated type definitions for better type safety.
    • Streamlined configuration retrieval and search mechanisms.
    • Enhanced handling of search results by categorizing entity types.
  • Bug Fixes

    • Resolved issues with null value representation in long and double iterators.
    • Improved error handling in API request processing.
  • Breaking Changes

    • Removed previous model and join metadata endpoints.
    • Updated API method signatures for configuration retrieval.
    • Eliminated deprecated response types related to joins and models.

Copy link

coderabbitai bot commented Jan 22, 2025

Walkthrough

This pull request introduces significant changes to configuration and drift handling across various components of the Chronon system. Key modifications include the addition of new configuration request and response structures, updates to API methods for configuration retrieval, and enhancements in null value handling through new constants. The refactoring aims to standardize the way configurations are managed and improve the robustness of the system.

Changes

File/Path Change Summary
api/src/main/scala/ai/chronon/api/Constants.scala Added magicNullLong, updated magicNullDouble
api/thrift/hub.thrift Added new enums and structs for configuration management
frontend/src/lib/api/api.ts Replaced model retrieval methods with configuration-based methods
hub/src/main/scala/ai/chronon/hub/handlers/ Introduced ConfHandler and DriftHandler, removed previous handlers
frontend/src/routes/ Added server-side load functions for joins, models, and staging queries

Possibly related PRs

Suggested Reviewers

  • nikhil-zlai
  • sean-zlai

Poem

In code we trust, with constants bright,
Magic numbers guide us, day and night.
Configs align, drift flows with ease,
Together we build, aiming to please! 🌟✨

Warning

Review ran into problems

🔥 Problems

GitHub Actions: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository.

Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 7b21828 and a18fb90.

📒 Files selected for processing (2)
  • frontend/src/lib/api/api.ts (3 hunks)
  • frontend/src/lib/types/Model/Model.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • frontend/src/lib/types/Model/Model.ts
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: enforce_triggered_workflows
🔇 Additional comments (5)
frontend/src/lib/api/api.ts (5)

2-14: LGTM!

Clean imports organization.


40-62: Add runtime type checking.

Type casting without validation could lead to runtime errors.


64-69: Add limit parameter back.

Removing limit parameter could impact performance with large result sets.


135-156: LGTM!

Clean implementation following DRY principles.


158-201: Add input validation.

Validate timestamp ranges before making API calls.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ken-zlai ken-zlai changed the title [WIP] - Switch out old APIs Switch out old APIs Jan 31, 2025
@@ -119,13 +119,15 @@ class TimeSeriesHandler(driftStore: DriftStore) {
// check if we have a numeric / categorical feature. If the percentile drift series has non-null doubles
// then we have a numeric feature at hand
val isNumeric =
tileDriftSeries.percentileDriftSeries.asScala != null && tileDriftSeries.percentileDriftSeries.asScala
.exists(_ != null)
Option(tileDriftSeries.percentileDriftSeries).exists(series => series.asScala.exists(_ != null))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ended up putting this back, I mistakenly thought this code broke something :/

The benefit of this is that it makes the code more safe and on the /thrift route you can easily compare the new/old apis.

@ken-zlai ken-zlai marked this pull request as ready for review January 31, 2025 02:57
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (23)
hub/src/main/scala/ai/chronon/hub/handlers/ConfHandler.scala (3)

20-39: Use a more specific exception.
RuntimeException is very broad. A custom exception or a well-defined error type would provide clearer error handling.


41-48: Avoid using structural asInstanceOf.
Reflection-based casts can be fragile. Consider a properly typed interface or a safer approach.


50-71: Same broad exception usage.
Consider a consistent, typed exception for unsupported types.

frontend/src/routes/joins/+page.server.ts (1)

10-10: Consider explicit type assertion for null safety.

The null coalescing is good, but consider using type assertion or type guard for better type safety.

-		items: response.joins || [],
+		items: (response.joins as typeof response.joins) ?? [],
frontend/src/routes/groupbys/+page.server.ts (1)

5-14: Extract common load function pattern.

Identical structure to models page. Create shared utility.

+// utils/loadConf.ts
+export const loadConf = async (fetch: typeof window.fetch, url: URL, type: ConfType, key: string, title: string) => {
+	try {
+		const api = new Api({ fetch });
+		const response = await api.getConfList(type);
+		if (!response) throw new Error(`Failed to fetch ${title}`);
+		return {
+			items: response[key] || [],
+			basePath: url.pathname,
+			title
+		};
+	} catch (error) {
+		console.error(`Failed to load ${title}:`, error);
+		throw error;
+	}
+};

// +page.server.ts
-export const load: PageServerLoad = async ({ fetch, url }) => {
-	const api = new Api({ fetch });
-	const response = await api.getConfList(ConfType.GROUP_BY);
-
-	return {
-		items: response.groupBys || [],
-		basePath: url.pathname,
-		title: 'Group Bys'
-	};
-};
+export const load: PageServerLoad = async ({ fetch, url }) => 
+	loadConf(fetch, url, ConfType.GROUP_BY, 'groupBys', 'Group Bys');
frontend/src/routes/joins/[slug]/observability/ModelTable.svelte (1)

14-17: Simplify ModelType check.

Current check is more verbose than needed.

 <MetadataTableRow
 	label="Model Type"
-	value={model.modelType === undefined ? undefined : ModelType[model.modelType]}
+	value={ModelType[model.modelType]}
 />

The array access will return undefined automatically if the index is undefined.

frontend/src/lib/types/Entity/Entity.ts (1)

45-46: Consider removing TODO comment.

The Asana link in the comment might be better tracked in the issue tracker.

api/src/test/scala/ai/chronon/api/test/TileSeriesSerializationTest.scala (1)

50-76: Add test case for Long.MinValue.

While the tests cover Long.MaxValue, also test Long.MinValue to ensure complete boundary testing.

-    val counts: Seq[JLong] = Seq(100L, null, Long.MaxValue, Constants.magicNullLong, 500L)
+    val counts: Seq[JLong] = Seq(100L, null, Long.MaxValue, Long.MinValue, Constants.magicNullLong, 500L)
api/thrift/hub.thrift (1)

126-133: Add input validation.

Consider adding constraints to ensure either branch or version is set, but not both.

hub/src/main/scala/ai/chronon/hub/handlers/DriftHandler.scala (2)

53-54: Enhance error messages with context.

Include request details in error messages for better debugging.

-logger.error("Failed to retrieve drift series", exception)
-throw new RuntimeException(s"Error getting drift - ${exception.getMessage}")
+logger.error(s"Failed to retrieve drift series for join: ${req.getName}, algorithm: ${req.getAlgorithm}", exception)
+throw new RuntimeException(s"Error getting drift for join ${req.getName} - ${exception.getMessage}")

63-66: Add logging for empty results.

Log when no drift series is found to aid debugging.

 def getColumnDrift(req: JoinDriftRequest): TileDriftSeries = {
   val driftSeries = getDriftSeriesWithWindow(req)
+  if (driftSeries.isEmpty) {
+    logger.debug(s"No drift series found for join: ${req.getName}, column: ${req.getColumnName}")
+  }
   driftSeries.headOption.getOrElse(new TileDriftSeries())
 }
api/thrift/observability.thrift (2)

148-148: Move format documentation to a dedicated comment block.

The offset format documentation should be more prominent.

-    6: optional string offset // Format: "24h" or "7d"
+    /**
+     * Offset duration in hours ("24h") or days ("7d").
+     * Examples:
+     * - "24h": 24 hours
+     * - "7d": 7 days
+     */
+    6: optional string offset

157-162: Use sequential field numbers.

Field numbers should be sequential for better maintainability.

 struct JoinSummaryRequest {
-    8: required string columnName
+    4: required string columnName
 }
hub/src/main/java/ai/chronon/hub/HubVerticle.java (1)

83-85: Simplify route organization using path prefixes.

Group related routes under a common prefix.

-router.get("/api/v1/join/:name/drift").handler(RouteHandlerWrapper.createHandler(driftHandler::getJoinDrift, JoinDriftRequest.class));
-router.get("/api/v1/join/:name/column/:columnName/drift").handler(RouteHandlerWrapper.createHandler(driftHandler::getColumnDrift, JoinDriftRequest.class));
-router.get("/api/v1/join/:name/column/:columnName/summary").handler(RouteHandlerWrapper.createHandler(driftHandler::getColumnSummary, JoinSummaryRequest.class));
+router.route("/api/v1/join/:name").path()
+  .get("/drift").handler(RouteHandlerWrapper.createHandler(driftHandler::getJoinDrift, JoinDriftRequest.class))
+  .get("/column/:columnName/drift").handler(RouteHandlerWrapper.createHandler(driftHandler::getColumnDrift, JoinDriftRequest.class))
+  .get("/column/:columnName/summary").handler(RouteHandlerWrapper.createHandler(driftHandler::getColumnSummary, JoinSummaryRequest.class));
online/src/main/scala/ai/chronon/online/stats/PivotUtils.scala (1)

98-98: Document magic number significance.

Add documentation explaining the significance of magicNullLong.

+          // Use magicNullLong (-1234567890L) to represent unset or invalid values
           Constants.magicNullLong
hub/src/test/scala/ai/chronon/hub/handlers/DriftHandlerTest.scala (7)

64-88: Add more assertions for drift series values.

Add assertions for percentileDriftSeries, histogramDriftSeries, and countChangePercentSeries values.


90-113: Add assertions for drift series values.

Add assertions for percentileDriftSeries, histogramDriftSeries, and countChangePercentSeries values.


115-124: Verify exception message.

Add a try-catch block to verify the exception message matches the expected error.


126-147: Add assertions for summary values.

Add assertions for percentiles and count values.


149-158: Verify exception message.

Add a try-catch block to verify the exception message matches the expected error.


160-183: Verify default algorithm.

Add assertion to verify the default algorithm used in the request.


185-207: Verify column name handling.

Add assertion to verify how null column name is handled in the response.

hub/src/test/scala/ai/chronon/hub/handlers/ConfHandlerTest.scala (1)

45-239: Add edge case tests.

Consider adding tests for:

  • Malformed configuration names
  • Special characters in names
  • Very long names
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 2658a80 and eb232f7.

📒 Files selected for processing (39)
  • api/src/main/scala/ai/chronon/api/Constants.scala (1 hunks)
  • api/src/test/scala/ai/chronon/api/test/TileSeriesSerializationTest.scala (2 hunks)
  • api/thrift/api.thrift (1 hunks)
  • api/thrift/hub.thrift (1 hunks)
  • api/thrift/observability.thrift (1 hunks)
  • frontend/src/lib/api/api.test.ts (3 hunks)
  • frontend/src/lib/api/api.ts (3 hunks)
  • frontend/src/lib/components/LogicalNodeTable.svelte (1 hunks)
  • frontend/src/lib/components/NavigationBar.svelte (3 hunks)
  • frontend/src/lib/types/Entity/Entity.ts (1 hunks)
  • frontend/src/routes/groupbys/+page.server.ts (1 hunks)
  • frontend/src/routes/groupbys/+page.svelte (1 hunks)
  • frontend/src/routes/joins/+page.server.ts (1 hunks)
  • frontend/src/routes/joins/+page.svelte (1 hunks)
  • frontend/src/routes/joins/[slug]/observability/ModelTable.svelte (1 hunks)
  • frontend/src/routes/joins/[slug]/services/joins.service.ts (2 hunks)
  • frontend/src/routes/models/+page.server.ts (1 hunks)
  • frontend/src/routes/models/+page.svelte (1 hunks)
  • frontend/src/routes/stagingqueries/+page.server.ts (1 hunks)
  • frontend/src/routes/stagingqueries/+page.svelte (1 hunks)
  • frontend/src/routes/thrift/+page.svelte (1 hunks)
  • hub/src/main/java/ai/chronon/hub/HubVerticle.java (3 hunks)
  • hub/src/main/scala/ai/chronon/hub/handlers/ConfHandler.scala (1 hunks)
  • hub/src/main/scala/ai/chronon/hub/handlers/DriftHandler.scala (1 hunks)
  • hub/src/main/scala/ai/chronon/hub/handlers/JoinsHandler.scala (0 hunks)
  • hub/src/main/scala/ai/chronon/hub/handlers/ModelsHandler.scala (0 hunks)
  • hub/src/main/scala/ai/chronon/hub/handlers/Paginate.scala (0 hunks)
  • hub/src/main/scala/ai/chronon/hub/handlers/SearchHandler.scala (0 hunks)
  • hub/src/main/scala/ai/chronon/hub/handlers/TimeSeriesHandler.scala (1 hunks)
  • hub/src/main/scala/ai/chronon/hub/model/Model.scala (0 hunks)
  • hub/src/test/scala/ai/chronon/hub/handlers/ConfHandlerTest.scala (1 hunks)
  • hub/src/test/scala/ai/chronon/hub/handlers/DriftHandlerTest.scala (1 hunks)
  • hub/src/test/scala/ai/chronon/hub/handlers/JoinHandlerTest.scala (0 hunks)
  • hub/src/test/scala/ai/chronon/hub/handlers/ModelHandlerTest.scala (0 hunks)
  • hub/src/test/scala/ai/chronon/hub/handlers/SearchHandlerTest.scala (0 hunks)
  • online/src/main/scala/ai/chronon/online/stats/DriftStore.scala (1 hunks)
  • online/src/main/scala/ai/chronon/online/stats/PivotUtils.scala (1 hunks)
  • online/src/test/scala/ai/chronon/online/test/stats/PivotUtilsTest.scala (2 hunks)
  • service_commons/src/main/java/ai/chronon/service/RouteHandlerWrapper.java (2 hunks)
💤 Files with no reviewable changes (8)
  • hub/src/test/scala/ai/chronon/hub/handlers/SearchHandlerTest.scala
  • hub/src/main/scala/ai/chronon/hub/handlers/Paginate.scala
  • hub/src/test/scala/ai/chronon/hub/handlers/ModelHandlerTest.scala
  • hub/src/main/scala/ai/chronon/hub/handlers/ModelsHandler.scala
  • hub/src/main/scala/ai/chronon/hub/model/Model.scala
  • hub/src/test/scala/ai/chronon/hub/handlers/JoinHandlerTest.scala
  • hub/src/main/scala/ai/chronon/hub/handlers/JoinsHandler.scala
  • hub/src/main/scala/ai/chronon/hub/handlers/SearchHandler.scala
✅ Files skipped from review due to trivial changes (1)
  • api/thrift/api.thrift
👮 Files not reviewed due to content moderation or server errors (3)
  • online/src/test/scala/ai/chronon/online/test/stats/PivotUtilsTest.scala
  • service_commons/src/main/java/ai/chronon/service/RouteHandlerWrapper.java
  • hub/src/main/scala/ai/chronon/hub/handlers/TimeSeriesHandler.scala
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: scala_compile_fmt_fix
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: enforce_triggered_workflows
🔇 Additional comments (55)
frontend/src/routes/joins/+page.svelte (3)

2-3: Imports look correct.


8-12: Sorting approach is concise.


15-15: Component usage looks good.

hub/src/main/scala/ai/chronon/hub/handlers/ConfHandler.scala (1)

73-109: Search logic is fine.

frontend/src/lib/api/api.ts (16)

5-5: Imports are aligned.


7-7: Type imports are correct.


8-16: Additional type coverage looks neat.


17-17: Useful enumerations.


18-18: Importing ConfListResponse is appropriate.


52-58: Clean getConf implementation.


59-75: New getters look consistent.


76-80: Replacing search logic with ConfListResponse is valid.


147-152: getConfList is well-structured.


153-156: getJoinList method is clear.


158-160: getGroupByList is consistent.


162-164: getModelList usage aligns with the API.


166-168: getStagingQueryList is coherent.


170-184: getJoinDrift approach is fine.


186-203: getColumnDrift method is consistent.


205-213: getColumnSummary logic looks correct.

frontend/src/routes/models/+page.svelte (1)

1-7: LGTM!

Clean and consistent with other route components.

frontend/src/routes/groupbys/+page.svelte (1)

1-7: LGTM!

Follows the same clean pattern as models page.

frontend/src/routes/stagingqueries/+page.svelte (1)

1-7: LGTM!

Maintains consistent pattern across route components.

frontend/src/routes/stagingqueries/+page.server.ts (1)

5-14: Use shared load function utility.

Same pattern as models and groupbys pages.

frontend/src/lib/api/api.test.ts (2)

Line range hint 33-39: Test updated correctly for new endpoint.

Test properly verifies the new /api/v1/conf/list?confType=MODEL endpoint.


50-50: Empty response and error handling tests updated.

Tests properly cover edge cases with the new API method.

Also applies to: 61-61

frontend/src/lib/types/Entity/Entity.ts (1)

7-12: Good use of const assertion for EntityTypes.

Using as const ensures type safety for entity type literals.

frontend/src/routes/joins/[slug]/services/joins.service.ts (1)

44-46: Consider adding null check for models.

The optional chaining is good, but consider handling the case where models is undefined.

-	const modelToReturn = models.models?.find(
+	const modelToReturn = models.models?.find(
		(m) => m.source?.joinSource?.join?.metaData?.name === joinName
-	);
+	) ?? null;
api/src/test/scala/ai/chronon/api/test/TileSeriesSerializationTest.scala (1)

33-47: LGTM! Comprehensive test coverage.

The test cases thoroughly verify serialization handling of null values and special cases.

api/src/main/scala/ai/chronon/api/Constants.scala (1)

80-82: LGTM! Well-documented constants.

The magic numbers are within safe ranges for cross-language compatibility.

api/thrift/hub.thrift (2)

119-124: LGTM! Clear enum definition.

The ConfType enum values are well-organized.


138-153: LGTM! Well-structured and documented.

The request/response structures are clear and maintainable.

hub/src/main/scala/ai/chronon/hub/handlers/DriftHandler.scala (1)

49-50: 🛠️ Refactor suggestion

Consider replacing blocking Await with async operations.

The use of Await.result blocks threads, which can impact Vert.x's performance.

Consider modifying RouteHandlerWrapper to accept Future results directly:

-val result = Await.result(driftSeriesFuture, 30.seconds)
+// After modifying RouteHandlerWrapper to support Future
+driftSeriesFuture

Likely invalid or redundant comment.

frontend/src/lib/components/NavigationBar.svelte (2)

25-30: LGTM!

The imports are well-structured and properly used.


60-69: LGTM!

The search results handling is robust and type-safe.

online/src/main/scala/ai/chronon/online/stats/DriftStore.scala (1)

87-94: LGTM!

The filtering logic is correctly placed and efficiently implemented.

hub/src/test/scala/ai/chronon/hub/handlers/ConfHandlerTest.scala (1)

26-43: LGTM!

The test setup is well-structured with proper mocking.

online/src/test/scala/ai/chronon/online/test/stats/PivotUtilsTest.scala (9)

317-334: LGTM!

Test case verifies edge cases for Long values.


336-350: LGTM!

Test case verifies handling of all null values.


352-373: LGTM!

Test case verifies handling of mixed null and non-null values.


317-334: LGTM!

Test case thoroughly verifies edge cases for Long values.


336-350: LGTM!

Test case verifies consistent handling of null values.


352-373: LGTM!

Test case verifies correct handling of mixed null and non-null values.


317-334: LGTM!

Test case verifies edge cases for Long values.


336-350: LGTM!

Test case verifies handling of all null values.


352-373: LGTM!

Test case verifies handling of mixed null and non-null values.

service_commons/src/main/java/ai/chronon/service/RouteHandlerWrapper.java (3)

90-103: LGTM!

JSON serialization with proper error handling.


90-103: LGTM!

Clean implementation of JSON serialization with proper error handling.


90-103: LGTM!

JSON serialization with proper error handling.

hub/src/main/scala/ai/chronon/hub/handlers/TimeSeriesHandler.scala (6)

122-122: LGTM!

Null-safe check using Option and exists.


125-130: LGTM!

Null-safe handling of series values with proper fallbacks.


122-122: LGTM!

Improved null handling using Option and exists.


125-130: LGTM!

Robust null handling with Option and map.


122-122: LGTM!

Null-safe check using Option and exists.


125-130: LGTM!

Null-safe metric list handling with proper defaults.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (5)
frontend/src/lib/server/conf-loader.ts (2)

14-24: Add return type annotation.

Add explicit return type for better type safety.

-export async function loadConfList({ fetch, url }: Pick<RequestEvent, 'fetch' | 'url'>) {
+export async function loadConfList({ fetch, url }: Pick<RequestEvent, 'fetch' | 'url'>): Promise<{ items: unknown[]; basePath: string; title: string }> {

26-43: Enhance error message specificity.

Include the entity type in the error message for better debugging.

-		if (!response) throw new Error(`Failed to fetch ${entityMatch.label.toLowerCase()}`);
+		if (!response) throw new Error(`Failed to fetch ${entityMatch.label.toLowerCase()} of type ${entityMatch.type}`);
frontend/src/lib/types/Entity/Entity.ts (3)

13-18: Consider using enum for EntityTypes.

Using an enum would provide better type safety and autocompletion.

-export const EntityTypes = {
-	MODELS: 'models',
-	JOINS: 'joins',
-	GROUPBYS: 'groupbys',
-	STAGINGQUERIES: 'stagingqueries'
-} as const;
+export enum EntityTypes {
+	MODELS = 'models',
+	JOINS = 'joins',
+	GROUPBYS = 'groupbys',
+	STAGINGQUERIES = 'stagingqueries'
+}

22-51: Consider deriving paths from IDs.

Paths could be derived from IDs to avoid duplication.

 {
 		label: 'Models',
-		path: '/models',
+		path: `/${EntityTypes.MODELS}`,
 		icon: IconCube,
 		id: EntityTypes.MODELS,
 		type: ConfType.MODEL
 	},

Line range hint 58-64: Enhance error message.

Include available entity IDs in error message.

-	if (!entity) throw new Error(`Entity with id "${id}" not found`);
+	if (!entity) throw new Error(`Entity with id "${id}" not found. Available IDs: ${Object.values(EntityTypes).join(', ')}`);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between eb232f7 and 7b21828.

📒 Files selected for processing (7)
  • frontend/src/lib/api/api.ts (3 hunks)
  • frontend/src/lib/server/conf-loader.ts (1 hunks)
  • frontend/src/lib/types/Entity/Entity.ts (1 hunks)
  • frontend/src/routes/groupbys/+page.server.ts (1 hunks)
  • frontend/src/routes/joins/+page.server.ts (1 hunks)
  • frontend/src/routes/models/+page.server.ts (1 hunks)
  • frontend/src/routes/stagingqueries/+page.server.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • frontend/src/routes/models/+page.server.ts
  • frontend/src/routes/stagingqueries/+page.server.ts
  • frontend/src/routes/groupbys/+page.server.ts
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: no_spark_scala_tests
  • GitHub Check: scala_compile_fmt_fix
🔇 Additional comments (3)
frontend/src/lib/server/conf-loader.ts (1)

1-12: LGTM!

Clean imports and well-structured type mapping.

frontend/src/routes/joins/+page.server.ts (1)

1-4: LGTM!

Clean implementation using the new loadConfList pattern.

frontend/src/lib/api/api.ts (1)

Line range hint 207-255: Address TODO comment about empty response handling.

The TODO comment indicates uncertainty about handling empty responses.

Would you like me to propose a solution for handling empty responses or create an issue to track this?

Copy link
Contributor

@sean-zlai sean-zlai left a comment

Choose a reason for hiding this comment

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

Reviewed during our 1:1 and looks great. I'll migrate the charts and other remaining tasks as tracked in Asana issue

Copy link
Contributor

@nikhil-zlai nikhil-zlai left a comment

Choose a reason for hiding this comment

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

lgtm!

we can also forward fix and merge + unblock sean while you are away.

@ken-zlai ken-zlai merged commit 9a3ab66 into main Jan 31, 2025
7 checks passed
@ken-zlai ken-zlai deleted the ken/thrift-observability-apis branch January 31, 2025 21:23
nikhil-zlai pushed a commit that referenced this pull request Feb 4, 2025
[Ticket](https://app.asana.com/0/0/1209184028451140)

This PR includes both frontend and backend updates. Since @nikhil-zlai
and I reviewed the high-level changes today, it might be helpful for
@sean-zlai and me to go over them during our sync tomorrow. There are
some key points I'd like to highlight, but I wanted to get this up early
for review.

**Reminder:** @sean-zlai will handle merging the new drift/summary
functionality into the observability frontend.

- Added new endpoints for Conf, Confs, search, drift, summary, etc.,
currently called on the `/thrift` route for demonstration. The old
endpoints can be removed once we wire in the new ones.
- Created `LogicalNodeTable.svelte` to display all `ConfTypes`,
including empty states.
- Updated search functionality to work for all `ConfTypes`, though only
`risk.user_transactions.txn_join` is enabled for now.

- Implemented new endpoints using `RouteHandlerWrapper`.
- Removed old endpoints (except `/timeseries`, which is still needed for
charts).
- Separated drift and summary into two distinct endpoints.
- Introduced:
  - `DriftHandler` (handles drift and summaries).
  - `ConfHandler` (handles Conf, Confs, and Conf search).
- Added filtering by column to `DriftStore`.
- Improved and added various tests.
- Developed a new serializer that integrates well with
`RouteHandlerWrapper`.

Let me know if you have any questions!

- [x] Added Unit Tests
- [x] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- **New Features**
- Added configuration management capabilities across joins, models,
group bys, and staging queries.
	- Introduced drift analysis and summary tracking for configurations.
	- Enhanced API endpoints for retrieving and searching configurations.
	- New `LogicalNodeTable` component for displaying configuration data.
- Added new structures and enumerations for handling configuration
requests in the API.

- **Improvements**
	- Refactored API response handling to use JSON serialization.
- Improved null value handling in data processing with predefined
constants.
	- Updated type definitions for better type safety.
	- Streamlined configuration retrieval and search mechanisms.
	- Enhanced handling of search results by categorizing entity types.

- **Bug Fixes**
- Resolved issues with null value representation in long and double
iterators.
	- Improved error handling in API request processing.

- **Breaking Changes**
	- Removed previous model and join metadata endpoints.
	- Updated API method signatures for configuration retrieval.
	- Eliminated deprecated response types related to joins and models.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
nikhil-zlai pushed a commit that referenced this pull request Feb 4, 2025
[Ticket](https://app.asana.com/0/0/1209184028451140)

This PR includes both frontend and backend updates. Since @nikhil-zlai
and I reviewed the high-level changes today, it might be helpful for
@sean-zlai and me to go over them during our sync tomorrow. There are
some key points I'd like to highlight, but I wanted to get this up early
for review.

**Reminder:** @sean-zlai will handle merging the new drift/summary
functionality into the observability frontend.

- Added new endpoints for Conf, Confs, search, drift, summary, etc.,
currently called on the `/thrift` route for demonstration. The old
endpoints can be removed once we wire in the new ones.
- Created `LogicalNodeTable.svelte` to display all `ConfTypes`,
including empty states.
- Updated search functionality to work for all `ConfTypes`, though only
`risk.user_transactions.txn_join` is enabled for now.

- Implemented new endpoints using `RouteHandlerWrapper`.
- Removed old endpoints (except `/timeseries`, which is still needed for
charts).
- Separated drift and summary into two distinct endpoints.
- Introduced:
  - `DriftHandler` (handles drift and summaries).
  - `ConfHandler` (handles Conf, Confs, and Conf search).
- Added filtering by column to `DriftStore`.
- Improved and added various tests.
- Developed a new serializer that integrates well with
`RouteHandlerWrapper`.

Let me know if you have any questions!

- [x] Added Unit Tests
- [x] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- **New Features**
- Added configuration management capabilities across joins, models,
group bys, and staging queries.
	- Introduced drift analysis and summary tracking for configurations.
	- Enhanced API endpoints for retrieving and searching configurations.
	- New `LogicalNodeTable` component for displaying configuration data.
- Added new structures and enumerations for handling configuration
requests in the API.

- **Improvements**
	- Refactored API response handling to use JSON serialization.
- Improved null value handling in data processing with predefined
constants.
	- Updated type definitions for better type safety.
	- Streamlined configuration retrieval and search mechanisms.
	- Enhanced handling of search results by categorizing entity types.

- **Bug Fixes**
- Resolved issues with null value representation in long and double
iterators.
	- Improved error handling in API request processing.

- **Breaking Changes**
	- Removed previous model and join metadata endpoints.
	- Updated API method signatures for configuration retrieval.
	- Eliminated deprecated response types related to joins and models.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
nikhil-zlai pushed a commit that referenced this pull request Feb 4, 2025
[Ticket](https://app.asana.com/0/0/1209184028451140)

This PR includes both frontend and backend updates. Since @nikhil-zlai
and I reviewed the high-level changes today, it might be helpful for
@sean-zlai and me to go over them during our sync tomorrow. There are
some key points I'd like to highlight, but I wanted to get this up early
for review.

**Reminder:** @sean-zlai will handle merging the new drift/summary
functionality into the observability frontend.

- Added new endpoints for Conf, Confs, search, drift, summary, etc.,
currently called on the `/thrift` route for demonstration. The old
endpoints can be removed once we wire in the new ones.
- Created `LogicalNodeTable.svelte` to display all `ConfTypes`,
including empty states.
- Updated search functionality to work for all `ConfTypes`, though only
`risk.user_transactions.txn_join` is enabled for now.

- Implemented new endpoints using `RouteHandlerWrapper`.
- Removed old endpoints (except `/timeseries`, which is still needed for
charts).
- Separated drift and summary into two distinct endpoints.
- Introduced:
  - `DriftHandler` (handles drift and summaries).
  - `ConfHandler` (handles Conf, Confs, and Conf search).
- Added filtering by column to `DriftStore`.
- Improved and added various tests.
- Developed a new serializer that integrates well with
`RouteHandlerWrapper`.

Let me know if you have any questions!

- [x] Added Unit Tests
- [x] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- **New Features**
- Added configuration management capabilities across joins, models,
group bys, and staging queries.
	- Introduced drift analysis and summary tracking for configurations.
	- Enhanced API endpoints for retrieving and searching configurations.
	- New `LogicalNodeTable` component for displaying configuration data.
- Added new structures and enumerations for handling configuration
requests in the API.

- **Improvements**
	- Refactored API response handling to use JSON serialization.
- Improved null value handling in data processing with predefined
constants.
	- Updated type definitions for better type safety.
	- Streamlined configuration retrieval and search mechanisms.
	- Enhanced handling of search results by categorizing entity types.

- **Bug Fixes**
- Resolved issues with null value representation in long and double
iterators.
	- Improved error handling in API request processing.

- **Breaking Changes**
	- Removed previous model and join metadata endpoints.
	- Updated API method signatures for configuration retrieval.
	- Eliminated deprecated response types related to joins and models.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
nikhil-zlai pushed a commit that referenced this pull request Feb 4, 2025
[Ticket](https://app.asana.com/0/0/1209184028451140)

This PR includes both frontend and backend updates. Since @nikhil-zlai
and I reviewed the high-level changes today, it might be helpful for
@sean-zlai and me to go over them during our sync tomorrow. There are
some key points I'd like to highlight, but I wanted to get this up early
for review.

**Reminder:** @sean-zlai will handle merging the new drift/summary
functionality into the observability frontend.

- Added new endpoints for Conf, Confs, search, drift, summary, etc.,
currently called on the `/thrift` route for demonstration. The old
endpoints can be removed once we wire in the new ones.
- Created `LogicalNodeTable.svelte` to display all `ConfTypes`,
including empty states.
- Updated search functionality to work for all `ConfTypes`, though only
`risk.user_transactions.txn_join` is enabled for now.

- Implemented new endpoints using `RouteHandlerWrapper`.
- Removed old endpoints (except `/timeseries`, which is still needed for
charts).
- Separated drift and summary into two distinct endpoints.
- Introduced:
  - `DriftHandler` (handles drift and summaries).
  - `ConfHandler` (handles Conf, Confs, and Conf search).
- Added filtering by column to `DriftStore`.
- Improved and added various tests.
- Developed a new serializer that integrates well with
`RouteHandlerWrapper`.

Let me know if you have any questions!

- [x] Added Unit Tests
- [x] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- **New Features**
- Added configuration management capabilities across joins, models,
group bys, and staging queries.
	- Introduced drift analysis and summary tracking for configurations.
	- Enhanced API endpoints for retrieving and searching configurations.
	- New `LogicalNodeTable` component for displaying configuration data.
- Added new structures and enumerations for handling configuration
requests in the API.

- **Improvements**
	- Refactored API response handling to use JSON serialization.
- Improved null value handling in data processing with predefined
constants.
	- Updated type definitions for better type safety.
	- Streamlined configuration retrieval and search mechanisms.
	- Enhanced handling of search results by categorizing entity types.

- **Bug Fixes**
- Resolved issues with null value representation in long and double
iterators.
	- Improved error handling in API request processing.

- **Breaking Changes**
	- Removed previous model and join metadata endpoints.
	- Updated API method signatures for configuration retrieval.
	- Eliminated deprecated response types related to joins and models.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@coderabbitai coderabbitai bot mentioned this pull request Feb 7, 2025
4 tasks
This was referenced Feb 17, 2025
kumar-zlai pushed a commit that referenced this pull request Apr 25, 2025
## Summary
[Ticket](https://app.asana.com/0/0/1209184028451140)

This PR includes both frontend and backend updates. Since @nikhil-zlai
and I reviewed the high-level changes today, it might be helpful for
@sean-zlai and me to go over them during our sync tomorrow. There are
some key points I'd like to highlight, but I wanted to get this up early
for review.

**Reminder:** @sean-zlai will handle merging the new drift/summary
functionality into the observability frontend.

### **Frontend Changes (@sean-zlai)**  
- Added new endpoints for Conf, Confs, search, drift, summary, etc.,
currently called on the `/thrift` route for demonstration. The old
endpoints can be removed once we wire in the new ones.
- Created `LogicalNodeTable.svelte` to display all `ConfTypes`,
including empty states.
- Updated search functionality to work for all `ConfTypes`, though only
`risk.user_transactions.txn_join` is enabled for now.

### **Backend Changes (@nikhil-zlai)**  
- Implemented new endpoints using `RouteHandlerWrapper`.  
- Removed old endpoints (except `/timeseries`, which is still needed for
charts).
- Separated drift and summary into two distinct endpoints.  
- Introduced:  
  - `DriftHandler` (handles drift and summaries).  
  - `ConfHandler` (handles Conf, Confs, and Conf search).  
- Added filtering by column to `DriftStore`.  
- Improved and added various tests.  
- Developed a new serializer that integrates well with
`RouteHandlerWrapper`.

Let me know if you have any questions!

## Checklist
- [x] Added Unit Tests
- [x] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Added configuration management capabilities across joins, models,
group bys, and staging queries.
	- Introduced drift analysis and summary tracking for configurations.
	- Enhanced API endpoints for retrieving and searching configurations.
	- New `LogicalNodeTable` component for displaying configuration data.
- Added new structures and enumerations for handling configuration
requests in the API.

- **Improvements**
	- Refactored API response handling to use JSON serialization.
- Improved null value handling in data processing with predefined
constants.
	- Updated type definitions for better type safety.
	- Streamlined configuration retrieval and search mechanisms.
	- Enhanced handling of search results by categorizing entity types.

- **Bug Fixes**
- Resolved issues with null value representation in long and double
iterators.
	- Improved error handling in API request processing.

- **Breaking Changes**
	- Removed previous model and join metadata endpoints.
	- Updated API method signatures for configuration retrieval.
	- Eliminated deprecated response types related to joins and models.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
kumar-zlai pushed a commit that referenced this pull request Apr 29, 2025
## Summary
[Ticket](https://app.asana.com/0/0/1209184028451140)

This PR includes both frontend and backend updates. Since @nikhil-zlai
and I reviewed the high-level changes today, it might be helpful for
@sean-zlai and me to go over them during our sync tomorrow. There are
some key points I'd like to highlight, but I wanted to get this up early
for review.

**Reminder:** @sean-zlai will handle merging the new drift/summary
functionality into the observability frontend.

### **Frontend Changes (@sean-zlai)**  
- Added new endpoints for Conf, Confs, search, drift, summary, etc.,
currently called on the `/thrift` route for demonstration. The old
endpoints can be removed once we wire in the new ones.
- Created `LogicalNodeTable.svelte` to display all `ConfTypes`,
including empty states.
- Updated search functionality to work for all `ConfTypes`, though only
`risk.user_transactions.txn_join` is enabled for now.

### **Backend Changes (@nikhil-zlai)**  
- Implemented new endpoints using `RouteHandlerWrapper`.  
- Removed old endpoints (except `/timeseries`, which is still needed for
charts).
- Separated drift and summary into two distinct endpoints.  
- Introduced:  
  - `DriftHandler` (handles drift and summaries).  
  - `ConfHandler` (handles Conf, Confs, and Conf search).  
- Added filtering by column to `DriftStore`.  
- Improved and added various tests.  
- Developed a new serializer that integrates well with
`RouteHandlerWrapper`.

Let me know if you have any questions!

## Checklist
- [x] Added Unit Tests
- [x] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Added configuration management capabilities across joins, models,
group bys, and staging queries.
	- Introduced drift analysis and summary tracking for configurations.
	- Enhanced API endpoints for retrieving and searching configurations.
	- New `LogicalNodeTable` component for displaying configuration data.
- Added new structures and enumerations for handling configuration
requests in the API.

- **Improvements**
	- Refactored API response handling to use JSON serialization.
- Improved null value handling in data processing with predefined
constants.
	- Updated type definitions for better type safety.
	- Streamlined configuration retrieval and search mechanisms.
	- Enhanced handling of search results by categorizing entity types.

- **Bug Fixes**
- Resolved issues with null value representation in long and double
iterators.
	- Improved error handling in API request processing.

- **Breaking Changes**
	- Removed previous model and join metadata endpoints.
	- Updated API method signatures for configuration retrieval.
	- Eliminated deprecated response types related to joins and models.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary
[Ticket](https://app.asana.com/0/0/1209184028451140)

This PR includes both frontend and backend updates. Since @nikhil-zlai
and I reviewed the high-level changes today, it might be helpful for
@sean-zlai and me to go over them during our sync tomorrow. There are
some key points I'd like to highlight, but I wanted to get this up early
for review.

**Reminder:** @sean-zlai will handle merging the new drift/summary
functionality into the observability frontend.

### **Frontend Changes (@sean-zlai)**  
- Added new endpoints for Conf, Confs, search, drift, summary, etc.,
currently called on the `/thrift` route for demonstration. The old
endpoints can be removed once we wire in the new ones.
- Created `LogicalNodeTable.svelte` to display all `ConfTypes`,
including empty states.
- Updated search functionality to work for all `ConfTypes`, though only
`risk.user_transactions.txn_join` is enabled for now.

### **Backend Changes (@nikhil-zlai)**  
- Implemented new endpoints using `RouteHandlerWrapper`.  
- Removed old endpoints (except `/timeseries`, which is still needed for
charts).
- Separated drift and summary into two distinct endpoints.  
- Introduced:  
  - `DriftHandler` (handles drift and summaries).  
  - `ConfHandler` (handles Conf, Confs, and Conf search).  
- Added filtering by column to `DriftStore`.  
- Improved and added various tests.  
- Developed a new serializer that integrates well with
`RouteHandlerWrapper`.

Let me know if you have any questions!

## Checklist
- [x] Added Unit Tests
- [x] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Added configuration management capabilities across joins, models,
group bys, and staging queries.
	- Introduced drift analysis and summary tracking for configurations.
	- Enhanced API endpoints for retrieving and searching configurations.
	- New `LogicalNodeTable` component for displaying configuration data.
- Added new structures and enumerations for handling configuration
requests in the API.

- **Improvements**
	- Refactored API response handling to use JSON serialization.
- Improved null value handling in data processing with predefined
constants.
	- Updated type definitions for better type safety.
	- Streamlined configuration retrieval and search mechanisms.
	- Enhanced handling of search results by categorizing entity types.

- **Bug Fixes**
- Resolved issues with null value representation in long and double
iterators.
	- Improved error handling in API request processing.

- **Breaking Changes**
	- Removed previous model and join metadata endpoints.
	- Updated API method signatures for configuration retrieval.
	- Eliminated deprecated response types related to joins and models.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary
[Ticket](https://app.asana.com/0/0/1209184028451140)

This PR includes both frontend and backend updates. Since @nikhil-zlai
and I reviewed the high-level changes today, it might be helpful for
@sean-zlai and me to go over them during our sync tomorrow. There are
some key points I'd like to highlight, but I wanted to get this up early
for review.

**Reminder:** @sean-zlai will handle merging the new drift/summary
functionality into the observability frontend.

### **Frontend Changes (@sean-zlai)**  
- Added new endpoints for Conf, Confs, search, drift, summary, etc.,
currently called on the `/thrift` route for demonstration. The old
endpoints can be removed once we wire in the new ones.
- Created `LogicalNodeTable.svelte` to display all `ConfTypes`,
including empty states.
- Updated search functionality to work for all `ConfTypes`, though only
`risk.user_transactions.txn_join` is enabled for now.

### **Backend Changes (@nikhil-zlai)**  
- Implemented new endpoints using `RouteHandlerWrapper`.  
- Removed old endpoints (except `/timeseries`, which is still needed for
charts).
- Separated drift and summary into two distinct endpoints.  
- Introduced:  
  - `DriftHandler` (handles drift and summaries).  
  - `ConfHandler` (handles Conf, Confs, and Conf search).  
- Added filtering by column to `DriftStore`.  
- Improved and added various tests.  
- Developed a new serializer that integrates well with
`RouteHandlerWrapper`.

Let me know if you have any questions!

## Checklist
- [x] Added Unit Tests
- [x] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Added configuration management capabilities across joins, models,
group bys, and staging queries.
	- Introduced drift analysis and summary tracking for configurations.
	- Enhanced API endpoints for retrieving and searching configurations.
	- New `LogicalNodeTable` component for displaying configuration data.
- Added new structures and enumerations for handling configuration
requests in the API.

- **Improvements**
	- Refactored API response handling to use JSON serialization.
- Improved null value handling in data processing with predefined
constants.
	- Updated type definitions for better type safety.
	- Streamlined configuration retrieval and search mechanisms.
	- Enhanced handling of search results by categorizing entity types.

- **Bug Fixes**
- Resolved issues with null value representation in long and double
iterators.
	- Improved error handling in API request processing.

- **Breaking Changes**
	- Removed previous model and join metadata endpoints.
	- Updated API method signatures for configuration retrieval.
	- Eliminated deprecated response types related to joins and models.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
chewy-zlai pushed a commit that referenced this pull request May 16, 2025
## Summary
[Tiour clientset](https://app.asana.com/0/0/1209184028451140)

This PR includes both frontend and baour clientsend updates. Since @nikhil-zlai
and I reviewed the high-level changes today, it might be helpful for
@sean-zlai and me to go over them during our sync tomorrow. There are
some key points I'd like to highlight, but I wanted to get this up early
for review.

**Reminder:** @sean-zlai will handle merging the new drift/summary
functionality into the observability frontend.

### **Frontend Changes (@sean-zlai)**  
- Added new endpoints for Conf, Confs, search, drift, summary, etc.,
currently called on the `/thrift` route for demonstration. The old
endpoints can be removed once we wire in the new ones.
- Created `LogicalNodeTable.svelte` to display all `ConfTypes`,
including empty states.
- Updated search functionality to work for all `ConfTypes`, though only
`risk.user_transactions.txn_join` is enabled for now.

### **Baour clientsend Changes (@nikhil-zlai)**  
- Implemented new endpoints using `RouteHandlerWrapper`.  
- Removed old endpoints (except `/timeseries`, which is still needed for
charts).
- Separated drift and summary into two distinct endpoints.  
- Introduced:  
  - `DriftHandler` (handles drift and summaries).  
  - `ConfHandler` (handles Conf, Confs, and Conf search).  
- Added filtering by column to `DriftStore`.  
- Improved and added various tests.  
- Developed a new serializer that integrates well with
`RouteHandlerWrapper`.

Let me know if you have any questions!

## Cheour clientslist
- [x] Added Unit Tests
- [x] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

- **New Features**
- Added configuration management capabilities across joins, models,
group bys, and staging queries.
	- Introduced drift analysis and summary traour clientsing for configurations.
	- Enhanced API endpoints for retrieving and searching configurations.
	- New `LogicalNodeTable` component for displaying configuration data.
- Added new structures and enumerations for handling configuration
requests in the API.

- **Improvements**
	- Refactored API response handling to use JSON serialization.
- Improved null value handling in data processing with predefined
constants.
	- Updated type definitions for better type safety.
	- Streamlined configuration retrieval and search mechanisms.
	- Enhanced handling of search results by categorizing entity types.

- **Bug Fixes**
- Resolved issues with null value representation in long and double
iterators.
	- Improved error handling in API request processing.

- **Breaking Changes**
	- Removed previous model and join metadata endpoints.
	- Updated API method signatures for configuration retrieval.
	- Eliminated deprecated response types related to joins and models.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

3 participants