feat: support gron output formatting - #546
Open
michaeladler wants to merge 1 commit into
Open
michaeladler wants to merge 1 commit into
michaeladler wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #546 +/- ##
==========================================
- Coverage 82.43% 82.34% -0.10%
==========================================
Files 100 103 +3
Lines 3878 4130 +252
==========================================
+ Hits 3197 3401 +204
- Misses 680 728 +48
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
michaeladler
force-pushed
the
feat/gron
branch
2 times, most recently
from
October 1, 2026 07:21
854fde0 to
ada553b
Compare
stormc
reviewed
Oct 1, 2026
| contentType, _, _ := mime.ParseMediaType(resp.Header.Get("Content-Type")) | ||
| if strings.EqualFold(contentType, "application/gron") { | ||
| if b.Filter != "" { | ||
| return fault.New("cannot apply filter to application/gron response") |
Collaborator
There was a problem hiding this comment.
Hm, why can't we? It's just serialized JSON explicitly spelling out the path in every line. So, technically, we can do filtering before doing that?
Member
Author
There was a problem hiding this comment.
Well we could, but then we would have to first decode the response into JSON, run the jq-filter against it and then encode again to gron. Worth it? Currently we have not vendored the unmarshalling from gron.
stormc
reviewed
Oct 1, 2026
michaeladler
force-pushed
the
feat/gron
branch
from
October 1, 2026 08:50
ada553b to
2d0f674
Compare
Support 'application/gron' content negotiation for standard requests.
For SSE streams ('text/event-stream'), support gron formatting per event
payload via 'wfxctl job events --format gron'.
This simplifies shell script filtering by eliminating the need to parse
JSON.
Signed-off-by: Michael Adler <michael.adler@siemens.com>
michaeladler
force-pushed
the
feat/gron
branch
from
October 1, 2026 10:13
2d0f674 to
9976398
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Support
application/groncontent negotiation for standard requests.For SSE streams (
text/event-stream), support gron formatting per event payload viawfxctl job events --format gron.This simplifies shell script filtering by eliminating the need to parse JSON.
Issues Addressed
List and link all the issues addressed by this PR.
Change Type
Please select the relevant options:
Checklist