Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fixed configuration schema to use `auth_type` (snake_case) for integration requests, matching the format the extension actually produces. Added strict property validation to integration request items. (#3651)

## [1.34.0]

### Changed
Expand Down
104 changes: 91 additions & 13 deletions extensions/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@
},
"dependencies": {
"@vscode/codicons": "^0.0.44",
"ajv": "^8.18.0",
"ajv-formats": "^3.0.1",
"async-mutex": "^0.5.0",
"axios": "^1.13.6",
"debounce": "^3.0.0",
Expand All @@ -688,6 +690,7 @@
"filenamify": "^7.0.1",
"get-port": "^7.1.0",
"retry": "^0.13.1",
"smol-toml": "^1.6.0",
"tar-stream": "^3.1.8",
"vscode-uri": "^3.0.8"
}
Expand Down
46 changes: 16 additions & 30 deletions extensions/vscode/src/api/types/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { ProductType } from "./contentRecords";
export type ConfigurationLocation = {
configurationName: string;
configurationPath: string;
configurationRelPath: string;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nobody was using this. We can always add it back if we want it but I think it's confusing

projectDir: string;
};

Expand Down Expand Up @@ -114,26 +113,26 @@ export const contentTypeStrings = {

export type ConfigurationDetails = {
$schema: SchemaURL;
comments?: string[];
alternatives?: ConfigurationDetails[];
productType: ProductType;
type: ContentType;
entrypoint?: string;
source?: string;
title?: string;
description?: string;
thumbnail?: string;
tags?: string[];
hasParameters?: boolean;
python?: PythonConfig;
r?: RConfig;
quarto?: QuartoConfig;
jupyter?: JupyterConfig;
environment?: EnvironmentConfig;
validate: boolean;
files?: string[];
secrets?: string[];
integrationRequests?: IntegrationRequest[];
schedules?: ScheduleConfig[];
access?: AccessConfig;
connect?: ConnectConfig;
connectCloud?: ConnectCloudConfig;
};

export type IntegrationRequest = {
Expand All @@ -151,12 +150,15 @@ export type PythonConfig = {
version: string;
packageFile: string;
packageManager: string;
requiresPython?: string;
};

export type RConfig = {
version: string;
packageFile: string;
packageManager: string;
requiresR?: string;
packagesFromLibrary?: boolean;
};

export type QuartoConfig = {
Expand All @@ -166,35 +168,19 @@ export type QuartoConfig = {

export type EnvironmentConfig = Record<string, string>;

export type ScheduleConfig = {
start: string;
recurrence: string;
export type JupyterConfig = {
hideAllInput?: boolean;
hideTaggedInput?: boolean;
};

export enum AccessType {
ANONYMOUS = "all",
LOGGED_IN = "logged-in",
ACL = "acl",
}

export type AccessConfig = {
type: AccessType;
users?: User[];
groups?: Group[];
};

export type User = {
id?: string;
guid?: string;
name?: string;
permissions: string;
export type ConnectCloudConfig = {
vanityName?: string;
accessControl?: ConnectCloudAccessControl;
};

export type Group = {
id?: string;
guid?: string;
name?: string;
permissions: string;
export type ConnectCloudAccessControl = {
publicAccess?: boolean;
organizationAccess?: string;
};

export function UpdateAllConfigsWithDefaults(
Expand Down
6 changes: 4 additions & 2 deletions extensions/vscode/src/api/types/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type ConnectRuntime = {
idleTimeout?: number;
maxProcesses?: number;
minProcesses?: number;
maxConnections?: number;
maxConnsPerProcess?: number;
loadFactor?: number;
};

Expand All @@ -30,7 +30,9 @@ export type ConnectKubernetes = {
amdGpuLimit?: number;
nvidiaGpuLimit?: number;
serviceAccountName?: string;
imageName?: string;
defaultImageName?: string;
defaultREnvironmentManagement?: boolean;
defaultPyEnvironmentManagement?: boolean;
};

// See types in internal/clients/connect/client.go
Expand Down
2 changes: 0 additions & 2 deletions extensions/vscode/src/test/unit-test-utils/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const configurationFactory = Factory.define<Configuration>(
projectDir: `report-GUD${sequence}`,
configurationName: `configuration-GUD${sequence}`,
configurationPath: `report/path/configuration-${sequence}`,
configurationRelPath: `report/path/configuration-${sequence}`,
}),
);

Expand Down Expand Up @@ -107,7 +106,6 @@ export const contentRecordFactory = Factory.define<ContentRecord>(
projectDir: "",
},
configurationPath: `report/path/configuration-${sequence}`,
configurationRelPath: `report/path/configuration-${sequence}`,
connectCloud: { accountName: "" },
}),
);
Expand Down
Loading
Loading