merge: sync Rongsong's scheduler-framework into chatbot
Full merge of origin/scheduler-framework (scheduler-core restructure,
failover-adoption, WAL_JOB_DISPATCH, apiserver backend health/heartbeat,
build-time versioning, bug-1673/1676/1678/1679/1680).
Conflict resolution:
- scheduler: adopt Rongsong's scheduler-core architecture (driver loop,
queue project/picker fields, resource bug-1569 fix)
- worker/controller_connector.c: keep Rongsong's reconnect/rejoin
structure, PORT our bug-1509 resend_job_status onto the rejoin success
path (his reconnect didn't re-report job state)
- apiserver backend: take Rongsong's health/heartbeat (supersedes our
e505066 circuit breaker)
- group.c: keep our bug-1513 comment
- misc: take theirs for additive fixes (go_build versioning,
test_group.c, persist.c RUSAGE_UPDATE, FilterRows bug-1680)
NOTE: our scheduler fixes (bug-1494 family dispatch-fail requeue,
PEND-reason classification) are NOT in Rongsong's branch — needs
verification/porting onto scheduler-core (separate follow-up).
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
commit
4e894d2184
395 changed files with 88517 additions and 5742 deletions
|
|
@ -16,6 +16,46 @@
|
|||
if builtins.hasAttr "shortRev" self
|
||||
then self.shortRev
|
||||
else self.dirtyShortRev;
|
||||
# NOTE (build-time-versioning task 2.2, remediation round): unlike
|
||||
# myCommitId (a genuinely flake-level, eval-time concept sourced from
|
||||
# self.shortRev/self.dirtyShortRev), the build timestamp is NOT
|
||||
# computed here. An earlier attempt used `builtins.toString
|
||||
# builtins.currentTime` at this exact spot -- but builtins.currentTime
|
||||
# is stripped entirely under a flake's default pure evaluation
|
||||
# ("error: attribute 'currentTime' missing"), so `nix build
|
||||
# .#xcecore_debug` (no --impure, the documented canonical command)
|
||||
# failed at evaluation. Fixed by moving the build-time computation
|
||||
# into each derivation's own build phase instead (xce.nix/xcecli.nix
|
||||
# `preConfigure`, via stdenv's bundled `date -u`) -- see those files.
|
||||
# Nothing build-time-related needs to be threaded through the flake
|
||||
# or nixSupport/default.nix any more; only myCommitId still does.
|
||||
# dirty-content-fingerprint task 2.2: myDirtyFingerprint is a new,
|
||||
# independent eval-time value alongside myCommitId (myCommitId's own
|
||||
# computation above, including its self.dirtyShortRev-derived -dirty
|
||||
# suffix, is NOT touched by this addition). Unlike build_time
|
||||
# (builtins.currentTime, stripped under pure-eval -- see the note
|
||||
# above), self.narHash is a genuine flake self-introspection field
|
||||
# with no pure-eval trap: it is reachable and content-sensitive with
|
||||
# no --impure needed (empirically re-confirmed live: editing a
|
||||
# tracked file changes it, reverting reproduces the original value
|
||||
# exactly). self.narHash's own string form is SRI-style base64
|
||||
# ("sha256-<base64>="), not hex, so it is rehashed via
|
||||
# builtins.hashString "sha256" (which DOES return a base16/hex
|
||||
# digest) and truncated to 8 hex chars to match the dev-loop path's
|
||||
# format (xce-build.sh task 2.1's `sha256sum | cut -c1-8`). Resolves
|
||||
# to empty on a clean tree, mirroring myCommitId's own
|
||||
# hasAttr "shortRev" branch immediately above (a clean tree only has
|
||||
# self.shortRev; a dirty tree also has self.dirtyShortRev).
|
||||
# KNOWN, ACCEPTED LIMITATION (see research.md "Nix path accepts the
|
||||
# untracked-file blind spot"): self.narHash does not reflect
|
||||
# brand-new untracked files unless they are git-add-staged first --
|
||||
# deliberately not engineered around here (would require adding git
|
||||
# as a nix sandbox dependency, an explicit prior architectural
|
||||
# decision this feature does not revisit).
|
||||
myDirtyFingerprint =
|
||||
if builtins.hasAttr "shortRev" self
|
||||
then ""
|
||||
else builtins.substring 0 8 (builtins.hashString "sha256" self.narHash);
|
||||
in
|
||||
flake-utils.lib.eachSystem supportedSystems (
|
||||
system: let
|
||||
|
|
@ -25,7 +65,7 @@
|
|||
];
|
||||
pkgs = import nixpkgs { inherit overlays system;};
|
||||
xpkgs = import ./nixSupport/default.nix {
|
||||
inherit pkgs myCommitId;
|
||||
inherit pkgs myCommitId myDirtyFingerprint;
|
||||
};
|
||||
appImageScriptContent = builtins.readFile ./tools/appimage/entry.sh;
|
||||
appImageEntryPackage = pkgs.writeShellApplication {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue