2 Commits
Author SHA1 Message Date
deytenit 1bc448961a fix: update sync/repository rebase target from trunk to main 2026-07-05 12:04:24 +03:00
deytenit c5b61a3294 fix: exclude commons/ from dclint --fix to prevent submodule dirtying
In node repos the shared core compose lives inside the pinned commons
submodule; letting dclint rewrite it dirties the submodule, which makes
sync/repository abort the nightly capture-up. Harmless in the standalone
commons repo (no commons/ dir).
2026-07-05 11:20:25 +03:00
3 changed files with 8 additions and 6 deletions

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ action to its bash source and the behaviors that must match.
| configure/systemd | actions/configure/systemd | render each unit -> /etc/systemd/system; daemon-reload; enable+start .service |
| configure/routing | actions/configure/routing | ip_forward=1; fwmark 0x1->table100 rule; local default route table100 (idempotent) |
| configure | (new umbrella) | run base,ufw,crowdsec,cron,systemd,routing in order |
| sync/repository | actions/sync/repository | sync/<node> branch; add -A + commons submodule; commit; rebase origin/trunk; force-with-lease; telegram |
| sync/repository | actions/sync/repository | sync/<node> branch; add -A + commons submodule; commit; rebase origin/main (was trunk in the monorepo); force-with-lease; telegram |
| sync/packages | actions/sync/packages | apt --just-print upgrade Inst list; docker+skopeo digest compare; telegram info |
| backup/run | actions/sync/tiers (restic-backup) | init-if-needed; backup /data/@tier1,2 --host --tag com-ermnvldmr-root-<node>; forget --prune 7/4/12; telegram |
| tiers/link | actions/tiers/link | node + per-project @tierN symlinks; shared/ links; .env symlink |
+4 -4
View File
@@ -1,10 +1,10 @@
# actions/sync/repository.py
"""Port of sync/repository — capture-up commit + rebase onto origin/trunk + force-push."""
"""Port of sync/repository — capture-up commit + rebase onto origin/main + force-push."""
import os
from datetime import datetime
from engine.descriptor import Meta, Arg
METADATA = Meta(summary="Capture-up: commit node changes, rebase onto origin/trunk, force-push sync/<node>.",
METADATA = Meta(summary="Capture-up: commit node changes, rebase onto origin/main, force-push sync/<node>.",
args=[Arg("telegram_bot_url", "Telegram Bot URL for notifications")])
TITLE = "Annual Remote Sync"
@@ -41,8 +41,8 @@ def run(ctx, args):
git("commit", "-m", f"[{node}] Auto-commit: {ts}")
else:
log.info("No changes to commit.")
git("fetch", "origin", "trunk")
if git("rebase", "origin/trunk", check=False).returncode != 0:
git("fetch", "origin", "main")
if git("rebase", "origin/main", check=False).returncode != 0:
log.error("Rebase conflict — aborting rebase; manual intervention required.")
git("rebase", "--abort", check=False)
ctx.notify.error(TITLE, url, "Rebase conflict. Manual intervention required.", node)
+3 -1
View File
@@ -26,9 +26,11 @@ def run(ctx, args):
targets = [f"/workdir/{f}" for f in files_string.splitlines()]
log.info("Running dclint --fix (via docker)...")
# "-e commons": never --fix inside the pinned submodule — a dirtied commons makes
# sync/repository abort the nightly capture-up.
r = s.run(["docker", "run", "--rm", "-v", f"{repo}:/workdir", "-w", "/workdir", "node:lts-alpine",
"npx", "--yes", "dclint", "-e", "@tier1", "-e", "@tier2", "-e", "@tier3", "-e", ".env",
"-r", "--fix", *targets], check=False)
"-e", "commons", "-r", "--fix", *targets], check=False)
if r.returncode != 0:
log.error(f"dclint issues (exit {r.returncode})."); return r.returncode or rc_ip
if args.hook and files_string: