Skip to content

Ref tomb#166

Open
mmetc wants to merge 23 commits intomasterfrom
ref-tomb
Open

Ref tomb#166
mmetc wants to merge 23 commits intomasterfrom
ref-tomb

Conversation

@mmetc
Copy link
Owner

@mmetc mmetc commented Feb 27, 2026

No description provided.

mmetc and others added 4 commits February 27, 2026 10:23
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@semanticdiff-com
Copy link

semanticdiff-com bot commented Feb 27, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  pkg/acquisition/modules/loki/run.go  74% smaller
  pkg/acquisition/modules/http/run.go  69% smaller
  pkg/acquisition/modules/victorialogs/run.go  65% smaller
  pkg/apiserver/apic_test.go  57% smaller
  pkg/acquisition/modules/s3/init.go  56% smaller
  pkg/acquisition/modules/loki/init.go  55% smaller
  pkg/acquisition/modules/victorialogs/init.go  55% smaller
  pkg/acquisition/modules/file/init.go  51% smaller
  pkg/acquisition/modules/wineventlog/init.go  47% smaller
  cmd/crowdsec/main.go  46% smaller
  pkg/acquisition/modules/kubernetesaudit/run.go  43% smaller
  pkg/acquisition/modules/http/init.go  42% smaller
  pkg/acquisition/modules/kafka/init.go  39% smaller
  pkg/acquisition/modules/kubernetesaudit/init.go  39% smaller
  pkg/csplugin/watcher.go  35% smaller
  pkg/acquisition/modules/wineventlog/run_windows.go  35% smaller
  cmd/crowdsec-cli/clinotifications/notifications.go  34% smaller
  cmd/crowdsec/crowdsec.go  34% smaller
  pkg/appsec/allowlists/allowlists.go  33% smaller
  pkg/csplugin/broker.go  30% smaller
  pkg/acquisition/modules/kafka/run.go  27% smaller
  pkg/acquisition/modules/file/run.go  27% smaller
  pkg/acquisition/modules/victorialogs/internal/vlclient/vl_client.go  26% smaller
  pkg/acquisition/modules/s3/run.go  26% smaller
  pkg/csplugin/broker_test.go  24% smaller
  pkg/acquisition/modules/s3/s3_test.go  24% smaller
  pkg/acquisition/modules/loki/internal/lokiclient/loki_client.go  21% smaller
  pkg/acquisition/modules/appsec/run.go  21% smaller
  pkg/longpollclient/client.go  20% smaller
  pkg/acquisition/modules/loki/loki_test.go  19% smaller
  pkg/acquisition/modules/kafka/kafka_test.go  19% smaller
  pkg/csplugin/broker_win_test.go  19% smaller
  pkg/acquisition/modules/victorialogs/victorialogs_test.go  18% smaller
  pkg/apiserver/apiserver.go  16% smaller
  cmd/crowdsec/serve.go  16% smaller
  pkg/csplugin/watcher_test.go  15% smaller
  pkg/acquisition/modules/kubernetesaudit/k8s_audit_test.go  15% smaller
  cmd/crowdsec/api.go  13% smaller
  pkg/acquisition/modules/file/file_test.go  12% smaller
  pkg/acquisition/modules/wineventlog/wineventlog_windows_test.go  10% smaller
  pkg/acquisition/modules/http/http_test.go  8% smaller
  pkg/apiserver/apic.go  7% smaller
  pkg/apiserver/papi.go  7% smaller
  pkg/acquisition/modules/s3/source.go  0% smaller
  pkg/acquisition/modules/wineventlog/stub.go  0% smaller
  pkg/apiserver/apic_metrics.go  0% smaller
  test/bats/00_wait_for.bats Unsupported file format
  test/bin/wait-for Unsupported file format
  test/lib/init/crowdsec-daemon Unsupported file format

@github-actions
Copy link

@mmetc: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind enhancement
  • /kind refactoring
  • /kind fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help mmetc manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@github-actions
Copy link

@mmetc: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area appsec
  • /area security
  • /area configuration
Details

I am a bot created to help mmetc manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mmetc and others added 16 commits February 27, 2026 15:10
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…mon teardown hang

- wait-for: add force-kill timer (SIGKILL after 2s) when matched process
  ignores SIGTERM, preventing asyncio.wait from blocking indefinitely
- wait-for: preserve match status in TimeoutError handler instead of
  unconditionally returning 241
- crowdsec-daemon: add 5s bounded wait in stop() with SIGKILL escalation,
  preventing teardown hang when daemon is stuck in shutdown loop
- Add regression test for slow-shutdown scenario in 00_wait_for.bats

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix nilerr lint: when ctx.Err() != nil, return the context error
instead of silently swallowing it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add nolint:contextcheck for context.Background() in server.Shutdown().
Using a fresh context is correct here since the parent ctx is already
cancelled.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove ctx field from LokiClient struct and the redundant
lc.ctx.Done() select cases. The stored context was always a parent
of (or identical to) the method parameter context, making it redundant.

Also use errors.Is() for context.Canceled comparison in tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove ctx field from VLClient struct and the redundant lc.ctx.Done()
select cases. Close resp.Body in Tail() error path and add defer close
in the reading goroutine. Explicitly ignore Stream() error in test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…entlog test API

- kafka ReadMessage: return nil instead of ctx.Err() on context
  cancellation, consistent with other acquisition modules
- wineventlog test: replace removed StreamingAcquisition with Stream,
  use context.WithCancel instead of tomb.Tomb

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant