Skip to content

Conversation

@mariomac
Copy link

This PR simplifies elegant shutdown by sharing a single channel for all the components that want to listen for a shutdown signal.

Instead of a global variable, ideally this could be achieved by passing a cancellable context to all the running operations but the pipes library is not yet prepared for that (in my to-do list).

@mariomac mariomac requested review from KalmanMeth and eranra April 25, 2022 10:54
@codecov-commenter
Copy link

Codecov Report

Merging #190 (10a217c) into main (43ca3a2) will decrease coverage by 0.29%.
The diff coverage is 81.81%.

@@            Coverage Diff             @@
##             main     #190      +/-   ##
==========================================
- Coverage   58.55%   58.25%   -0.30%     
==========================================
  Files          58       58              
  Lines        3373     3349      -24     
==========================================
- Hits         1975     1951      -24     
  Misses       1269     1269              
  Partials      129      129              
Flag Coverage Δ
unittests 58.25% <81.81%> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/pipeline/extract/aggregate/aggregates.go 90.56% <0.00%> (-0.35%) ⬇️
pkg/pipeline/ingest/ingest_collector.go 63.63% <0.00%> (+1.53%) ⬆️
pkg/pipeline/encode/encode_prom.go 81.69% <100.00%> (-0.25%) ⬇️
pkg/pipeline/ingest/ingest_file.go 47.36% <100.00%> (-1.79%) ⬇️
pkg/pipeline/ingest/ingest_grpc.go 67.74% <100.00%> (-1.96%) ⬇️
pkg/pipeline/ingest/ingest_kafka.go 82.29% <100.00%> (-3.57%) ⬇️
pkg/pipeline/utils/exit.go 100.00% <100.00%> (ø)
pkg/pipeline/write/write_loki.go 65.53% <100.00%> (-0.58%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43ca3a2...10a217c. Read the comment docs.

@mariomac mariomac merged commit f13dc86 into netobserv:main Apr 25, 2022
@mariomac mariomac deleted the simple-shutdown branch April 25, 2022 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants