mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Adding External Streaming Job I/O validation (#13195)
* Added Tools Service call for ValidateStreamingJob * Partial addition of ESJ * adding test mocks * Validation working * Modifying command visibility logic to submatch ESJs in addition to files * Changed string literal to constant, corrected attribute order * Added tests * correcting casing that's causing test failures on linux * Swapping Thenable for Promise * excluded validate from command palette
This commit is contained in:
@@ -476,6 +476,12 @@ export interface GenerateDeployPlanParams {
|
||||
export interface GetOptionsFromProfileParams {
|
||||
profilePath: string;
|
||||
}
|
||||
|
||||
export interface ValidateStreamingJobParams {
|
||||
packageFilePath: string,
|
||||
createStreamingJobTsql: string
|
||||
}
|
||||
|
||||
export namespace ExportRequest {
|
||||
export const type = new RequestType<ExportParams, mssql.DacFxResult, void, void>('dacfx/export');
|
||||
}
|
||||
@@ -503,7 +509,12 @@ export namespace GenerateDeployPlanRequest {
|
||||
export namespace GetOptionsFromProfileRequest {
|
||||
export const type = new RequestType<GetOptionsFromProfileParams, mssql.DacFxOptionsResult, void, void>('dacfx/getOptionsFromProfile');
|
||||
}
|
||||
// ------------------------------- < DacFx > ------------------------------------
|
||||
|
||||
export namespace ValidateStreamingJobRequest {
|
||||
export const type = new RequestType<ValidateStreamingJobParams, mssql.ValidateStreamingJobResult, void, void>('dacfx/validateStreamingJob');
|
||||
}
|
||||
|
||||
// ------------------------------- </ DacFx > ------------------------------------
|
||||
|
||||
// ------------------------------- <CMS> ----------------------------------------
|
||||
|
||||
|
||||
@@ -119,4 +119,15 @@ export class DacFxService implements mssql.IDacFxService {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public validateStreamingJob(packageFilePath: string, createStreamingJobTsql: string): Thenable<mssql.ValidateStreamingJobResult> {
|
||||
const params: contracts.ValidateStreamingJobParams = { packageFilePath: packageFilePath, createStreamingJobTsql: createStreamingJobTsql };
|
||||
return this.client.sendRequest(contracts.ValidateStreamingJobRequest.type, params).then(
|
||||
undefined,
|
||||
e => {
|
||||
this.client.logFailedRequest(contracts.ValidateStreamingJobRequest.type, e);
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
4
extensions/mssql/src/mssql.d.ts
vendored
4
extensions/mssql/src/mssql.d.ts
vendored
@@ -339,6 +339,7 @@ export interface IDacFxService {
|
||||
generateDeployScript(packageFilePath: string, databaseName: string, ownerUri: string, taskExecutionMode: azdata.TaskExecutionMode, sqlCommandVariableValues?: Record<string, string>, deploymentOptions?: DeploymentOptions): Thenable<DacFxResult>;
|
||||
generateDeployPlan(packageFilePath: string, databaseName: string, ownerUri: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<GenerateDeployPlanResult>;
|
||||
getOptionsFromProfile(profilePath: string): Thenable<DacFxOptionsResult>;
|
||||
validateStreamingJob(packageFilePath: string, createStreamingJobTsql: string): Thenable<ValidateStreamingJobResult>;
|
||||
}
|
||||
|
||||
export interface DacFxResult extends azdata.ResultStatus {
|
||||
@@ -353,6 +354,9 @@ export interface DacFxOptionsResult extends azdata.ResultStatus {
|
||||
deploymentOptions: DeploymentOptions;
|
||||
}
|
||||
|
||||
export interface ValidateStreamingJobResult extends azdata.ResultStatus {
|
||||
}
|
||||
|
||||
export interface ExportParams {
|
||||
databaseName: string;
|
||||
packageFilePath: string;
|
||||
|
||||
Reference in New Issue
Block a user