Skip to content

fix: piping input in gator#2589

Merged
sozercan merged 7 commits into
open-policy-agent:masterfrom
acpana:acpana/gator-stdin
Feb 22, 2023
Merged

fix: piping input in gator#2589
sozercan merged 7 commits into
open-policy-agent:masterfrom
acpana:acpana/gator-stdin

Conversation

@acpana
Copy link
Copy Markdown
Contributor

@acpana acpana commented Feb 17, 2023

fixes #2582

Comment thread pkg/gator/reader/filereader.go Outdated
return nil, fmt.Errorf("getting stdin info: %w", err)
}

if stdinfo.Size() == 0 {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

so why is this breaking piping? from my understanding and offline convos, data is being actively piped so the buffer may not have data yet so we bail too early.

Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
@acpana acpana force-pushed the acpana/gator-stdin branch from f50d7ae to fc77db5 Compare February 21, 2023 18:24
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 21, 2023

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 53.67%. Comparing base (4ed4663) to head (9c5907d).
Report is 660 commits behind head on master.

Files with missing lines Patch % Lines
pkg/gator/reader/filereader.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2589      +/-   ##
==========================================
- Coverage   53.68%   53.67%   -0.01%     
==========================================
  Files         120      120              
  Lines       10634    10634              
==========================================
- Hits         5709     5708       -1     
- Misses       4496     4497       +1     
  Partials      429      429              
Flag Coverage Δ
unittests 53.67% <0.00%> (-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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@acpana acpana requested a review from maxsmythe February 21, 2023 18:39
Copy link
Copy Markdown
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM

@maxsmythe maxsmythe requested review from ritazh and sozercan February 21, 2023 20:31
Copy link
Copy Markdown
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM

@sozercan sozercan merged commit ab0c959 into open-policy-agent:master Feb 22, 2023
davis-haba pushed a commit to davis-haba/gatekeeper that referenced this pull request Mar 7, 2023
Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com>
davis-haba pushed a commit to davis-haba/gatekeeper that referenced this pull request Mar 8, 2023
Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com>
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.

Piping broken in gator command

4 participants