Skip to content

feat(vscode): adding ability to update columns#5013

Merged
benfdking merged 2 commits intomainfrom
update_external_models_columns_action
Jul 29, 2025
Merged

feat(vscode): adding ability to update columns#5013
benfdking merged 2 commits intomainfrom
update_external_models_columns_action

Conversation

@benfdking
Copy link
Contributor

@benfdking benfdking commented Jul 24, 2025

No description provided.

@benfdking benfdking force-pushed the update_external_models_columns_action branch from a0348cd to 006fdc1 Compare July 24, 2025 15:45
@benfdking benfdking marked this pull request as ready for review July 24, 2025 15:46
@benfdking benfdking force-pushed the update_external_models_columns_action branch 10 times, most recently from c574571 to 71885b8 Compare July 28, 2025 22:16
@benfdking benfdking requested a review from Copilot July 28, 2025 22:16
Copy link
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 adds the ability to update columns for external models in the VSCode extension through a new command. The feature allows users to click an "Update Columns" button in external model YAML files to automatically fetch and update column definitions from the database.

Key changes:

  • Added a new LSP command EXTERNAL_MODEL_UPDATE_COLUMNS that updates external model columns
  • Implemented code lenses to display "Update Columns" buttons in external model YAML files
  • Refactored schema loading logic to extract a reusable get_columns function

Reviewed Changes

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

Show a summary per file
File Description
vscode/extension/tests/commands.spec.ts New test file that validates the update columns functionality end-to-end
vscode/extension/package.json Added DuckDB dependency for testing database operations
sqlmesh/lsp/reference.py Refactored YAML model range finding and added function to get all model ranges
sqlmesh/lsp/main.py Added command handler and code lens feature for external model column updates
sqlmesh/lsp/context.py Implemented core logic for updating external model columns and generating code lenses
sqlmesh/lsp/commands.py Defined the new command constant
sqlmesh/core/schema_loader.py Extracted reusable get_columns function from existing code
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

vscode/extension/package.json:137

  • The version '1.3.2-alpha.25' appears to be an alpha version. Consider using a stable release version instead of an alpha version for production dependencies.
    "@duckdb/node-api": "1.3.2-alpha.25",

@benfdking benfdking force-pushed the update_external_models_columns_action branch 9 times, most recently from 0ed67af to b6f84ab Compare July 29, 2025 12:59
@benfdking benfdking force-pushed the update_external_models_columns_action branch from b6f84ab to 6e47ba0 Compare July 29, 2025 13:42
Copy link
Contributor

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Looks ok, just a couple of comments.

@benfdking benfdking enabled auto-merge (squash) July 29, 2025 14:21
@benfdking benfdking merged commit 583552e into main Jul 29, 2025
26 of 27 checks passed
@benfdking benfdking deleted the update_external_models_columns_action branch July 29, 2025 14:35
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