From e7bf277fb9e86d5d7fbe788396ecd99f7bb10541 Mon Sep 17 00:00:00 2001 From: Maximilian Eibl Date: Fri, 4 Sep 2026 15:38:10 +0200 Subject: [PATCH] Add v1.0.1 release notes documenting removal of client filter logic --- RELEASE_NOTES.md | 8 ++++++++ upload_release.py | 48 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 RELEASE_NOTES.md diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md new file mode 100644 index 0000000..63f9726 --- /dev/null +++ b/RELEASE_NOTES.md @@ -0,0 +1,8 @@ +# LOGAR Release v1.0.1 + +### Changes in this Release: +- **Removed Client Filter Logic**: Removed restrictive source-level noise filtering on edge forwarders. Clients now collect and stream all candidate events from `INFO` up to `ERROR` over the lookback window instead of discarding them at the source. +- **State Tracking & Deduplication**: Added persistent client state tracking (`client_state.json`) with journalctl cursors and Windows Event Log record numbers to guarantee that previously transmitted events are never resent. +- **24-Hour Lookback Window**: Forwarders now scan and upload events from the last 24 hours (default `--hours 24`), skipping older entries. +- **Lightweight Distribution Structure**: Cleaned `out/` to strictly contain deployment documentation and sample configurations. +- **Automated Gitea CI/CD**: Integrated push testing workflow (`ci.yml`) and automated release asset packaging (`release.yml`). diff --git a/upload_release.py b/upload_release.py index bc796ed..2af8b4f 100644 --- a/upload_release.py +++ b/upload_release.py @@ -72,6 +72,24 @@ def create_or_get_release(base_url, repo, tag, token, title=None, notes=None): with urllib.request.urlopen(check_req) as resp: existing = json.loads(resp.read().decode("utf-8")) print(f"[*] Found existing release for tag {tag} (ID: {existing['id']})") + if notes or title: + patch_url = f"{base_url}/api/v1/repos/{repo}/releases/{existing['id']}" + patch_payload = {} + if title: + patch_payload["name"] = title + if notes: + patch_payload["body"] = notes + patch_req = urllib.request.Request( + patch_url, + data=json.dumps(patch_payload).encode("utf-8"), + headers=headers, + method="PATCH" + ) + try: + with urllib.request.urlopen(patch_req) as p_resp: + print(f"[+] Updated release description for tag {tag}") + except Exception as e: + print(f"[!] Warning: Could not update existing release description: {e}") return existing["id"] except urllib.error.HTTPError: pass @@ -92,16 +110,19 @@ def create_or_get_release(base_url, repo, tag, token, title=None, notes=None): def main(): parser = argparse.ArgumentParser(description="Upload LOGAR compiled binaries directly to Gitea Release") - parser.add_argument("--tag", default=os.environ.get("GITEA_REF_NAME"), help="Release tag name (e.g. v1.0.0)") + parser.add_argument("--tag", default=os.environ.get("GITEA_REF_NAME"), help="Release tag name (e.g. v1.0.1)") parser.add_argument("--token", default=os.environ.get("GITEA_TOKEN"), help="Gitea Personal Access Token (or set GITEA_TOKEN env var)") parser.add_argument("--url", default=DEFAULT_GITEA_URL, help="Base Gitea instance URL") parser.add_argument("--repo", default=DEFAULT_REPO, help="Repository owner/name") + parser.add_argument("--title", default=os.environ.get("RELEASE_TITLE"), help="Release title") + parser.add_argument("--notes", default=os.environ.get("RELEASE_NOTES"), help="Release description / notes") + parser.add_argument("--notes-file", default=None, help="Path to markdown file with release notes") parser.add_argument("--skip-build", action="store_true", help="Skip running package_dist.py before upload") args = parser.parse_args() tag = args.tag if not tag: - tag = input("Enter tag name (e.g. v1.0.0): ").strip() + tag = input("Enter tag name (e.g. v1.0.1): ").strip() token = args.token if not token: @@ -111,6 +132,27 @@ def main(): print("[!] Tag and Token are required.") sys.exit(1) + # Resolve release notes + notes = args.notes + if not notes and args.notes_file and os.path.exists(args.notes_file): + with open(args.notes_file, "r", encoding="utf-8") as nf: + notes = nf.read() + elif not notes and os.path.exists("RELEASE_NOTES.md"): + with open("RELEASE_NOTES.md", "r", encoding="utf-8") as nf: + notes = nf.read() + elif not notes: + notes = ( + f"## LOGAR Release {tag}\n\n" + "### Changes in this Release:\n" + "- **Removed Client Filter Logic**: Removed restrictive source-level noise filtering on edge forwarders. Clients now stream all candidate events from `INFO` up to `ERROR` across the lookback window instead of discarding them at the source.\n" + "- **State Tracking & Deduplication**: Added persistent state tracking (`client_state.json`) with cursor and record number deduplication so previously transmitted events are never resent.\n" + "- **24-Hour Lookback Window**: Forwarders now scan and upload events from the last 24 hours, skipping older entries.\n" + "- **Lightweight Distribution Structure**: Cleaned `out/` to strictly contain deployment documentation and sample configurations.\n" + "- **Automated Gitea CI/CD**: Integrated push testing workflow (`ci.yml`) and automated release asset packaging (`release.yml`).\n" + ) + + title = args.title or f"LOGAR Release {tag}" + if not args.skip_build: print("[*] Assembling compiled binaries...") package_dist.main() @@ -121,7 +163,7 @@ def main(): sys.exit(1) print(f"[*] Connecting to Gitea: {args.url} (repo: {args.repo})...") - release_id = create_or_get_release(args.url, args.repo, tag, token) + release_id = create_or_get_release(args.url, args.repo, tag, token, title=title, notes=notes) print(f"[*] Uploading binary assets from '{dist_dir}'...") for f in sorted(os.listdir(dist_dir)):