Skip to content

Commit 3765446

Browse files
deployment: add dummy_for_testing native config override layer
The prepare-production-overlays CI job synths each prod overlay env-only (-o hybrid.<env> -o hybrid.common.dummy_for_testing), with no per-node leaf or devops checkout. Under the native config path this errored on a missing overrides.validator_id (and the consensus/mempool multiaddrs) because the dummy_for_testing overlay had YAML but no native sequencer_config.jsonnet. Add that layer (the folded nested translation of dummy_for_testing's YAMLs: validator_id plus the #is_none multiaddrs as null) so env-only native synth succeeds for mainnet, sepolia-alpha and sepolia-integration. Add the matching *_layer_jsonnet_mirrors_combined_yaml regression test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d8e24ea commit 3765446

2 files changed

Lines changed: 42 additions & 4 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Overrides layer for the `dummy_for_testing` overlay (hybrid layout).
2+
// Supplies the dummy values the `prepare-production-overlays` CI job needs for env-only synth.
3+
{
4+
validator_id: '0x64',
5+
6+
consensus_manager_config: {
7+
network_config: {
8+
advertised_multiaddr: null,
9+
bootstrap_peer_multiaddr: null,
10+
},
11+
},
12+
13+
mempool_p2p_config: {
14+
network_config: {
15+
advertised_multiaddr: null,
16+
bootstrap_peer_multiaddr: null,
17+
},
18+
},
19+
}

deployments/sequencer/test/test_native_config.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
INTEGRATION_LAYER_DIR = HYBRID_OVERLAYS_DIR / "sepolia-integration"
5151
SEPOLIA_ALPHA_LAYER_DIR = HYBRID_OVERLAYS_DIR / "sepolia-alpha"
5252
MAINNET_LAYER_DIR = HYBRID_OVERLAYS_DIR / "mainnet"
53+
DUMMY_FOR_TESTING_LAYER_DIR = HYBRID_OVERLAYS_DIR / "common" / "dummy_for_testing"
5354

5455
# The committed dump of Rust `private_parameters()` (the secrets): every non-pointer private param
5556
# plus every pointer target pointed by a private param. These are filled at deploy from the
@@ -455,7 +456,9 @@ def test_resolve_layer_files_single_leaf_visits_env_ancestor(combined_base_dir):
455456
base = Path(combined_base_dir)
456457
overlays_root = base / "configs" / "overlays" / LAYOUT
457458

458-
leaf_files = resolve_layer_files(LAYOUT, INTEGRATION_NODE0_LEAF_OVERLAY, base_dir=combined_base_dir)
459+
leaf_files = resolve_layer_files(
460+
LAYOUT, INTEGRATION_NODE0_LEAF_OVERLAY, base_dir=combined_base_dir
461+
)
459462
both_files = resolve_layer_files(LAYOUT, INTEGRATION_NODE0_OVERLAYS, base_dir=combined_base_dir)
460463

461464
# Single-leaf and explicit env+leaf chain must yield the SAME ordered, deduped file list.
@@ -465,7 +468,9 @@ def test_resolve_layer_files_single_leaf_visits_env_ancestor(combined_base_dir):
465468
sorted((overlays_root / "common").glob(LAYER_GLOB))
466469
+ sorted((overlays_root / "sepolia-integration").glob(LAYER_GLOB))
467470
+ sorted(
468-
(overlays_root / "sepolia-integration" / "apollo-sepolia-integration-0").glob(LAYER_GLOB)
471+
(overlays_root / "sepolia-integration" / "apollo-sepolia-integration-0").glob(
472+
LAYER_GLOB
473+
)
469474
)
470475
)
471476
assert leaf_files == expected
@@ -485,8 +490,12 @@ def test_single_leaf_merged_overrides_includes_env_cache_size(combined_base_dir)
485490
overrides lacked the key and `build()` hit `field does not exist: cache_size`. The single-leaf
486491
merged overrides must now contain it, and the single-leaf and env+leaf merges must be equal.
487492
"""
488-
leaf_overrides = merged_overrides(LAYOUT, INTEGRATION_NODE0_LEAF_OVERLAY, base_dir=combined_base_dir)
489-
both_overrides = merged_overrides(LAYOUT, INTEGRATION_NODE0_OVERLAYS, base_dir=combined_base_dir)
493+
leaf_overrides = merged_overrides(
494+
LAYOUT, INTEGRATION_NODE0_LEAF_OVERLAY, base_dir=combined_base_dir
495+
)
496+
both_overrides = merged_overrides(
497+
LAYOUT, INTEGRATION_NODE0_OVERLAYS, base_dir=combined_base_dir
498+
)
490499

491500
assert leaf_overrides == both_overrides
492501
assert "cache_size" in leaf_overrides["committer_config"]["storage_config"]
@@ -626,6 +635,16 @@ def test_mainnet_layer_jsonnet_mirrors_combined_yaml():
626635
_assert_layer_jsonnet_mirrors_combined_yaml(MAINNET_LAYER_DIR)
627636

628637

638+
def test_dummy_for_testing_layer_jsonnet_mirrors_combined_yaml():
639+
"""REGRESSION: same invariant for the `dummy_for_testing` overlay layer.
640+
641+
This layer supplies the dummy values the `prepare-production-overlays` CI job needs for env-only
642+
synth (validator_id + the consensus/mempool multiaddrs), so its native override jsonnet must
643+
mirror the combined YAMLs like the env layers do.
644+
"""
645+
_assert_layer_jsonnet_mirrors_combined_yaml(DUMMY_FOR_TESTING_LAYER_DIR)
646+
647+
629648
def _relative_layer_files(overlays_root: Path) -> set[str]:
630649
"""Every overlay file under `overlays_root`, as posix paths relative to that root."""
631650
return {

0 commit comments

Comments
 (0)