Skip to content

feat(build): Build every family's provider for a Junos OS and a Junos OS Evolved - #172

Draft
aburston wants to merge 1 commit into
Juniper:masterfrom
aburston:master
Draft

aburston wants to merge 1 commit into
Juniper:masterfrom
aburston:master

Conversation

@aburston

@aburston aburston commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Build every family's provider for a Junos OS and a Junos OS Evolved

Build every family's provider for a Junos OS and a Junos OS Evolved release in one go, from a clone of the Juniper YANG repository: junos-mx, -es, -ex, -nfx, -qfx for 25.4R1 and junos-evo for 25.4R1-EVO, each --generic --groups.

  • Modules are read out of the clone's git objects (git archive at YANG_REF), so its working tree does not matter and two releases can be built from one clone. make latest discovers the newest release of each branch; JUNOS_RELEASE / EVO_RELEASE pin one. Both repository layouts are handled (<=22.4 flat, >=23.4 native/conf-and-rpcs/.../models).
  • Outputs land under dist//: binaries, each provider's schema for jtaf-xml2tf, a manifest (commit, sha256, fingerprint, exclusions) and a dev_overrides CLI configuration, plus a combined dist/terraformrc where the newest release provides each name. Provider names carry no release.
  • Hashed input stamps give incremental rebuilds and an accurate make -n; a second make all is a no-op.
  • make preflight checks tools, disk (MIN_FREE_GB) and memory; heavy steps run under nice/ionice with JOBS=2, and TMPDIR/GOTMPDIR point under build/ so nothing lands on the system temporary directory.
  • make clean-space reclaims stale build output, stopped containers older than PRUNE_UNTIL, dangling images and unreferenced build cache. It never touches a running container; tagged images, the Go caches and the user's own /tmp entries are opt-in, and DRY_RUN=1 previews everything.
  • The 25.4R1 NFX model's hash-function choice holds a CRC16 leaf beside a crc16 container, which map to one Terraform attribute and the generator refuses; EXCLUDE_nfx leaves that choice out by default (8 paths, recorded in the manifest). Per-family EXCLUDE_ adds to the global EXCLUDE.
  • scripts/release/jtaf_release.py does discovery, layout resolution, family enumeration, tooling-id, manifest and terraformrc; preflight.sh and clean_space.sh are the shell helpers. 33 tests cover them with fixtures and a stub container runtime, without a YANG clone, Go or Docker.
  • README-terraform.md gains "Building a release set with make"; the OpenSpec change build-release-provider-matrix records proposal, specs, design (with measured costs) and tasks.

…os release

Build every family's provider for a Junos OS and a Junos OS Evolved release
in one go, from a clone of the Juniper YANG repository: junos-mx, -es, -ex,
-nfx, -qfx for 25.4R1 and junos-evo for 25.4R1-EVO, each --generic --groups.

- Modules are read out of the clone's git objects (git archive at YANG_REF),
  so its working tree does not matter and two releases can be built from
  one clone. `make latest` discovers the newest release of each branch;
  JUNOS_RELEASE / EVO_RELEASE pin one. Both repository layouts are handled
  (<=22.4 flat, >=23.4 native/conf-and-rpcs/.../models).
- Outputs land under dist/<release>/: binaries, each provider's schema for
  jtaf-xml2tf, a manifest (commit, sha256, fingerprint, exclusions) and a
  dev_overrides CLI configuration, plus a combined dist/terraformrc where
  the newest release provides each name. Provider names carry no release.
- Hashed input stamps give incremental rebuilds and an accurate `make -n`;
  a second `make all` is a no-op.
- `make preflight` checks tools, disk (MIN_FREE_GB) and memory; heavy steps
  run under nice/ionice with JOBS=2, and TMPDIR/GOTMPDIR point under build/
  so nothing lands on the system temporary directory.
- `make clean-space` reclaims stale build output, stopped containers older
  than PRUNE_UNTIL, dangling images and unreferenced build cache. It never
  touches a running container; tagged images, the Go caches and the user's
  own /tmp entries are opt-in, and DRY_RUN=1 previews everything.
- The 25.4R1 NFX model's hash-function choice holds a CRC16 leaf beside a
  crc16 container, which map to one Terraform attribute and the generator
  refuses; EXCLUDE_nfx leaves that choice out by default (8 paths, recorded
  in the manifest). Per-family EXCLUDE_<type> adds to the global EXCLUDE.
- scripts/release/jtaf_release.py does discovery, layout resolution, family
  enumeration, tooling-id, manifest and terraformrc; preflight.sh and
  clean_space.sh are the shell helpers. 33 tests cover them with fixtures
  and a stub container runtime, without a YANG clone, Go or Docker.
- README-terraform.md gains "Building a release set with make"; the
  OpenSpec change build-release-provider-matrix records proposal, specs,
  design (with measured costs) and tasks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aburston aburston changed the title feat(build): Makefile for the generic+groups provider matrix of a Jun… feat(build): Build every family's provider for a Junos OS and a Junos OS Evolved Oct 28, 2026
@aburston aburston self-assigned this Oct 28, 2026
@aburston
aburston marked this pull request as draft October 28, 2026 09:58
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.

1 participant