Skip to content

feat(source-file): Add custom http proxy support #62451

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

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

Conversation

aaronsteers
Copy link
Collaborator

@aaronsteers aaronsteers commented Jun 30, 2025

Loom Demo:

https://www.loom.com/share/0d54508a490844999ec9a073f82f4504

What

Adds custom HTTP Proxy support.

Within the config dictionary, we'll look for:

{
  ... # other config

  # Proxy config:
  "http_proxy": {  # Parent element for custom HTTP Proxy configuration
    "proxy_url": "https://path.to.my/proxy",
    "proxy_ca_certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n"
  }

Replaces:

TODO

  • Fix up unit tests. (They are stale.)

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

devin-ai-integration bot and others added 7 commits June 11, 2025 05:13
- Add proxy_url field to HTTPS provider configuration in spec.json
- Add ca_certificate field with airbyte_secret=true and multiline=true
- Implement proxy support in URLFile._open() method using smart_open transport_params
- Implement certificate handling using temporary files and requests verify parameter
- Add comprehensive unit tests for proxy and certificate functionality
- Maintain backward compatibility with existing configurations

Co-Authored-By: AJ Steers <[email protected]>
- Increment version from 0.5.33 to 0.6.0 in pyproject.toml and metadata.yaml
- Apply pre-commit formatting fixes (license headers, code style)
- Addresses CI failures for version increment and format checks

Co-Authored-By: AJ Steers <[email protected]>
- Add changelog entry for HTTP proxy URL and custom CA certificate support
- Addresses CI pre-release check failure for missing changelog entry

Co-Authored-By: AJ Steers <[email protected]>
- Add comprehensive proxy investigation plan document
- Add mitmproxy interception script with logging
- Add test configurations for proxy vs direct connection comparison
- Resources for new Devin session to investigate why proxy settings appear ignored

Co-Authored-By: AJ Steers <[email protected]>
Copy link

vercel bot commented Jun 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 2:07am

Copy link
Contributor

👋 Greetings, Contributor!

Here are some helpful tips and reminders for your convenience.

Helpful Resources

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • /format-fix - Fixes most formatting issues.
  • /bump-version - Bumps connector versions.
    • You can specify a custom changelog by passing changelog. Example: /bump-version changelog="My cool update"
    • Leaving the changelog arg blank will auto-populate the changelog from the PR title.
  • /run-cat-tests - Runs legacy CAT tests (Connector Acceptance Tests)
  • /build-connector-images - Builds and publishes a pre-release docker image for the modified connector(s).

📝 Edit this welcome message.

Copy link
Contributor

github-actions bot commented Jun 30, 2025

source-file Connector Test Results

63 tests   62 ✅  3s ⏱️
 1 suites   0 💤
 1 files     1 ❌

For more details on these failures, see this check.

Results for commit 3b55028.

♻️ This comment has been updated with latest results.

@aaronsteers aaronsteers changed the base branch from devin/1749618047-add-http-proxy-support to master June 30, 2025 21:40
@aaronsteers aaronsteers requested a review from pnilan June 30, 2025 21:47
Copilot

This comment was marked as outdated.

@aaronsteers aaronsteers requested review from bgroff and clnoll June 30, 2025 22:58
…le implementation (do not merge) (#62455)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: AJ Steers <[email protected]>
@aaronsteers
Copy link
Collaborator Author

aaronsteers commented Jun 30, 2025

/build-connector-images

Connector Image Build Started

  • This workflow will build the connector image and run basic tests.
  • The connector image(s) will be pushed to the GitHub Container Registry.

Check job output.
Connector Image Builds job completed. See logs for details.

@aaronsteers aaronsteers requested a review from Copilot June 30, 2025 23:44
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds support for custom HTTP proxy configuration (URL and CA certificate) for the file source connector.

  • Introduces a new http_proxy top-level config block in spec.json
  • Implements helper routines in proxy.py to install CA certs and set proxy env vars
  • Wires up Client to accept http_proxy, updates tests, docs, metadata, and version

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/integrations/sources/file.md Added v0.6.0 release entry for proxy support
airbyte-integrations/connectors/source-file/unit_tests/test_proxy_certificate_support.py New unit tests for proxy URL and CA certificate handling
airbyte-integrations/connectors/source-file/source_file/spec.json Added http_proxy schema block with proxy_url and proxy_ca_certificate
airbyte-integrations/connectors/source-file/source_file/proxy.py New configure_custom_http_proxy, _install_ca_certificate, and constants
airbyte-integrations/connectors/source-file/source_file/client.py Extended Client.__init__ to accept http_proxy and invoke proxy setup
airbyte-integrations/connectors/source-file/pyproject.toml Bumped version to 0.6.0 and added ruff
airbyte-integrations/connectors/source-file/metadata.yaml Updated dockerImageTag to 0.6.0
airbyte-integrations/connectors/source-file/integration_tests/proxy_test_config.json.template Initial proxy test config template
airbyte-integrations/connectors/source-file/integration_tests/proxy_intercept_script.py MITM-proxy intercept script for integration testing
Comments suppressed due to low confidence (3)

airbyte-integrations/connectors/source-file/source_file/client.py:263

  • The __init__ signature was extended with http_proxy but the docstring (or inline comment) wasn't updated to describe this new parameter. Please add or update the constructor doc to explain how to pass http_proxy and its format.
    def __init__(

airbyte-integrations/connectors/source-file/source_file/proxy.py:96

  • The docstring references a connector_config_dict, but the function parameters are http_proxy_config, proxy_url, and ca_cert_file_text. Please update the docstring to accurately describe these parameters and remove the outdated term.
) -> None:

docs/integrations/sources/file.md:301

  • [nitpick] Consider adding a sample http_proxy configuration snippet somewhere in this document so users know how to supply proxy_url and proxy_ca_certificate in their connector config.
| 0.6.0 | 2025-07-02 | [61521](https://github.com/airbytehq/airbyte/pull/61521) | Add support for custom Https proxy URL and custom Proxy CA certificate |

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

Successfully merging this pull request may close these issues.

2 participants