@misterhuydo/sentinel 1.6.5 → 1.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.cairn/.hint-lock CHANGED
@@ -1 +1 @@
1
- 2026-04-24T12:01:49.183Z
1
+ 2026-04-24T13:18:30.501Z
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-04-24T12:19:55.468Z",
3
- "checkpoint_at": "2026-04-24T12:19:55.470Z",
2
+ "message": "Auto-checkpoint at 2026-04-24T13:27:50.750Z",
3
+ "checkpoint_at": "2026-04-24T13:27:50.751Z",
4
4
  "active_files": [
5
5
  "J:\\Projects\\Sentinel\\cli\\bin\\sentinel.js",
6
6
  "J:\\Projects\\Sentinel\\cli\\lib\\test.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.6.5",
3
+ "version": "1.6.7",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -1 +1 @@
1
- __version__ = "1.6.5"
1
+ __version__ = "1.6.7"
@@ -10,6 +10,7 @@ from __future__ import annotations
10
10
  import logging
11
11
  import os
12
12
  import re
13
+ import shutil
13
14
  import subprocess
14
15
  from pathlib import Path
15
16
 
@@ -176,8 +177,12 @@ def maven_compile_check(local_path: str, timeout: int = 300) -> tuple[bool, str]
176
177
  mvn = shutil.which("mvn")
177
178
  if not mvn:
178
179
  raise MissingToolError("mvn")
180
+ # `-U` forces mvn to re-check Nexus on every call. Without it, a "not found"
181
+ # response (e.g. when called before Jenkins finishes publishing the new
182
+ # artifact) gets cached locally and all retries within the next ~24h see
183
+ # the stale negative — making cascade re-tries silently impossible.
179
184
  r = subprocess.run(
180
- [mvn, "compile", "-DskipTests", "-q", "--batch-mode"],
185
+ [mvn, "compile", "-DskipTests", "-U", "-q", "--batch-mode"],
181
186
  cwd=local_path,
182
187
  capture_output=True,
183
188
  text=True,
@@ -4910,15 +4910,35 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
4910
4910
  return json.dumps({"status": "triggered" if success else "failed", "repo": source_repo, "job_url": repo.cicd_job_url})
4911
4911
 
4912
4912
  if operation in ("release", "release_and_cascade"):
4913
- success = _trigger_jenkins_release(repo)
4914
- logger.info("Boss manage_release: release triggered for %s by %s (success=%s)", source_repo, user_id, success)
4913
+ from .config_loader import resolve_auto_commit as _resolve_auto_commit
4914
+ # Will we cascade after the release? If yes, BLOCK on the Jenkins
4915
+ # build so the artifact is actually in Nexus before the cascade
4916
+ # tries to bump dependents. Without this, mvn hits a 404 and
4917
+ # caches a negative result that blocks all retries for ~24h.
4918
+ do_cascade = (operation == "release_and_cascade") or _resolve_auto_commit(repo, cfg_loader.sentinel)
4919
+ wait_for_jenkins = do_cascade
4920
+ if wait_for_jenkins and channel:
4921
+ from .notify import slack_alert as _slack_alert
4922
+ _slack_alert(
4923
+ cfg_loader.sentinel.slack_bot_token, channel,
4924
+ f":hourglass_flowing_sand: <@{user_id}> Jenkins release triggered for "
4925
+ f"`{source_repo}` — waiting for build to finish before cascading "
4926
+ f"(up to 15 min)…",
4927
+ )
4928
+ success = _trigger_jenkins_release(repo, wait=wait_for_jenkins)
4929
+ logger.info(
4930
+ "Boss manage_release: release for %s by %s (wait=%s, success=%s)",
4931
+ source_repo, user_id, wait_for_jenkins, success,
4932
+ )
4915
4933
  if not success:
4916
- return json.dumps({"status": "failed", "repo": source_repo, "error": "Jenkins release trigger failed — check logs"})
4934
+ # When wait=True, success=False means trigger or build failed/timed out.
4935
+ err = (
4936
+ "Jenkins build did not finish successfully (failed or timed out >15 min) — "
4937
+ "cascade skipped. Check Jenkins console."
4938
+ ) if wait_for_jenkins else "Jenkins release trigger failed — check logs"
4939
+ return json.dumps({"status": "failed", "repo": source_repo, "error": err})
4917
4940
  store.clear_pending_releases(source_repo)
4918
4941
 
4919
- # Cascade immediately if release_and_cascade, or if AUTO_COMMIT=true
4920
- from .config_loader import resolve_auto_commit as _resolve_auto_commit
4921
- do_cascade = (operation == "release_and_cascade") or _resolve_auto_commit(repo, cfg_loader.sentinel)
4922
4942
  if do_cascade:
4923
4943
  artifact_id = get_artifact_id(repo.local_path)
4924
4944
  new_version = get_release_version(repo.local_path)