Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(plugin): expand logs pretty cmd buffer size #7281

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

Merged
merged 3 commits into from
Apr 29, 2025
Merged

fix(plugin): expand logs pretty cmd buffer size #7281

merged 3 commits into from
Apr 29, 2025

Conversation

armru
Copy link
Member

@armru armru commented Apr 2, 2025

Release Notes

cnpg logs pretty command now has a bigger default buffer size.

Closes #7183

@armru armru added the do not backport This PR must not be backported - it will be in the next minor release label Apr 2, 2025
@armru armru requested a review from a team as a code owner April 2, 2025 14:21
@armru armru changed the title feat(plugin): add buffer flag to logs pretty cmd feat(plugin): add buffer-size flag to logs pretty cmd Apr 2, 2025
@mnencia
Copy link
Member

mnencia commented Apr 11, 2025

@armru In both the logpipe and the podlog writer, we utilize scanner.Buffer(make([]byte, 0, 4096), 1024*1024). This code allocates a 4KB buffer that can expand dynamically, if necessary, up to a maximum size of 1MB. I believe we can apply the same approach here and eliminate the need for the additional parameter.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 18, 2025
@armru armru changed the title feat(plugin): add buffer-size flag to logs pretty cmd fux(plugin): expand logs pretty cmd buffer size Apr 18, 2025
@armru armru added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 and removed do not backport This PR must not be backported - it will be in the next minor release labels Apr 18, 2025
@armru armru changed the title fux(plugin): expand logs pretty cmd buffer size fix(plugin): expand logs pretty cmd buffer size Apr 18, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 18, 2025
armru added 3 commits April 28, 2025 18:08
Closes #7183

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
@sxd
Copy link
Member

sxd commented Apr 28, 2025

/test depth=push feature_type=plugin test_level=4

Copy link
Contributor

@sxd, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/14712476883

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Apr 28, 2025
@sxd sxd merged commit 91aeecb into main Apr 29, 2025
36 of 37 checks passed
@sxd sxd deleted the dev/7183 branch April 29, 2025 21:09
cnpg-bot pushed a commit that referenced this pull request Apr 29, 2025
# Release Notes

`cnpg logs pretty` command now has a bigger default buffer size.

Closes #7183

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 91aeecb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-requested ◀️ This pull request should be backported to all supported releases lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged release-1.25 size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug/Feature]: kubectl-cnpg logs pretty exit on large log lines
5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.