Skip to content

Conversation

aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Sep 5, 2025

Important

Auto-merge enabled.

This PR is set to merge automatically when all requirements are met.

@github-actions github-actions bot added the enhancement New feature or request label Sep 5, 2025
Copy link

github-actions bot commented Sep 5, 2025

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This Branch via MCP

To test the changes in this specific branch with an MCP client like Claude Desktop, use the following configuration:

{
  "mcpServers": {
    "connector-builder-mcp-dev": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/airbytehq/connector-builder-mcp.git@feat/robust-config-dict-parsing", "connector-builder-mcp"]
    }
  }
}

Testing This Branch via CLI

You can test this version of the MCP Server using the following CLI snippet:

# Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/connector-builder-mcp.git@feat/robust-config-dict-parsing#egg=airbyte-connector-builder-mcp' --help

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poe <command> - Runs any poe command in the uv virtual environment
  • /poe build-connector prompt="Star Wars API" - Run the connector builder using the Star Wars API.

📝 Edit this welcome message.

@aaronsteers aaronsteers marked this pull request as ready for review September 5, 2025 19:32
@aaronsteers aaronsteers requested a review from Copilot September 5, 2025 19:32
@aaronsteers aaronsteers enabled auto-merge (squash) September 5, 2025 19:33
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

This PR enhances config parsing by adding support for JSON string input and improves the robustness of configuration handling. The changes move utility functions to a shared module and add new parsing capabilities.

  • Refactored boolean and dictionary parsing functions to a centralized utility module
  • Added support for parsing JSON strings as configuration dictionaries
  • Enhanced type annotations and function signatures for better type safety

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
connector_builder_mcp/validation_testing.py Removed local _as_bool function and updated to use centralized utilities with improved config parsing
connector_builder_mcp/_util.py Added as_bool and as_dict utility functions with overloads for robust type conversion
connector_builder_mcp/_secrets.py Minor parameter formatting improvement with keyword-only argument

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

return default

if isinstance(val, str):
return cast("dict[str, Any]", json.loads(val))
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The json.loads() call can raise JSONDecodeError but this is not handled or documented. Consider wrapping in a try-catch block and raising a more descriptive error message that indicates the JSON parsing failed.

Copilot uses AI. Check for mistakes.


raw_responses_data = None
if include_raw_responses_data is True and slices and isinstance(slices, list):
if include_raw_responses_data is True and slices:
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The explicit is True comparison is redundant since include_raw_responses_data is already a boolean. The condition can be simplified to if include_raw_responses_data and slices:.

Suggested change
if include_raw_responses_data is True and slices:
if include_raw_responses_data and slices:

Copilot uses AI. Check for mistakes.

Copy link

github-actions bot commented Sep 5, 2025

PyTest Results (Fast)

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 805a751. ± Comparison against base commit 76112b7.

Copy link

github-actions bot commented Sep 5, 2025

PyTest Results (Full)

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 805a751. ± Comparison against base commit 76112b7.

@aaronsteers aaronsteers merged commit 49019f4 into main Sep 5, 2025
16 checks passed
@aaronsteers aaronsteers deleted the feat/robust-config-dict-parsing branch September 5, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant