Repository navigation
feat: config baseline and drift check workflows - #43
Conversation
The engine's license caps how many workflow definitions it holds. Published in plain file order, a scenario with more workflows than the cap had simple-lab-discovery refused (403 LicenseLimitExceeded) because files that sort before it took the last slots, and local-lab-up failed. register.py now moves DISCOVER_WORKFLOW, which the Makefile exports and compose and kind-lab-discover pass on, to the front, so the cap refuses an extra workflow instead. An id that no document matches only warns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
config_baseline stores each device's running configuration as the config_baseline fact; config_drift_check compares the running configuration against it and leaves the fact untouched. Both use fb.base.neops.io/network_device_detect_config_drift, which normalizes secrets before storing and comparing, so baseline and check see the same text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without it every vtysh call prints "% Can't open configuration file /etc/frr/vtysh.conf", and that line lands inside every `show running-config` a worker captures, including the config_baseline fact. The file holds vtysh's own settings, not routing config, so frr.conf and daemons stay scenario data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge recommendation: ⛔ don't merge yet The two new workflows call Blocking:
Notes:
Verified locally: worktree at the PR head
Not verified: no end-to-end run of the workflows; the block they need is not available to build. Not run against a live engine or devices: the shared lab and stacks belong to other sessions. |
Takes develop's discovery pins (global_discover_network 0.2.0, simple_lab_discovery 1.4.0) and keeps the branch's DISCOVER_WORKFLOW export. Drops the branch's Makefile-vs-YAML pin test: develop's tests/test_discovery_workflow.py already pins the two from the files themselves, while the branch's copy hardcoded 1.3.0.
Workflows (
4e0def7)Two new workflows in
scenarios/_base/workflows/, so every scenario gets them. Both run per device (seedEntity: device) throughfb.base.neops.io/network_device_detect_config_drift:0.1.0.config_baselinestores the running config as theconfig_baselinedevice fact (update_baseline: true).config_drift_checkcompares the running config against that fact and leaves the fact untouched.Both take an optional
baseline_fact_key. The block normalizes secrets before storing and before comparing, which is why the baseline is written by the drift block and not bydevice_save_fact.Depends on a worker image that carries the drift block. It isn't in
0.2.0-beta.7or any published image yet. The FRR fixes it needs are in zebbra/neops-worker-sdk-py#293.Discovery is published first (
6ec85b9)The engine's Developer Preview license caps workflow definitions at 5. Adding these two files pushed
simple-lab-discoverypast the cap: the files sort before it, so it was the one refused (403 LicenseLimitExceeded), andlocal-lab-upfailed.bootstrap/register.pynow publishesDISCOVER_WORKFLOWfirst, so the cap refuses an extra workflow instead. The Makefile exportsDISCOVER_WORKFLOW; compose andkind-lab-discoverpass it to the container. The id is matched including its version. A mismatch only prints a warning, and a test now pins the Makefile and the YAML to the same version.FRR image ships an empty
vtysh.conf(e2609e5)Without the file, every vtysh call prints
% Can't open configuration file, and that line ended up in every capturedshow running-config, including the stored baseline.Testing
make testpasses (163), along with ruff, pyrefly,py39-checkanddoc-build.frr-onlywith the Enterprise engine and a worker built from the SDK PR: discovery,config_baselineon 10 routers, thenconfig_drift_check. With no changes, every router reports no drift. After a hand-edited description, that router shows the expected diff.🤖 Generated with Claude Code