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

cmd/archive: output archive to stdout if - is passed as --archive-out #3797

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

roobre
Copy link
Member

@roobre roobre commented Jun 17, 2024

What?

This PR allows k6 to output archives to stdout when the special value - is used as the argument to --archive-out.

Why?

The only current way I know of to tell k6 to output an archive to stdout is to specify --archive-out=/dev/stdout. However, this relies on /dev existing, which in some fringe cases may not be the case, e.g. when running inside a chroot.

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make tests) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

https://github.com/grafana/sm-k6-archiver/pull/25

@roobre roobre requested a review from a team as a code owner June 17, 2024 14:27
@roobre roobre requested review from codebien and olegbespalov and removed request for a team June 17, 2024 14:27
@CLAassistant
Copy link

CLAassistant commented Jun 17, 2024

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.86%. Comparing base (23d8f91) to head (59ffa06).

Current head 59ffa06 differs from pull request most recent head 2e5f64e

Please upload reports for the commit 2e5f64e to get more accurate results.

Files Patch % Lines
cmd/archive.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3797      +/-   ##
==========================================
- Coverage   71.87%   71.86%   -0.01%     
==========================================
  Files         291      291              
  Lines       21260    21263       +3     
==========================================
+ Hits        15280    15281       +1     
- Misses       4916     4918       +2     
  Partials     1064     1064              
Flag Coverage Δ
ubuntu 71.81% <66.66%> (-0.01%) ⬇️
windows 71.71% <66.66%> (+0.01%) ⬆️

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.

cmd/archive.go Outdated Show resolved Hide resolved
@roobre roobre force-pushed the archive-stdout branch 2 times, most recently from b77ab02 to 322f998 Compare June 18, 2024 14:59
@roobre roobre requested review from a team and olegbespalov and removed request for a team June 18, 2024 15:00
olegbespalov
olegbespalov previously approved these changes Jun 18, 2024
cmd/archive.go Outdated Show resolved Hide resolved
@roobre roobre changed the title cmd/archive: add --archive-stdout cmd/archive: output archive to stdout if - is passed as --archive-out Jun 18, 2024
@roobre roobre requested a review from olegbespalov June 18, 2024 15:38
@olegbespalov olegbespalov added breaking change for PRs that need to be mentioned in the breaking changes section of the release notes documentation-needed A PR which will need a separate PR for documentation labels Jun 18, 2024
@joanlopez joanlopez merged commit 4481771 into master Jun 19, 2024
22 checks passed
@joanlopez joanlopez deleted the archive-stdout branch June 19, 2024 14:54
@joanlopez joanlopez added this to the v0.52.0 milestone Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change for PRs that need to be mentioned in the breaking changes section of the release notes documentation-needed A PR which will need a separate PR for documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants