Skip to content

Conversation

@menahyouyeah
Copy link
Contributor

Merge before/after: Dependent or prerequisite PRs
Merge before #9928

Description
Add clean up disk space step in the github workflow, otherwise the Linux integration tests fails with panic.go:615: docker build failure: write /var/lib/docker/tmp/GetImageBlob864252763: no space left on device. Please fix the Dockerfile and try again..

@menahyouyeah menahyouyeah requested a review from a team as a code owner December 8, 2025 19:56
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @menahyouyeah, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily addresses a critical issue causing Linux integration tests to fail due to insufficient disk space in the GitHub workflow by adding a necessary cleanup step. Beyond this immediate fix, it includes a comprehensive update of several golang.org/x dependencies, bringing in numerous internal improvements, refactorings, and bug fixes across cryptographic, networking, and terminal interaction components. These updates enhance the project's stability, security, and performance by aligning with the latest upstream changes and best practices.

Highlights

  • Dependency Updates: Updated several golang.org/x modules including crypto, net, term, and text to their latest versions, ensuring the project benefits from the newest features, bug fixes, and security patches.
  • GitHub Workflow Fix: Introduced a disk space cleanup step in the GitHub workflow to prevent Linux integration tests from failing due to 'no space left on device' errors during Docker builds.
  • Refactoring of SHA3 and SHAKE Implementations: The vendor/golang.org/x/crypto/sha3 package was refactored to wrap the standard library's crypto/sha3 for SHA3 and SHAKE functions, simplifying the codebase and leveraging official implementations. Legacy Keccak functions were moved to dedicated files.
  • Improved Buffer Overlap Checks in Chacha20Poly1305: Added new panic checks in chacha20poly1305 to detect invalid buffer overlaps between output and additional authenticated data, enhancing cryptographic safety.
  • SSH Forwarding Enhancements: Refactored SSH TCP and Unix socket forwarding logic to handle hostnames more explicitly, use netip.ParseAddr for robust IP parsing, and improve internal management of forwarded connections.
  • HTTP/2 Framer and Gzip Reader Optimizations: Optimized HTTP/2 framer by splitting ReadFrame into ReadFrameHeader and ReadFrameForHeader for more granular control, and improved gzipReader performance by implementing a sync.Pool for gzip.Reader instances.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/integration-linux.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates several Go dependencies, which brings in a number of upstream fixes and improvements. These include security enhancements like added bounds checks in the SSH package and buffer overlap checks in chacha20poly1305, as well as performance optimizations such as gzip.Reader pooling in the HTTP/2 transport. Overall, these are valuable updates. However, I've identified a potential memory leak in the updated vendored HTTP/2 code that should be addressed.

n.addBytes(-n.bytes)

q := n.q
ws.queuePool.put(&q)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The removal of n.q.s = nil (from the previous version of the code) without a replacement to clear the slices in n.q appears to introduce a memory leak. The writeQueue struct was refactored to use currQueue and nextQueue, but these are not being cleared on the priorityNode instance (n) which may be kept in ws.closedNodes.

The call to ws.queuePool.put(&q) operates on a copy of n.q, so n.q itself is not modified. To prevent the memory leak, the queue slices on n.q should be cleared after this line.

Suggested fix:

	ws.queuePool.put(&q)
	n.q.currQueue = nil
	n.q.nextQueue = nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant