116 Commits

Author SHA1 Message Date
Rainer Gerhards
58926a8aab
CI: working towards better kafka coverage in codecov (#6103)
* CI: working towards better kafka coverage in codecov
2025-09-09 12:04:07 +02:00
Rainer Gerhards
5a7518a13e
CI: remove invalid codecov call from non-codecov test
This was a regression from a few days ago. Undoing it.
2025-09-08 17:46:01 +02:00
Rainer Gerhards
9e0ecb5f8d
ci: improve Codecov uploads; deflake kafka topics
Motivation: code coverage reports were incomplete. This lays a better
base for consistent reporting via GitHub Actions, with room for follow-ups.
It also removes a test flake source in Kafka jobs.

Impact: CI/tests only; no runtime behavior or ABI changes expected.

Before: Coverage uploads were inconsistent; Kafka tests could hang while
reading from /dev/urandom to generate topic names.
After: Coverage is collected with lcov and uploaded via a dedicated GH
Action; Kafka topics use fast $RANDOM-based hex, avoiding early-boot
entropy stalls.

Technical details:
- Add two workflows: "codecov base" and "codecov kafka" on Ubuntu 24.04.
  Use lcov capture with unexecuted blocks and prune common noise; upload
  with token for same-repo PRs and tokenless for forks.
- Update .codecov.yml: add path fixes for container (/rsyslog) and
  runner layouts; explicitly set comment: false and patch: false.
- Bump actions/checkout to v4 in existing workflows; add an actionlint
  job to catch YAML problems early.
- Switch codecov jobs in container matrix to 24.04 images.
- Improve run-ci.sh lcov invocation to be more tolerant of line/macro
  mismatches.
- Testbench: replace /dev/urandom topic generation with 8-char hex from
  $RANDOM; adjust diag.sh path/quoting for zookeeper helper.
2025-09-08 16:02:01 +02:00
Rainer Gerhards
07dd4f46ff
Merge pull request #6096 from rgerhards/tsan-disable-imhttp
CI: disable TSAN chekcs for imhttp which fail due to civetweb
2025-09-06 11:32:32 +02:00
Rainer Gerhards
1965b506e5
CI: disable TSAN chekcs for imhttp which fail due to civetweb
The civetweb library is not packaged in a thread-safe way and as such
TSAN always fails due to a civetweb data race by calling gmtime.
Nothing to do so far against that.
2025-09-06 11:07:27 +02:00
Rainer Gerhards
057de60f3c
CI: replace debian 11 with sid in test runs
We try sid to gain early access to new compiler versions. It needs
to be show if sid causes too many false positives (due to its own
instability) and if we manage to regenerate the compiler frequently
enough.
2025-09-05 17:44:49 +02:00
Rainer Gerhards
3014c2f02c
Merge pull request #6088 from rgerhards/codex/update-codecov-methods-in-run_checks-yaml
devtools: use codecov uploader in CI script
2025-09-05 09:19:37 +02:00
Rainer Gerhards
70455b8960
devtools: use codecov uploader in CI script
Replace deprecated bash uploader with Codecov's official uploader.
The script now downloads the uploader binary, verifies its SHA256
checksum, and runs it to submit coverage results.

The change keeps run-ci.sh CI-agnostic.

With the help of AI-Agent: ChatGPT
2025-09-04 17:59:49 +02:00
Rainer Gerhards
22f0814bfc
CI: upload coverage info for imjournal test run 2025-09-04 15:52:12 +02:00
Rainer Gerhards
e7e4bd8698
CI: run check actions also on configure.ac change 2025-09-02 21:48:57 +02:00
Rainer Gerhards
be3b0aeb81
Merge pull request #5966 from rsyslog/cursor/investigate-and-fix-netstream-driver-ca-chain-issue-1a3a
runtime: fix NetstreamDriverCAExtraFiles parsing
2025-09-02 09:44:46 +02:00
Rainer Gerhards
129e2e45f1
ci: cancel superseded workflow runs
Add concurrency groups with cancel-in-progress to all pull request
workflows so new pushes abort outdated jobs.

Most importantly this saves ressources and also makes follow-up
PR runs much quicker.

with the help of ChatGPT
2025-08-28 12:31:31 +02:00
Rainer Gerhards
8ce1876f7a
Merge pull request #6046 from rgerhards/statan-check
CI: ensure static analyzer script only runs when actually needed
2025-08-28 11:37:55 +02:00
Rainer Gerhards
9759e32bad
Merge pull request #6045 from rgerhards/welcome-fix
community: disable automatic welcome action
2025-08-28 11:15:32 +02:00
Rainer Gerhards
75514d1d45
CI: ensure static analyzer script only runs when actually needed
Also
- auto-abort on re-push
- some minor tweaks
2025-08-28 11:13:10 +02:00
Rainer Gerhards
d6c87402be
ci: add spellcheck workflow
Add a GitHub Actions job using codespell to check Sphinx docs in doc/source.
This helps catch spelling errors early and improves documentation quality.

With help from AI-Agent: ChatGPT
2025-08-28 11:00:26 +02:00
Rainer Gerhards
a8dd841f03
community: disable automatic welcome action
This does currently not work correctly. We need to fix it, but there
currently is no time to do that now.
2025-08-28 10:54:52 +02:00
Rainer Gerhards
3cdfdea244
Merge pull request #6041 from kevinbackhouse/actions-codeql
Add actions analysis
2025-08-27 21:34:10 +02:00
Rainer Gerhards
ee19477e91
Merge pull request #6040 from rgerhards/doc_build-action
CI: fix doc_build check which was not always built
2025-08-27 21:23:54 +02:00
Kevin Backhouse
525c424f8d
Add actions analysis 2025-08-27 17:59:04 +01:00
Rainer Gerhards
ec8884ba79
CI: fix doc_build check which was not always built
Too shallow fetch from github made trigger condition unreliable.
2025-08-27 18:31:48 +02:00
Rainer Gerhards
02f7685455
codeql: fix "master" branch reference 2025-08-27 18:14:22 +02:00
Rainer Gerhards
9927889112
CI: fix permission in github action 2025-08-27 17:08:49 +02:00
Rainer Gerhards
186e243bd2
debug version of welcome script 2025-08-27 16:54:54 +02:00
Rainer Gerhards
1142cf8947
community: some fixes to "welcome" helper action
Unfortuantely, this can only be seen in action once merged to main.
2025-08-27 15:58:20 +02:00
Rainer Gerhards
c50a262c7a
Merge pull request #6038 from rgerhards/ci-actions-auto-cancel2
CI: cancel hughe task automatically on all runners on re-push
2025-08-27 14:32:10 +02:00
Rainer Gerhards
d2742add4e
CI: cancel hughe task automatically on all runners on re-push
Saves ressources, gives faster follow-up build, save labor for
manual cancel.
2025-08-27 14:29:51 +02:00
Rainer Gerhards
4b46d33ad7
improve PR welcome message handling 2025-08-27 14:23:06 +02:00
Madhushree
8f4df7a334
docs: fix minor typos in docs/source (#6028)
- fixed typos, corrected small text issues, and adjusted minor wording in messageparser.rst and multi_ruleset.rst.
- removing second 'be' & changing the verb form from activate to activates.

Only updates to documentation files (.rst, .md, .txt) for minor fixes. No source code or runtime behavior is affected.
2025-08-27 14:12:14 +02:00
Rainer Gerhards
c3c2bac6c4
CI: fix welcome message activation mode to make it really work (#6036)
* CI: fix welcome message activation mode to make it really work

We need to run the repo-provided script to have sufficient acces rights.
Otherwise, it will not work with PRs from forked repos (which is the
norm).

Plus some robustness amendments.

* Update .github/workflows/contributor-welcome.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 13:00:33 +02:00
Rainer Gerhards
d081d89604
community: add welcome message to first few commits (#6032)
intent is two-fold:
- act welcoming and provide some guidance for PR contributors
- do a bit of checking so maintainer get's an idea if this might
  be a spammy account (the world is a bad place...). Also
  prevent rsyslog from being used for social engineering other
  repos.

This method will be improved in the future and is work in progress.

Note: rsyslog welcomes small PRs, even single typo fixes, when
they are useful to the project. We shall, however, reject frequent
single typo fixes from same account and ask them to combine the
commits. Reason is this might be a social engineering tactic to
make rsyslog itself or other repos build unrooted trust in the
account.
2025-08-27 09:25:17 +02:00
Cursor Agent
582d9d98e9 runtime: fix NetstreamDriverCAExtraFiles parsing
Multiple intermediate CAs were not honored because strtok() modified
the original config value at the first comma. This led to only the
first file being considered. This change preserves the original value
and validates files using a duplicate buffer.

Impact: Users can reliably specify multiple CA intermediates via
NetstreamDriverCAExtraFiles; TLS chains that require intermediates
now validate as expected. Tests added.

Before: parsing mutated the stored string, effectively truncating at
the first comma and ignoring subsequent CA files.

After: we strdup() for validation, leave the original string intact,
and set it only if all files are accessible. Error handling follows
existing RS_RET patterns; temporary buffer is freed on all paths.

Additionally, add a test (OpenSSL backend) that generates a root,
two intermediates, and leaf certs on both client and server. The test
verifies chains with openssl, aligns CN/PermittedPeer, and exercises
a full send/receive path to guard against regressions. Makefile is
updated to include the new test in TESTS and EXTRA_DIST.

Fixes: https://github.com/rsyslog/rsyslog/issues/5207
2025-08-25 11:38:21 +02:00
Rainer Gerhards
f17ad70f7e
ci: add clang static analyzer workflow via github action (#5981)
This replaces the former clang static analyzer check via buildbot, which needed quite some baby-sitting due to environment constraints. For the next time, run it via github action.

Note that we use the same core script to run the analyzer like we did previously. This means we can also switch back with ease.
2025-08-21 19:10:01 +02:00
Rainer Gerhards
d445a33d6e
Merge pull request #5995 from alorbach/pr-issue-5989
ci: add Fedora 41/42 and Debian 13 dev-base images
2025-08-21 12:54:19 +02:00
Cursor Agent
574ad7c3b4 ci: add Fedora 41/42 and Debian 13 dev-base images
Modernize our dev/CI matrix to match current distro lines and reduce
toolchain drift. This keeps project-provided images aligned with what
contributors run locally and moves us toward “project-supported” bases.

Impact: CI matrix refresh only; no runtime behavior change intended.

Before: CI used Fedora 35/36 and Debian 10/11 dev-base images.
After: CI uses Fedora 41/42 and Debian 11/13 dev-base images.

Update run_checks.yml to use new container tags and pass consistent
configure extras (incl. enabling dtls in relevant jobs). Add Dockerfiles
and helper scripts for debian:13 and fedora:{41,42}. Bump the cached
ZooKeeper tarball to 3.9.3 across legacy images. Debian 13 adds a small
libgcrypt-config wrapper that defers to pkg-config to keep builds working.
Fedora images refresh toolchains (clang18 et al.) and re-sync module flags.
No API/ABI changes; this is build/CI plumbing only.

closes: https://github.com/rsyslog/rsyslog/issues/5989
2025-08-21 12:06:14 +02:00
Rainer Gerhards
4c7d85d04c
Update .github/instructions/modules.plugins.instructions.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-20 10:31:23 +02:00
Rainer Gerhards
a29cbd6d09
ci: add copilot support instruction files
This adds repository-level instructions to guide GitHub Copilot in
producing higher quality and safer pull requests. It is part of the
"AI First" approach, aiming to improve contributor experience and
reduce review friction.

Impact: no change to runtime or user-facing behavior.

The new files under `.github/` provide scoped rules for Copilot across
documentation, plugins, and contrib modules. They emphasize alignment
with AGENTS.md, developer checklists, and module maps. Guardrails cover
quoting, doc structure, config conventions, and mandatory source
citations. The intent is to ensure AI-assisted edits follow existing
rsyslog patterns and remain minimal and test-backed.

These changes are additive only and have no effect on rsyslog code,
APIs, or operational semantics. They prepare the repo for more
consistent AI-assisted contributions.
2025-08-20 10:24:55 +02:00
Rainer Gerhards
97c7c68f5c
docs: streamline contrib templates and commit guidance
This modernizes contributor experience by simplifying PR templates and
removing the lengthy GDPR disclaimer that often discouraged or confused
new contributors. The update encourages more participation and shows how
responsible AI can be used to improve open source workflows.

Impact: none on runtime behavior; contributor workflow improved.

Before: PR template included long GDPR block; commit message rules were
scattered and partly implicit.
After: PR template is concise, GDPR text removed, and commit assistant
usage is documented across README, CONTRIBUTING, and AGENTS.md.

Technical changes include:
- PR template: drop GDPR notice, add commit-assistant references.
- CONTRIBUTING.md: add explicit commit rules and workflow guidance.
- AGENTS.md: require canonical base prompt and commit-first workflow.
- README.md: point to assistant and updated guidance.
- base_prompt.txt: enforce "Findings:" colon format.
- Minor formatting corrections in comments.
2025-08-18 13:59:53 +02:00
Rainer Gerhards
081df56c2c
CI: suppress unneded sphinx output during CI builds
We are interested in errors and warnings. The rest, like progress
indicator, just distracts.
2025-08-14 09:29:49 +02:00
619b5983c7 omazurevenethubs: fix compiler warning
- docker: add libqpid-proton build deps to ubuntu/24.04 base container
- CI: build omazureventhubs in run_checks ubuntu/24.04

closes: https://github.com/rsyslog/rsyslog/issues/5895
2025-08-04 12:43:45 +02:00
Rainer Gerhards
3ddd711ddb
CI: add code style check
Introduce a GitHub Actions workflow that automatically runs
devtools/format-code.sh on every pull request touching source files.
If formatting changes are detected, the check fails and provides clear
instructions for contributors—run the formatter locally and enable
“Allow edits from maintainers” so fixes can be applied.

This prevents code‑style drift and eliminates style‑only update noise.
2025-07-30 12:32:53 +02:00
Rainer Gerhards
6c027f9a8f
CI: Enhance PR validation and update branch name
This patch improves the GitHub Actions PR validation workflow:
- Added comprehensive inline documentation for clarity.
- Corrected branch reference from 'master' to 'main'
  in `tests/CI/PR_validation.sh`.

These changes enhance CI/CD clarity and maintainability.

With support from AI Agents: Gemini
2025-07-22 17:08:06 +02:00
Rainer Gerhards
17963c9c3c
ci: simplify compile check workflow and guarantee exit status
- Consolidate change detection into a single “Check for doc changes” step
- Remove separate determine_changes_type and doc_only_success_check jobs
- Ensure the CI job always returns an exit status (satisfies branch protection)
- Update checkout action version and file‐pattern list for code changes
- Bump copyright year to 2025
2025-07-22 09:06:15 +02:00
Rainer Gerhards
7a6f8f71ad
Merge pull request #5834 from rgerhards/tests-autobuild
testbench: bootstrap build setup for direct test runs
2025-07-20 15:48:02 +02:00
Rainer Gerhards
876c84699b
Add doc build workflow for PRs 2025-07-20 15:31:01 +02:00
Rainer Gerhards
e5791212a2 Add documentation build workflow
Create doc_build.yml for GitHub Actions. The workflow builds
Sphinx docs when *.rst files under doc/ change. It still runs for
other pull requests but exits early so branch protection succeeds
without running make.

AI-Agent: Codex
2025-07-20 08:11:03 +02:00
Rainer Gerhards
179befb2e1 ci: add yamllint workflow for YAML validation
Signed-off-by: Codex <codex@openai.com>
2025-07-19 15:40:11 +02:00
Rainer Gerhards
0ed0710513
testbench: bootstrap build setup for direct test runs
AI tools and newcomers often execute test scripts
without running autoreconf, configure or make. This
causes missing binaries and confusing failures.

The diag.sh stub now self-bootstraps when needed:
- Run autoreconf -fi if configure is missing.
- Run configure with testbench flags if Makefile is
  missing.
- Build tests/tcpflood and tools/rsyslogd via
  make check TESTS="".

This makes tests more robust against improper
environment setup.
2025-07-19 14:15:21 +02:00
Rainer Gerhards
f274d74b38
CI: run code checks only when code files were changed 2025-07-15 14:59:59 +02:00
Rainer Gerhards
6bba692bba
dev doc: add design notes to queue subsystem files 2025-07-12 12:23:46 +02:00