Skip to content

Migration work for VS Code.dev#288

Merged
nturinski merged 23 commits intomainfrom
vscode-dev
Mar 30, 2023
Merged

Migration work for VS Code.dev#288
nturinski merged 23 commits intomainfrom
vscode-dev

Conversation

@nturinski
Copy link
Copy Markdown
Member

@nturinski nturinski commented Mar 13, 2023

I'll leave comments on various weird things that I had to do.

TODO:
Creating container apps still doesn't work in browser, but it is being worked on by the service team. I was able to test it still by manually deleting headers before the requests were sent out and confirmed it works.

Remove creating container apps from DockerHub. It has the same CORS issues and I doubt we'll be able to resolve that.

Re-enable experimental service

@nturinski nturinski requested a review from a team as a code owner March 13, 2023 23:02
Comment thread .azure-pipelines/common/package.yml
Comment thread src/extension.ts
import { TreeItemStateStore } from './tree/TreeItemState';

export async function activateInternal(context: vscode.ExtensionContext, perfStats: { loadStartTime: number; loadEndTime: number }, ignoreBundle?: boolean): Promise<void> {
export async function activate(context: vscode.ExtensionContext, perfStats: { loadStartTime: number; loadEndTime: number }, ignoreBundle?: boolean): Promise<void> {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For web bundled code, the entry point has to be the extension.bundle so I changed the names of the functions to activate and deactivate. The main.js file is still used by desktop.

export async function getReposForNamespace(context: IActionContext, namespace: string, nextUrl?: string | null): Promise<DockerHubV2ApiResponse<DockerHubV2Repository>> {
const url = nextUrl || `https://hub.docker.com/v2/repositories/${namespace}`;
return <DockerHubV2ApiResponse<DockerHubV2Repository>>(await sendRequestWithTimeout(context, { url, method: 'GET' }, 5000, undefined)).parsedBody;
return <DockerHubV2ApiResponse<DockerHubV2Repository>>JSON.parse((await sendRequestWithTimeout(context, { url, method: 'GET' }, 5000, undefined)).bodyAsText as string);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When I changed the Azure REST pipeline stuff, it changed the response body a little bit, so that is to just to account for that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think I can revert this back with the new changes to tools.

Comment thread package.json Outdated
Comment thread src/utils/openUrl.ts Outdated
Comment thread src/utils/azureClients.ts Outdated
Comment thread package-lock.json Outdated
Comment thread src/utils/activityUtils.ts Outdated
@nturinski
Copy link
Copy Markdown
Member Author

This is currently broken due to the fs-extra package. It'll webpack, but it won't actually activate. The fix for this is mildly complicated, so I'd rather do it in another PR.

@bwateratmsft
Copy link
Copy Markdown
Contributor

This is currently broken due to the fs-extra package. It'll webpack, but it won't actually activate. The fix for this is mildly complicated, so I'd rather do it in another PR.

@nturinski can we replace with AzExtFsExtra?

@nturinski
Copy link
Copy Markdown
Member Author

Unfortunately not. I found a solution with vscode's proposed API: https://github.com/microsoft/vscode/blob/1d60909d1f273d3a4fdbfaba656048856057d36f/src/vs/vscode.proposed.d.ts#L89-L96

But the main issue here is that we're using createWriteStream to zip up some local files so that we can send it up to Azure Storage. By the time we get permission to use the proposed API, Jing will have fired me for releasing the vscode.dev stuff so late so I was planning on fixing it for the next release.

@nturinski
Copy link
Copy Markdown
Member Author

@nturinski
Copy link
Copy Markdown
Member Author

I think I'm done committing to this PR. As mentioned, will resolve the fs-extra thing in another PR.

Copy link
Copy Markdown
Member

@alexweininger alexweininger left a comment

Choose a reason for hiding this comment

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

:shipit:

@nturinski nturinski merged commit 6b7a120 into main Mar 30, 2023
@nturinski nturinski deleted the vscode-dev branch March 30, 2023 20:59
@microsoft microsoft locked and limited conversation to collaborators Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants