Skip to content

fix(mcp): resolve incorrect cloud auth help text env vars#880

Merged
Aaron ("AJ") Steers (aaronsteers) merged 2 commits intomainfrom
a/fix(mcp)--resolve-incorrect-cloud-auth-help-text-env-vars
Dec 1, 2025
Merged

fix(mcp): resolve incorrect cloud auth help text env vars#880
Aaron ("AJ") Steers (aaronsteers) merged 2 commits intomainfrom
a/fix(mcp)--resolve-incorrect-cloud-auth-help-text-env-vars

Conversation

@aaronsteers
Copy link
Copy Markdown
Member

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Dec 1, 2025

Correct the environment variable references in the cloud authentication help text for improved clarity.

Summary by CodeRabbit

  • Documentation
    • Unified and clearer authentication guidance across Airbyte Cloud operations' help text
    • Streamlined, concise descriptions for Cloud operations replacing verbose docstrings
    • Improved parameter descriptions with explicit workspace ID guidance for clarity and consistency

✏️ Tip: You can customize this high-level summary in your review settings.

Important

Auto-merge enabled.

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

Copy link
Copy Markdown
Contributor

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 corrects environment variable references in cloud authentication help text. The original docstrings incorrectly referenced AIRBYTE_CLIENT_ID, AIRBYTE_CLIENT_SECRET, AIRBYTE_WORKSPACE_ID, and AIRBYTE_API_ROOT, when they should reference AIRBYTE_CLOUD_CLIENT_ID, AIRBYTE_CLOUD_CLIENT_SECRET, AIRBYTE_CLOUD_WORKSPACE_ID, and AIRBYTE_CLOUD_API_ROOT.

Key changes:

  • Created centralized CLOUD_AUTH_TIP_TEXT and WORKSPACE_ID_TIP_TEXT constants with correct environment variable names
  • Moved authentication help text from individual function docstrings to the extra_help_text parameter of the @mcp_tool decorator
  • Simplified function docstrings by removing redundant authentication information

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 1, 2025

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This PyAirbyte Version

You can test this version of PyAirbyte using the following:

# Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@a/fix(mcp)--resolve-incorrect-cloud-auth-help-text-env-vars' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@a/fix(mcp)--resolve-incorrect-cloud-auth-help-text-env-vars'

Helpful Resources

PR Slash Commands

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

  • /fix-pr - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test-pr - Runs tests with the updated PyAirbyte

Community Support

Questions? Join the #pyairbyte channel in our Slack workspace.

📝 Edit this welcome message.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 1, 2025

📝 Walkthrough

Walkthrough

This PR adds two help-text constants (CLOUD_AUTH_TIP_TEXT, WORKSPACE_ID_TIP_TEXT) and attaches CLOUD_AUTH_TIP_TEXT as extra_help_text across many MCP tool registrations in airbyte/mcp/cloud_ops.py; it also shortens several docstrings and refines some describe/list value access patterns.

Changes

Cohort / File(s) Change Summary
Help text constants & registrations
airbyte/mcp/cloud_ops.py
Add CLOUD_AUTH_TIP_TEXT and WORKSPACE_ID_TIP_TEXT; attach CLOUD_AUTH_TIP_TEXT as extra_help_text to many MCP tool decorators for consistent authentication guidance.
Docstring and parameter updates
airbyte/mcp/cloud_ops.py
Replace verbose environment-auth docstrings with concise descriptions; update list_custom_source_definitions parameter description to reference WORKSPACE_ID_TIP_TEXT.
Describe/list access refinements
airbyte/mcp/cloud_ops.py
Minor access-pattern adjustments in describe/list functions (e.g., extracting names/IDs from connector info) to ensure values are prepared before constructing return objects.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify CLOUD_AUTH_TIP_TEXT is attached to all intended MCP tool registrations and that none were missed.
  • Confirm concise docstrings accurately reflect behavior and don't remove needed details.
  • Ensure WORKSPACE_ID_TIP_TEXT is applied consistently where workspace_id guidance is required.

Would you like me to scan for any registrations in the file that look like they might have been missed? wdyt?

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: correcting environment variable references in cloud authentication help text, which aligns with the PR objectives and the raw summary.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch a/fix(mcp)--resolve-incorrect-cloud-auth-help-text-env-vars

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
airbyte/mcp/cloud_ops.py (1)

