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

Progress bar for one shot acquisition (time machine / cold logs) #2789

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mmetc
Copy link
Contributor

@mmetc mmetc commented Jan 26, 2024

This also disables prometheus metrics in one shot mode because in most cases the port is already taken by LAPI.

Should work for all datasources, but tested only with files.

Windows should work the same as linux if virtual terminal processing is enabled. If not (win < 10? or it depends on the terminal application?), we should do the same as https://github.com/martinlindhe/color/blob/02ab2eaae10c365c22e6f6f2dac0d9cd496f3016/color_windows.go#L9

I had issues building in windows so would like some testing

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 fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help the crowdsecurity developers 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.

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 the crowdsecurity developers 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.

@mmetc mmetc added the kind/enhancement New feature or request label Jan 26, 2024
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: Patch coverage is 59.34066% with 37 lines in your changes are missing coverage. Please review.

Project coverage is 57.93%. Comparing base (8e9e091) to head (fc1aa39).

Files Patch % Lines
pkg/acquisition/progressbar.go 16.12% 26 Missing ⚠️
pkg/types/logging.go 79.62% 7 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2789      +/-   ##
==========================================
- Coverage   57.98%   57.93%   -0.06%     
==========================================
  Files         240      242       +2     
  Lines       31040    31082      +42     
==========================================
+ Hits        18000    18008       +8     
- Misses      11411    11441      +30     
- Partials     1629     1633       +4     
Flag Coverage Δ
bats 37.96% <59.34%> (-0.02%) ⬇️
unit-linux 52.20% <45.34%> (-0.06%) ⬇️
unit-windows 47.70% <6.97%> (-0.08%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mmetc mmetc changed the title Progress bar for one shot acquisition (time machine -- cold logs) Progress bar for one shot acquisition (time machine / cold logs) Jan 26, 2024
@mmetc mmetc requested a review from buixor January 26, 2024 12:57
@mmetc mmetc added this to the 1.6.1 milestone Jan 26, 2024
@mmetc mmetc marked this pull request as draft January 26, 2024 13:55
@mmetc mmetc marked this pull request as ready for review January 30, 2024 12:34
@mmetc mmetc marked this pull request as draft January 30, 2024 13:07
@mmetc mmetc force-pushed the oneshot branch 2 times, most recently from 88af598 to 415a641 Compare January 31, 2024 14:18
@mmetc mmetc removed this from the 1.6.1 milestone Jan 31, 2024
@mmetc mmetc force-pushed the oneshot branch 2 times, most recently from 77e5ae5 to 18d7d55 Compare February 13, 2024 21:03
This also disables prometheus metrics in one shot mode because
in most cases the port is already taken by LAPI.
This has a log formatter that clears each line before printing overflow information.

TODO: fix for windows as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request needs/area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant