Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test and fix for configuration reload #1808

Merged
merged 5 commits into from
Oct 14, 2022
Merged

add test and fix for configuration reload #1808

merged 5 commits into from
Oct 14, 2022

Conversation

mmetc
Copy link
Contributor

@mmetc mmetc commented Oct 13, 2022

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2022

Codecov Report

Merging #1808 (180d50b) into master (7144dca) will decrease coverage by 0.37%.
The diff coverage is 11.53%.

@@            Coverage Diff             @@
##           master    #1808      +/-   ##
==========================================
- Coverage   52.94%   52.57%   -0.38%     
==========================================
  Files         148      148              
  Lines       19855    19878      +23     
==========================================
- Hits        10513    10451      -62     
- Misses       8171     8261      +90     
+ Partials     1171     1166       -5     
Flag Coverage Δ
func-crowdsec 45.11% <11.53%> (-6.48%) ⬇️
func-cscli 42.55% <ø> (+0.04%) ⬆️
unit-linux 63.85% <ø> (-0.09%) ⬇️
unit-windows 52.95% <ø> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
cmd/crowdsec/serve.go 22.34% <11.53%> (-18.74%) ⬇️
cmd/crowdsec/api.go 51.85% <0.00%> (-27.78%) ⬇️
pkg/cwhub/install.go 44.61% <0.00%> (-3.08%) ⬇️
pkg/cwhub/download.go 50.72% <0.00%> (-1.45%) ⬇️
pkg/cwhub/loader.go 64.72% <0.00%> (-0.93%) ⬇️
cmd/crowdsec-cli/machines.go 54.51% <0.00%> (+1.12%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mmetc mmetc changed the title add tests for configuration reload add tests and fix for configuration reload Oct 13, 2022
@mmetc mmetc changed the title add tests and fix for configuration reload add test and fix for configuration reload Oct 13, 2022
example: run crowdsec, disable agent in the config file, reload config.
Now there is no agent but the signal loop believes there is, so
triggering a reload configuration again will make the process hang
forever.
This commit updates the configuration in the signal loop with the one
returned by the signal handler.
@mmetc mmetc changed the title add test and fix for configuration reload [wip] add test and fix for configuration reload Oct 14, 2022
@mmetc mmetc changed the title [wip] add test and fix for configuration reload add test and fix for configuration reload Oct 14, 2022
Copy link
Contributor

@sabban sabban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mmetc mmetc merged commit 708fa82 into master Oct 14, 2022
@mmetc mmetc deleted the mm-trigger-reload branch October 14, 2022 13:48
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.

4 participants