Skip to content

Conversation

allancascante
Copy link
Contributor

Description

Adding support to import/export/deploy/extract dacpac and bacpac files as it was possible in ADS.

  1. It allows to launch dacpac/bacpac import from OE or from command palette.
image
  1. Shows a form to select the operation to use (import/export/deploy/extract) the server database and file, respective to the selected operation.
image
  1. Performs the selected operation if all information is valid.
image

Code Changes Checklist

  • New or updated unit tests added
  • All existing tests pass (npm run test)
  • Code follows contributing guidelines
  • Telemetry/logging updated if relevant
  • No regressions or UX breakage

Reviewers: Please read our reviewer guidelines

@allancascante allancascante requested a review from Copilot October 21, 2025 18:25
Copy link

@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 adds comprehensive support for Data-Tier Application operations (import/export/deploy/extract dacpac and bacpac files), replicating functionality previously available in Azure Data Studio. The feature enables users to launch these operations from the Object Explorer or command palette through a webview interface that guides them through selecting the operation type, server connection, database, and file paths.

Key Changes:

  • New webview-based UI for managing dacpac/bacpac operations
  • Command registration for all four operation types (deploy, extract, import, export)
  • Validation logic for file paths, database names, and connections
  • Support for both new and existing database deployments with confirmation dialogs

Reviewed Changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/controllers/dataTierApplicationWebviewController.ts New controller managing webview RPC handlers for all data-tier operations
src/reactviews/pages/DataTierApplication/dataTierApplicationForm.tsx React form component implementing the UI for operation configuration
src/sharedInterfaces/dataTierApplication.ts TypeScript interfaces and RPC request/notification types
src/services/dacFxService.ts Updated to accept optional application name/version parameters
test/unit/dataTierApplicationWebviewController.test.ts Comprehensive unit tests covering all operation workflows
src/controllers/mainController.ts Command registration for data-tier application operations
package.json, package.nls.json Command definitions and localization keys
Localization files Translated strings for the new feature

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

deployToExistingMessage: l10n.t(
"You are about to deploy to an existing database. This operation will make permanent changes to the database schema and may result in data loss. Do you want to continue?",
),
deployToExistingConfirm: l10n.t("Deploy"),
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

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

[nitpick] The localization key 'databaseAlreadyExists' is defined in both the dataTierApplication getter (line 1117) and appears to be duplicated in package.nls.json. While the values match, consider documenting whether this duplication is intentional for different contexts or if they should reference a shared constant.

Suggested change
deployToExistingConfirm: l10n.t("Deploy"),
deployToExistingConfirm: l10n.t("Deploy"),
// Note: The localization key 'databaseAlreadyExists' is also defined in package.nls.json.
// This duplication is currently intentional to support both VS Code extension and in-app localization.

Copilot uses AI. Check for mistakes.

Comment on lines +1239 to +1242
const connectionWithoutId: (typeof mockConnections)[0] = {
...mockConnections[0],
id: undefined,
};
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

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

[nitpick] The type annotation '(typeof mockConnections)[0]' is verbose and could be simplified by extracting a type alias for the connection object structure, improving readability and maintainability across multiple test cases that use similar patterns.

Copilot uses AI. Check for mistakes.

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.

1 participant