Skip to content

Commit

Permalink
Merge branch 'main' into move-trends-inside-custom
Browse files Browse the repository at this point in the history
  • Loading branch information
julieg18 authored Mar 20, 2023
2 parents 40d0010 + 360bb31 commit 9ae29fd
Show file tree
Hide file tree
Showing 8 changed files with 223 additions and 164 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [0.6.22] - 2023-03-19

### 🐛 Bug Fixes

- Add experiment_rev into payload for share experiment to Studio [#3499](https://github.com/iterative/vscode-dvc/pull/3499) by [@mattseddon](https://github.com/mattseddon)

## [0.6.21] - 2023-03-17

### 🚀 New Features and Enhancements
Expand Down
14 changes: 7 additions & 7 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"extensionDependencies": [
"vscode.git"
],
"version": "0.6.21",
"version": "0.6.22",
"license": "Apache-2.0",
"readme": "./README.md",
"repository": {
Expand Down Expand Up @@ -1635,7 +1635,7 @@
"vscode-languageclient": "8.1.0"
},
"devDependencies": {
"@swc/core": "1.3.39",
"@swc/core": "1.3.40",
"@swc/jest": "0.2.24",
"@types/chai": "4.3.4",
"@types/chai-as-promised": "7.1.5",
Expand All @@ -1659,8 +1659,8 @@
"@types/vscode": "1.64.0",
"@vscode/test-electron": "2.3.0",
"@vscode/vsce": "2.18.0",
"@wdio/cli": "8.5.8",
"@wdio/local-runner": "8.5.8",
"@wdio/cli": "8.5.9",
"@wdio/local-runner": "8.5.9",
"@wdio/mocha-framework": "8.5.6",
"@wdio/spec-reporter": "8.4.0",
"chai": "4.3.7",
Expand All @@ -1675,13 +1675,13 @@
"mock-require": "3.0.3",
"process-exists": "4.1.0",
"shx": "0.3.4",
"sinon": "15.0.1",
"sinon": "15.0.2",
"sinon-chai": "3.7.0",
"ts-loader": "9.4.2",
"vscode-uri": "3.0.7",
"wdio-vscode-service": "5.0.0",
"webdriverio": "8.5.8",
"webpack": "5.76.0",
"webdriverio": "8.5.9",
"webpack": "5.76.1",
"webpack-cli": "5.0.1"
},
"peerDependencies": {
Expand Down
20 changes: 12 additions & 8 deletions extension/src/patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const STUDIO_ENDPOINT = 'https://studio.iterative.ai/api/live'

type ExperimentDetails = {
baselineSha: string
sha: string
metrics: ValueTreeRoot | undefined
name: string
params: ValueTreeRoot
Expand All @@ -29,6 +30,7 @@ type RequestBody = {
repo_url: string
name: string
baseline_sha: string
experiment_rev: string
metrics: ValueTreeRoot
params: ValueTreeRoot
type: 'done'
Expand All @@ -50,22 +52,23 @@ const collectExperiment = (data: ExperimentFields) => {

const findExperimentByName = (
name: string,
sha: string,
baselineSha: string,
experimentsObject: ExperimentsCommitOutput
) => {
for (const experiment of Object.values(experimentsObject)) {
if (experiment.data?.name !== name) {
for (const [sha, { data }] of Object.entries(experimentsObject)) {
if (data?.name !== name) {
continue
}

if (experiment?.data) {
const { metrics, params } = collectExperiment(experiment.data)
if (data) {
const { metrics, params } = collectExperiment(data)

return {
baselineSha: sha,
baselineSha,
metrics,
name,
params
params,
sha
}
}
}
Expand Down Expand Up @@ -114,7 +117,7 @@ const shareWithProgress = (
studioAccessToken: string
): Thenable<unknown> =>
Toast.showProgress('Sharing Experiment', async progress => {
const { metrics, params, baselineSha, name } = experimentDetails
const { metrics, params, baselineSha, sha, name } = experimentDetails

progress.report({
increment: 0,
Expand All @@ -125,6 +128,7 @@ const shareWithProgress = (
const response = await sendPostRequest(studioAccessToken, {
baseline_sha: baselineSha,
client: 'vscode',
experiment_rev: sha,
metrics: metrics || {},
name,
params: params || {},
Expand Down
2 changes: 2 additions & 0 deletions extension/src/test/suite/patch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ suite('Patch Test Suite', () => {
body: JSON.stringify({
baseline_sha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77',
client: 'vscode',
experiment_rev: '4fb124aebddb2adf1545030907687fa9a4c80e70',
metrics,
name,
params: {
Expand Down Expand Up @@ -133,6 +134,7 @@ suite('Patch Test Suite', () => {
body: JSON.stringify({
baseline_sha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77',
client: 'vscode',
experiment_rev: '4fb124aebddb2adf1545030907687fa9a4c80e70',
metrics,
name,
params: {
Expand Down
4 changes: 2 additions & 2 deletions languageServer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test": "jest --collect-coverage"
},
"devDependencies": {
"@swc/core": "1.3.39",
"@swc/core": "1.3.40",
"@swc/jest": "0.2.24",
"@types/jest": "29.4.0",
"clean-webpack-plugin": "4.0.0",
Expand All @@ -34,7 +34,7 @@
"ts-loader": "9.4.2",
"lint-staged": "13.2.0",
"jest": "29.5.0",
"webpack": "5.76.0",
"webpack": "5.76.1",
"webpack-cli": "5.0.1",
"jest-environment-node": "29.5.0"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@typescript-eslint/eslint-plugin": "5.54.1",
"@typescript-eslint/parser": "5.54.1",
"@vscode/codicons": "0.0.32",
"eslint": "8.35.0",
"eslint": "8.36.0",
"eslint-config-prettier": "8.7.0",
"eslint-config-prettier-standard": "4.0.1",
"eslint-config-standard": "17.0.0",
Expand Down
6 changes: 3 additions & 3 deletions webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@storybook/react": "6.5.16",
"@storybook/testing-library": "0.0.13",
"@svgr/cli": "6.5.1",
"@swc/core": "1.3.39",
"@swc/core": "1.3.40",
"@swc/jest": "0.2.24",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "14.0.0",
Expand All @@ -70,13 +70,13 @@
"jest-environment-jsdom": "29.5.0",
"lint-staged": "13.2.0",
"raw-loader": "4.0.2",
"sass": "1.58.3",
"sass": "1.59.2",
"sass-loader": "13.2.0",
"storybook-addon-designs": "6.3.1",
"storybook-addon-themes": "6.1.0",
"style-loader": "3.3.1",
"ts-loader": "9.4.2",
"webpack": "5.76.0",
"webpack": "5.76.1",
"webpack-cli": "5.0.1",
"webpack-dev-server": "4.11.1"
},
Expand Down
Loading

0 comments on commit 9ae29fd

Please sign in to comment.