Skip to content

Conversation

@taeold
Copy link
Contributor

@taeold taeold commented Sep 4, 2025

Add utility function required for remote source implementations.

@taeold
Copy link
Contributor Author

taeold commented Sep 4, 2025

/gemini review

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 introduces a new utility for cloning remote Git repositories to deploy functions, along with a helper for secure path resolution. The implementation is robust, with good error handling, retry logic for network operations, and comprehensive tests. I've provided a couple of suggestions to refactor parts of the remoteSource.ts file to improve code clarity and maintainability.

@taeold
Copy link
Contributor Author

taeold commented Sep 4, 2025

/gemini review

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 introduces a utility to clone remote Git repositories for deploying functions, along with a path resolution helper. The implementation is well-structured, using a GitClient interface for testability and providing helpful error messages for common failures. My review identified two high-severity issues: a potential bug in error handling where the original error object could be lost, making debugging difficult, and a lack of test coverage for the success paths of the main cloneRemoteSource function. Addressing these points will improve the robustness and reliability of this new feature.

@taeold taeold force-pushed the pr-remote-src-pr2-master branch from 779cf15 to 8dbca4b Compare September 4, 2025 21:22
@taeold taeold force-pushed the pr-remote-src-pr2-master branch from 8dbca4b to 920b86f Compare September 4, 2025 21:24
@taeold taeold marked this pull request as ready for review September 5, 2025 18:57
@taeold
Copy link
Contributor Author

taeold commented Sep 5, 2025

/gemini review

@taeold taeold requested a review from inlined September 5, 2025 21:37
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 introduces new utility functions for handling remote Git sources for function deployments. It adds cloneRemoteSource to clone a repository, along with a GitClient interface and a default implementation using spawnSync. It also includes a path helper resolveWithin to securely resolve subdirectories within a repository, preventing path traversal vulnerabilities. The changes are well-tested with new spec files for both remoteSource and pathUtils.

My review includes a couple of suggestions to improve code style and reduce duplication in the new remoteSource.ts file. Overall, the implementation is solid and the error handling is comprehensive.

@taeold taeold enabled auto-merge (squash) November 19, 2025 05:39
@taeold taeold merged commit b1c0572 into master Nov 19, 2025
77 of 78 checks passed
@taeold taeold deleted the pr-remote-src-pr2-master branch November 19, 2025 15:57
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Nov 19, 2025
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