snapshots: move per-lab build inputs into snapshots/<lab>/source/#180
Closed
dhalperi wants to merge 1 commit into
Closed
snapshots: move per-lab build inputs into snapshots/<lab>/source/#180dhalperi wants to merge 1 commit into
dhalperi wants to merge 1 commit into
Conversation
Each lab now keeps its hand-authored topology, startup configs, and checks.yaml under `snapshots/<lab>/source/` alongside the collected `configs/`, `show/`, `batfish/`, and `validation/` directories. This makes labs self-contained: recollecting requires no hunt through `infra/examples/`, and source vs. collected configs sit side by side for direct comparison (e.g., to confirm whether a community spec like `12345:` survived verbatim or was canonicalized by the device). Mappings (kebab-case under infra/examples/ -> snake_case snapshot): ceos-bgp-unnumbered -> eos_ceos_bgp_unnumbered ceos-bgp-weight-experiment -> eos_ceos_bgp_weight_experiment ceos-ebgp -> eos_ceos_ebgp ceos-ospf-unnumbered -> eos_ospf_unnumbered ceos-switchport-order -> eos_switchport_order evpn-type5 -> junos_evpn_type5 junos-commit-check -> junos_commit_check junos-community-delete -> junos_community_delete junos-cross-term-match -> junos_cross_term_match junos-policy-chain-visibility -> junos_policy_chain_visibility junos-rmw-localpref -> junos_rmw_localpref l3vpn -> junos_l3vpn The lone generic starter under `infra/examples/` (the `two-router-ebgp` template, which has no matching snapshot) is kept as a reference example and consolidated into its own subdir. `infra/README.md` is updated to point readers at the new locations and to document the new snapshot layout. The test framework only zips `configs/`, `batfish/`, `aws_configs/`, `sonic_configs/`, and `hosts/` for Batfish, so the new `source/` subdir is invisible to validation. Verified with `pytest lab_tests/test_labs.py --labname=junos_rmw_localpref` (13/13 pass). ---- Prompt: ``` When we built this new lab-validation repo, we put all the hand-crafted configs in the examples/ folder and then we collected labs/ into snapshots. This made sense at first, but seems unmaintainable as we go forward. Every lab gets essentially two copies occupying two different brain spaces. I think we should re-organize to put the "infra inputs" -- the stuff we use to build the lab, the original created configs configs, the other setup code,config,scripts, the health checks -- in with the lab itself somewhere. In addition to reducing clutter, that will make the labs self-contained: if we want to recollect them, all the information will be there. If we have questions about the input config, they will be there. It will also let us easily compare our generated configs to the ones from the lab. This is invaluable in cases like confirming that Junos treats a BGP community `12345:` as the concrete `12345:0` not the regex `12345:.*`. It would also be invaluable in the junos_rwm lab, where I think we actually inaccurately assessed the behavior of Juniper because what it really does is overwrite the original local-pref set with the local-pref in our generated configs rather than 'read from the original value'. Propose how to do this restructuring. ``` commit-id:cd8d8b3f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each lab now keeps its hand-authored topology, startup configs, and
checks.yaml under
snapshots/<lab>/source/alongside the collectedconfigs/,show/,batfish/, andvalidation/directories. Thismakes labs self-contained: recollecting requires no hunt through
infra/examples/, and source vs. collected configs sit side by sidefor direct comparison (e.g., to confirm whether a community spec
like
12345:survived verbatim or was canonicalized by the device).Mappings (kebab-case under infra/examples/ -> snake_case snapshot):
ceos-bgp-unnumbered -> eos_ceos_bgp_unnumbered
ceos-bgp-weight-experiment -> eos_ceos_bgp_weight_experiment
ceos-ebgp -> eos_ceos_ebgp
ceos-ospf-unnumbered -> eos_ospf_unnumbered
ceos-switchport-order -> eos_switchport_order
evpn-type5 -> junos_evpn_type5
junos-commit-check -> junos_commit_check
junos-community-delete -> junos_community_delete
junos-cross-term-match -> junos_cross_term_match
junos-policy-chain-visibility -> junos_policy_chain_visibility
junos-rmw-localpref -> junos_rmw_localpref
l3vpn -> junos_l3vpn
The lone generic starter under
infra/examples/(thetwo-router-ebgptemplate, which has no matching snapshot) is keptas a reference example and consolidated into its own subdir.
infra/README.mdis updated to point readers at the new locationsand to document the new snapshot layout.
The test framework only zips
configs/,batfish/,aws_configs/,sonic_configs/, andhosts/for Batfish, so the newsource/subdir is invisible to validation. Verified with
pytest lab_tests/test_labs.py --labname=junos_rmw_localpref(13/13pass).
Prompt:
commit-id:cd8d8b3f