Skip to content

apollo_deployments: retire dead preset/replacer generation machinery#14647

Open
nimrod-starkware wants to merge 1 commit into
nimrod/jsonnet/retire-preset-config-pathfrom
nimrod/jsonnet/retire-replacer-generation
Open

apollo_deployments: retire dead preset/replacer generation machinery#14647
nimrod-starkware wants to merge 1 commit into
nimrod/jsonnet/retire-preset-config-pathfrom
nimrod/jsonnet/retire-replacer-generation

Conversation

@nimrod-starkware

Copy link
Copy Markdown
Contributor

Runtime (Phase 1) and the cdk8s deploy (Phase 2) now load only native config, so
the preset-replacer GENERATION machinery is dead. Remove it:

  • Delete resources/app_configs/replacer_*.json (19 files), src/replacers.rs, and the
    deployment_generator bin (+ its [[bin]] entry and the tempfile dev-dep).
  • service.rs: drop the replacer-annotation plumbing, the deploy-path config_to_preset/
    prune_by_is_none calls, and the orphaned ComponentConfigsSerializationWrapper. Keep
    KEYS_TO_BE_REPLACED (still feeds the retained applicative_matches_app_configs guard's
    exclusion set).
  • Delete the 3 migration guard tests (deployment_files_are_up_to_date,
    replacer_config_entries_are_in_config, duplicate_config_entries). Keep the
    build_*_deserializes, applicative_matches_app_configs, and *_infra_matches_rust guards,
    and get_component_configs.

The cdk8s configList field is presence-checked only (its targets live in a different
directory and are not read under native), so deleting the base replacer JSONs leaves
synth green. apollo_deployments: 9 tests pass; cdk8s synth green for all overlays.

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

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

nimrod-starkware commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/retire-replacer-generation branch from 89ab258 to c0351e0 Compare June 28, 2026 10:14
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/retire-preset-config-path branch from 0df4a4a to a07b98f Compare June 28, 2026 10:14
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/retire-preset-config-path branch from a07b98f to a3d7879 Compare June 28, 2026 10:30
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/retire-replacer-generation branch 2 times, most recently from 4f5f772 to ece79f9 Compare June 28, 2026 14:04
@nimrod-starkware nimrod-starkware self-assigned this Jun 29, 2026
@nimrod-starkware nimrod-starkware marked this pull request as ready for review June 29, 2026 11:22
@cursor

cursor Bot commented Jun 29, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Deletion of unused generation code and committed JSON artifacts; retained tests still guard jsonnet vs app_configs and infra parity.

Overview
Removes dead deployment preset/replacer generation now that runtime and cdk8s deploy load native config only.

Deletes the deployment_generator binary, replacers.rs, all 19 replacer_*.json app config templates, and the [[bin]] / tempfile dev-dependency wiring. service.rs no longer dumps replacer-annotated configs (config_to_preset, prune_by_is_none, ComponentConfigsSerializationWrapper, replace_pred, and per-service replacer file paths); KEYS_TO_BE_REPLACED stays as the exclusion set for applicative_matches_app_configs.

deployment_definitions drops replacer path helpers and CONFIG_BASE_DIR. Three migration tests (deployment_files_are_up_to_date, replacer_config_entries_are_in_config, duplicate_config_entries) are removed; jsonnet/Rust parity and build-deserialize guards remain.

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

Runtime (Phase 1) and the cdk8s deploy (Phase 2) now load only native config, so
the preset-replacer GENERATION machinery is dead. Remove it:
- Delete resources/app_configs/replacer_*.json (19 files), src/replacers.rs, and the
  deployment_generator bin (+ its [[bin]] entry and the tempfile dev-dep).
- service.rs: drop the replacer-annotation plumbing, the deploy-path config_to_preset/
  prune_by_is_none calls, and the orphaned ComponentConfigsSerializationWrapper. Keep
  KEYS_TO_BE_REPLACED (still feeds the retained applicative_matches_app_configs guard's
  exclusion set).
- Delete the 3 migration guard tests (deployment_files_are_up_to_date,
  replacer_config_entries_are_in_config, duplicate_config_entries). Keep the
  build_*_deserializes, applicative_matches_app_configs, and *_infra_matches_rust guards,
  and get_component_configs.

The cdk8s configList field is presence-checked only (its targets live in a different
directory and are not read under native), so deleting the base replacer JSONs leaves
synth green. apollo_deployments: 9 tests pass; cdk8s synth green for all overlays.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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