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

Split output of failurelogs' list results #4015

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

Conversation

tsatam
Copy link
Collaborator

@tsatam tsatam commented Dec 13, 2024

Which issue this PR addresses:

Fixes ARO-13611

What this PR does / why we need it:

This PR splits the logging output of k8s resource lists emitted during operation failures to output one object per-line, and to also log a "summary" of all objects (somewhat resembling oc get ${RESOURCE}'s default output format).

This is necessary as our log viewer has a presentation limit of 32767 characters per-field. This makes some output, such as our cluster operator output, currently unusable due to the sheer size of the list.

This PR also switches the JSON output from MarshalIndent to Marshal - in order to further reduce the character count of the resulting field. We can use tools such as jq or KQL's parse_json to consume this output and "re-pretty-print" if necessary.

Test plan for issue:

  • Unit tests were written to capture the existing behavior of the logger as well as the changes made within this PR
  • E2E passes for this change

Is there any documentation that needs to be updated for this PR?

No

How do you know this will function as expected in production?

Above tests will ensure this change has no unintended effects on production flows.

@tsatam tsatam force-pushed the tsatam/ARO-13611-split-failurelogs-output branch from 0869bcf to bb504e1 Compare December 13, 2024 19:47
@tsatam tsatam mentioned this pull request Dec 19, 2024
1 task
@tsatam
Copy link
Collaborator Author

tsatam commented Dec 20, 2024

/azp run ci

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

2 participants