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

fix: piping input in gator #2589

Merged
merged 7 commits into from
Feb 22, 2023

Conversation

acpana
Copy link
Contributor

@acpana acpana commented Feb 17, 2023

fixes #2582

if err != nil {
return nil, fmt.Errorf("getting stdin info: %w", err)
}

if stdinfo.Size() == 0 {
Copy link
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>
@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2023

Codecov Report

Base: 53.68% // Head: 53.67% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (9c5907d) compared to base (4ed4663).
Patch coverage: 0.00% of modified lines in pull request are covered.

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.

Impacted Files Coverage Δ
pkg/gator/reader/filereader.go 0.00% <0.00%> (ø)
...onstrainttemplate/constrainttemplate_controller.go 57.17% <0.00%> (-0.96%) ⬇️
pkg/readiness/object_tracker.go 83.98% <0.00%> (+1.06%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
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

Copy link
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