Repository navigation
eas: k3s/k3d patch overlay that drops each patch once upstream carries the fix - #248
Merged
Merged
Conversation
…s the fix integrations/eas/overlay.py decides, per row of integrations/eas/overlay.json and at one EAS commit, whether a k3s/k3d patch is skipped (not needed on this cluster), dropped because upstream merged it (git apply -R --check), dropped because upstream fixed it another way (a probe matches and the knob the generator writes is still there), applied (first variant whose git apply --check passes), or a STOP that names the upstream change that moved the hunk and says to regenerate. Every decision prints as `fact -> choice [source]`, with --explain giving permalinks. Decisions read the commit through a scratch index, so they do not change once the overlay is applied; --apply writes the working tree only when nothing STOPs, and a re-run is a no-op. Patches are looked up in integrations/eas/patches, then in the upstream drafts, so the drafts stay the only copy. The one new patch is the release-1.2 form of 0006, where the EnvoyProxy task is still in roles/envoy_gateway/tasks/install.yaml. tests/eas_test.sh (section overlay) runs it on synthetic git repos built from byte-identical copies of the EAS files the patches touch, at main 97f6157 and release-1.2 5c27fb3. apply-check.sh gains --overlay, which checks the recorded decisions on a real clone and prints them for branch tips and open EAS PRs #50, #52 and #61.
This was referenced Oct 29, 2026
… STOP names the change that broke the hunk Three gaps in the auto-drop logic, each found with a synthetic tree on the fixtures and each now a failing-then-passing case in tests/eas_test.sh: - The 0006 Exists probe checked for the exact "" control-plane selector only in the file it matched, and only with an unquoted key. An Exists term in another file of roles/envoy_gateway, or a flow-style selector with a quoted key, gave drop-fixed while the EnvoyProxy kept the selector that matches no k3s node. A probe can now carry an `absent` regex that no file under its glob may match; 0006 uses it for the selector in any quoting, role-wide. - The vars/k3s.yaml probe for the EAS #50 layout matched any _envoy_gateway_proxy_shape, including controlplane_daemonset, the shape that carries the exact "" selector. It now matches only another shape; a k3s entry that keeps controlplane_daemonset is still the STOP naming #50. - A STOP named a `moved` hint whenever its regex matched anywhere, and otherwise the last commit on any of the patch's files. Once EAS #61 merges, every later 0002 STOP would have named #61. A hint now counts only when it watches a file whose hunks no variant applies (git apply --check --include), and the fallback names the last commit on those files. The test helper that reads the decisions JSON now removes it before each run. Before, a run that wrote no JSON left the previous run's decisions in place, and two checks passed with --rev or kubelet-static broken outright. Decisions are unchanged at both pins (main 97f6157, release-1.2 5c27fb3) and at every open EAS pull request head, checked on a fresh clone.
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.
This is the overlay part of full EAS support.
k3d-gpu eas upwill use it to patch the intel/enterprise-ai-solutions (EAS) checkout before it installs. Each k3s/k3d patch drops out once upstream carries the fix, and if upstream moves a hunk the run stops before the cluster is touched.What it does
integrations/eas/overlay.pyreadsintegrations/eas/overlay.jsonand decides for each patch at one EAS commit:skip: the patch is not needed on this cluster.0003is needed only whenkubernetes_cpu_policyisnri-balloons, the only case where EAS installs the balloons chart (configs/components.yaml).0004is needed only on more than one node.0005is docs, so it never applies.drop-merged: a variant reverse-applies (git apply -R --check).drop-fixed: a probe finds an upstream fix done another way, and the knob the generator writes is still in the file the probe matched.global.platformmust not exist side by side.apply: the first variant whosegit apply --checkpasses.STOP: the line names the upstream change that moved the hunk and says to regenerate the patch. The name comes from a row'smovedhint when one matches, otherwise from the last commit on the patch's files. The exit code is 3, and nothing is written.Every decision prints as
fact -> choice [source]. With--explain, the source becomes a permalink at the full sha.The source line is where the hunk lands at that commit, located the way
git applylocates it. It is not the patch header's line: on97f6157, 0002's header says 59, but the hunk lands at 69.Decisions read the commit through a scratch index, never the working tree.
--applywrites the working tree only when no row STOPs and--revis HEAD:Patches are looked up in
integrations/eas/patchesfirst, then in the upstream drafts inintegrations/eat/upstream/patches. The drafts stay the only copy.There is one new patch,
integrations/eas/patches/0006-release-1.2-envoy-control-plane-affinity.patch. It is the release-1.2 form of 0006: on that branch the EnvoyProxy task is still inroles/envoy_gateway/tasks/install.yaml, at L191-L219, and EAS #42 moved it tocontroller.yamlon main. It makes the same change as 0006: affinityExists, plusnodeSelector: null.I checked the variant with
checks/eas-envoy-reinstall.pyon release-1.25c27fb3, before and after the patch. A fresh install and a re-install over the unpatched object both givenodeSelector=Nonewith theExistsaffinity. release-1.2 pinsenvoy_gateway_version: "1.7.1".Rows (overlay.json, checked 2026-10-29)
roles/istio/**setsglobal.platformfrom a variableistio_platformheadlamp_enabledin the global_config.yaml context)chart_version:inroles/nri_cpu_balloons/tasks/install_advanced.yamlroles/kubernetes/tasks/install.yamlrunsapply_node_topology.yamlmatchExpressionsExiststerm on the control-plane key, with no exact""selector (any quoting) left in any file ofroles/envoy_gateway; orroles/envoy_gateway/vars/k3s.yaml(the per-distribution layout of EAS #50) selecting a shape other thancontrolplane_daemonset_eg_k8s_provider; #52 carries the same change)overlay.jsonalso recordsverifiedcases: the expected decisions at the two profile pins, for two sets of facts each.97f6157d6a72f7173c698c474d4e51d2c79f1fd6.5c27fb39a95eecec41aa4e29a1188984e9c726f3, which is tag v1.2.0-rc.1.CI checks these cases on byte-identical fixtures.
apply-check.sh --overlaychecks them on a real clone.Once
integrations/eas/pins.jsonlands (eas-config),eas_test.shrequires every pinned EAS sha to have averifiedentry. That check reads any object withrepoending inenterprise-ai-solutionsand asha, so it does not depend on the pins layout.Interface for eas-config and cmd_eas:
knob, the generator variable an applied or drop-fixed row needs (istio_platformfor 0002).Tests (written first)
tests/eas_test.shhas sectionoverlay, wired intoci.yml. The suite takes section names, soconfigandclican be added beside it. It runs 95 checks on synthetic git repos built fromtests/fixtures/eas/trees:97f6157and at5c27fb3, plus EAS's Apache-2.0 LICENSE.SOURCESlists each file's upstream blob sha, and the suite checks every one withgit hash-object.Cases:
set_valueswithistio_platform.Existsterm and no selector.chart_version.vars/k3s.yaml.""selector: STOP. This is not a fix on k3s.istio_cni_platform): STOP. This also holds when 0002 would still apply.https://github.com/intel/enterprise-ai-solutions/pull/50, and--applyleaves the tree untouched, 0002 included.--apply: it changes exactly 0002 and 0006a's files, and a re-run is a no-op. A re-run with nri-balloons adds only 0003. A conflicting local edit gives exit 3 and leaves every other file alone.--revother than HEAD is refused.--check-verifiedand--watch: both run against a spec pointed at the fixture repo.I mutation-checked three cases, and each mutation turned the suite red:
Results on this branch, rebased on main
890d1d16:tests/eas_test.sh runs in CI-S warning, the CI severity; also clean at all severities)apply-check.sh(default mode)97f6157: all five patches, and the series withgit amReview fixes (second commit, 41694c1)
A review found three gaps in the auto-drop logic and one in the tests. Each has a case in
tests/eas_test.shthat failed before the fix:""selector only in the file it matched, and only with an unquoted key. So anExiststerm in another file ofroles/envoy_gateway, or a flow-style selector with a quoted key, gave drop-fixed while the EnvoyProxy kept the selector that matches no k3s node. A probe can now carry anabsentregex that no file under its glob may match; 0006 uses it for the selector in any quoting, across the role._envoy_gateway_proxy_shape, includingcontrolplane_daemonset, the shape in feat: opt-in telemetry manifests (RAPL, P/E-core, Intel GPU, DCGM) #50 that carries the exact""selector. It now matches only another shape. A k3s entry that keepscontrolplane_daemonsetis still the STOP naming feat: opt-in telemetry manifests (RAPL, P/E-core, Intel GPU, DCGM) #50.movedhint was named whenever its regex matched anywhere. Once feat: k3d-gpu audit and images.lock (console slice S5) #61 merges, every later 0002 STOP would have named feat: k3d-gpu audit and images.lock (console slice S5) #61. A hint now counts only when it watches a file whose hunks no variant applies (git apply --check --include), and the fallback names the last commit on those files.--revorkubelet-staticbroken outright. It now removes the file before each run.Mutation check: ignoring
absent, unscoping the hint, the old fallback, a broken--revand a droppedkubelet-staticeach turn the suite red.Decisions are unchanged at both pins and at every open EAS PR head (#12 to #75), on a fresh clone.
apply-check.sh --overlay, on a fresh clone, 2026-10-29
integrations/eat/upstream/checks/apply-check.sh --overlayexited 0. It needs the network, so it stays out of CI. Output:The decisions at the pins match the spec: on main, 0002 apply, 0006 apply (variant a), and 0003, 0004 and 0005 skip; release-1.2 is the same with 0006 variant b.
The open PRs show the known future breaks. #50 and #52 STOP 0006 and name #50. #61 STOPs 0002 and names #61.
When #61 merges, a regenerated 0002 is needed. Only the context of 0002's
global_config.yamlhunk moves, and that hunk is a comment.eas upon that main would stop with exit 3 before touching the cluster.Not covered here
git apply, regexes, blob shas), so no ledger row is pre-registered. The wiring smoke and F3 belong to the CLI part.vars/k3s.yamlprobe follows the spec: once a k3s entry exists in feat: opt-in telemetry manifests (RAPL, P/E-core, Intel GPU, DCGM) #50's per-distribution layout, 0006 drops. The probe does not prove that the shape it selects schedules on k3s. The EAS-mode gateway check (eas check) is what catches a data plane with no pods.patch_dirsare relative to the repo root. The packaging part decides whereshare/easputsoverlay.jsonand the patches, and sets the lookup to match.agentstack-*) has no open PR. Its eat-up.sh: deploy EAT release-1.1.0 on request, vLLM CPU v0.28.0 by digest, 1.1.0 config checks, H1c pre-registered (default stays 1.0.3-hotfix) #255 (EAT release-1.1.0 in eat-up.sh) is closed, and itsagentstack-eas-agent-toolkitbranch has no commits past main. W13 (fresh-*) has ci: alarm on red or missing automation, and harden the release #252, ci: CI on bot PRs by dispatch, gate acceptance and alarm surfacing #253, known-issues: fixed-in registry, version schemes and a ledger re-measure queue #256, ci: merge auto-eligible bot PRs one at a time, behind a circuit breaker, and batch the release #257 and ci(canary): runtime and surface canary for engine and node images #258 open. None of them touchesintegrations/eas,integrations/eatortests/eas_test.sh, and theirci.ymlhunks sit outside this PR's one-line hunk. The W13 pins and known-issues registries (known-issues: fixed-in registry, version schemes and a ledger re-measure queue #256) are not on main yet, so this part keeps its data inoverlay.json.eas-config(eas: EAS and EAT config from cluster facts, the pins file, fixture tests #251) and the docs part (docs: k3d-gpu eas, EAT 2.0 through EAS, upstream re-read; ledger F3 pre-registration #249) are stacked on this branch. The suite is sectioned soconfigandclidrop in next tooverlay.Sources:
git ls-remoteon 2026-10-29.b7eb331, Helm-adoptable NRI balloons, EAT hybrid profile and reservation patch #52cbaa61a, feat: k3d-gpu audit and images.lock (console slice S5) #61d61b426.Nothing was posted to any intel repository.