938-973: Should these custom source definition functions also include the auth help text?

I noticed that list_custom_source_definitions, update_custom_source_definition, and permanently_delete_custom_source_definition don't have the extra_help_text=CLOUD_AUTH_TIP_TEXT parameter, while most other cloud operations do. Since these functions also use CloudWorkspace and require the same authentication, should they be consistent with the rest, wdyt?

If you'd like to add it:

 @mcp_tool(
     domain="cloud",
     read_only=True,
     idempotent=True,
     open_world=True,
+    extra_help_text=CLOUD_AUTH_TIP_TEXT,
 )
 def list_custom_source_definitions(

And similarly for the other two functions.

Also applies to: 975-1032, 1034-1099

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52310a0 and 2b48f2a.

📒 Files selected for processing (1)
  • airbyte/mcp/cloud_ops.py (43 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: aaronsteers
Repo: airbytehq/PyAirbyte PR: 411
File: airbyte/cli.py:0-0
Timestamp: 2024-10-08T15:34:31.026Z
Learning: In this codebase, when using `click` for command-line interfaces, detailed help text is provided via `click`'s `help` parameter, and docstrings are kept concise to avoid redundancy.
Learnt from: aaronsteers
Repo: airbytehq/PyAirbyte PR: 411
File: airbyte/cli.py:0-0
Timestamp: 2024-10-06T22:13:05.169Z
Learning: In this codebase, when using `click` for command-line interfaces, detailed help text is provided via `click`'s `help` parameter, and docstrings are kept concise to avoid redundancy.
📚 Learning: 2024-10-08T15:34:31.026Z
Learnt from: aaronsteers
Repo: airbytehq/PyAirbyte PR: 411
File: airbyte/cli.py:111-160
Timestamp: 2024-10-08T15:34:31.026Z
Learning: In PyAirbyte, error messages in functions like `_resolve_source_job` in `airbyte/cli.py` are designed to decouple the message text from dynamic values, following a structlog-inspired design. Dynamic values are provided via parameters like `input_value`. This approach helps avoid including PII in the message strings, which may be used in telemetry.

Applied to files:

  • airbyte/mcp/cloud_ops.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Pytest (No Creds)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Windows)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.11, Windows)
  • GitHub Check: Pytest (Fast)
🔇 Additional comments (3)
airbyte/mcp/cloud_ops.py (3)

183-183: Nice simplification of docstrings!

The docstring changes look great. They're now concise while the detailed authentication guidance is properly provided via the extra_help_text parameter. This aligns perfectly with the codebase pattern of keeping docstrings brief and providing detailed help through decorator parameters.

Based on learnings, this approach avoids redundancy between docstrings and help text.

Also applies to: 253-253, 323-323, 375-375, 438-438, 491-491, 553-553, 602-602, 647-647, 683-683, 719-719, 767-767, 829-829, 1313-1313, 1395-1395, 1482-1482


647-659: Good defensive coding with the name property access!

The changes to explicitly access and store the name property before accessing _connector_info look solid. This ensures the connector info is properly populated before use, which prevents potential attribute errors. The cast also helps with type checking clarity.

Also applies to: 683-695


944-952: Nice use of the constant for consistency!

Using WORKSPACE_ID_TIP_TEXT here keeps the workspace ID description consistent across the codebase. Great refactor!

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 1, 2025

PyTest Results (Fast Tests Only, No Creds)

320 tests  ±0   320 ✅ ±0   6m 3s ⏱️ +6s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit e92ad30. ± Comparison against base commit 52310a0.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

APPROVED

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 1, 2025

PyTest Results (Full)

388 tests  ±0   372 ✅ +1   24m 59s ⏱️ - 1m 19s
  1 suites ±0    16 💤 ±0 
  1 files   ±0     0 ❌  - 1 

Results for commit e92ad30. ± Comparison against base commit 52310a0.

@aaronsteers Aaron ("AJ") Steers (aaronsteers) merged commit ef69ae0 into main Dec 1, 2025
24 checks passed
@aaronsteers Aaron ("AJ") Steers (aaronsteers) deleted the a/fix(mcp)--resolve-incorrect-cloud-auth-help-text-env-vars branch December 1, 2025 21:55
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.

3 participants