fix: add SSRF timeout configuration and validation checks#32483
fix: add SSRF timeout configuration and validation checks#32483JaneCrystall wants to merge 3 commits into
Conversation
Summary of ChangesHello @JaneCrystall, 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 addresses an issue where HTTP Request nodes in workflows would prematurely time out due to hardcoded 120-second limits within the Squid SSRF proxy. The changes introduce configurable Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
The pull request introduces configurable timeout settings for the SSRF proxy, addressing a hardcoded timeout issue in Squid. This change enhances the flexibility and reliability of long-running HTTP requests within the workflow. The changes include adding new environment variables, updating Docker Compose configurations, and modifying the Squid template. Additionally, new test cases have been added to validate these configurations, ensuring proper integration and functionality. The changes are well-documented and appear to resolve the reported issue effectively.
|
Thanks for the contribution. This PR has been open for more than three months and the CI checks are currently failing, so we're closing it as stale to keep the review queue manageable. If this is still relevant, please feel free to reopen or submit a new PR with the failing checks addressed. |
Important
Fixes #<issue number>.Summary
fix #31098
This PR fixes the workflow HTTP Request node timing out at around 120 seconds, even when HTTP_REQUEST_MAX_READ_TIMEOUT is set higher.
1. Root cause
The request goes through ssrf_proxy (Squid) first, and Squid had hardcoded timeouts in squid.conf.template:
So the proxy terminated long-running requests before app-level timeout settings could take effect.
2. Changes made
Made Squid timeouts configurable via environment variables in squid.conf.template:
Added default timeout variables (seconds) in .env.example:
Passed new variables into the ssrf_proxy service in docker-compose-template.yaml:
Regenerated compose output:
3. Test/validation updates
Since similar config tests already exist, this PR extends pytest_config_tests.py to verify:
4. Verification run
pytest_config_tests.py
Result: All tests passed!
5. Impact
SSRF proxy timeout is now configurable (default 1200s) instead of fixed at 120s, preventing premature proxy-layer timeout for long-running HTTP node requests.
Screenshots
Checklist
make lintandmake type-check(backend) andcd web && npx lint-staged(frontend) to appease the lint gods