Skip to content

apollo_deployments: test hybrid layout for infra config#14483

Open
nimrod-starkware wants to merge 1 commit into
nimrod/jsonnet/hybrid-layoutfrom
nimrod/jsonnet/hybrid-layout-test
Open

apollo_deployments: test hybrid layout for infra config#14483
nimrod-starkware wants to merge 1 commit into
nimrod/jsonnet/hybrid-layoutfrom
nimrod/jsonnet/hybrid-layout-test

Conversation

@nimrod-starkware

Copy link
Copy Markdown
Contributor

Add the jrsonnet evaluator (workspace + dev-deps) and a test-only jsonnet
harness that evaluates services/.jsonnet and asserts each service's
derived components matches the Rust get_component_configs source of truth
(url/port excluded — those are deploy-time placeholders on the Rust side).

Also fixes derive.infraFor to delegate to a file-level helper instead of
self.componentsFor (self rebinds to the returned object literal).

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

nimrod-starkware commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/hybrid-layout branch from cc0e5ba to f212186 Compare June 14, 2026 11:55
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/hybrid-layout-test branch 2 times, most recently from 9e33bc8 to 51dc079 Compare June 14, 2026 12:32
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/hybrid-layout branch from f212186 to 45ce5db Compare June 14, 2026 14:38
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/hybrid-layout-test branch from 51dc079 to 9479d78 Compare June 14, 2026 14:38
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/hybrid-layout-test branch from 9479d78 to b8a1475 Compare June 15, 2026 05:48
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/hybrid-layout branch 2 times, most recently from 7db1709 to a6d94f8 Compare June 15, 2026 07:25
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/hybrid-layout-test branch from b8a1475 to 4e09c73 Compare June 15, 2026 07:25
@nimrod-starkware nimrod-starkware self-assigned this Jun 16, 2026
@nimrod-starkware nimrod-starkware marked this pull request as ready for review June 16, 2026 12:09
@cursor

cursor Bot commented Jun 16, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are confined to test code and dev-dependencies; production deployment generation paths are untouched.

Overview
Adds jrsonnet (jrsonnet-evaluator, jrsonnet-stdlib) as workspace dependencies and dev-dependencies on apollo_deployments, with a large Cargo.lock refresh from that tree.

Introduces a test-only jsonnet module that builds a jrsonnet State against crates/apollo_deployments/jsonnet, evaluates services/<layout>.jsonnet, and for each service compares the derived components map to HybridNodeServiceName::get_component_configs from hybrid.rs. Comparison strips url and port on both sides because Rust leaves those as deploy-time placeholders while jsonnet may embed concrete values.

Wires this through hybrid_infra_matches_rust in deployment_definitions_test.rs (sets repo root as cwd first). The generic assert_infra_matches_rust helper is ready to extend to other layouts later; only hybrid is exercised today.

Reviewed by Cursor Bugbot for commit 69d1145. Bugbot is set up for automated code reviews on this repo. Configure here.

@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/hybrid-layout-test branch from 4e09c73 to ee698fb Compare June 16, 2026 12:10
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/hybrid-layout branch from 8e97777 to f912689 Compare June 21, 2026 12:11
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/hybrid-layout-test branch from 8dae4c0 to 69d1145 Compare June 21, 2026 12:11
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.

2 participants