Skip to content

Fix creating a function app with no workspace open#4061

Merged
motm32 merged 2 commits intomainfrom
meganmott/fixNoWorkspace
Mar 29, 2024
Merged

Fix creating a function app with no workspace open#4061
motm32 merged 2 commits intomainfrom
meganmott/fixNoWorkspace

Conversation

@motm32
Copy link
Copy Markdown
Contributor

@motm32 motm32 commented Mar 28, 2024

I was checking telemetry today and noticed the error count was a little high for the create function app telemetry event. Looking further into we were blocking users from creating a function app when no workspace was open. This happened due to the containerized function app flow checking for a dockerfile in the workspace. I added a check to see if a workspace was open before running this step which should fix that issue.

@motm32 motm32 requested a review from a team as a code owner March 28, 2024 22:29
if (!(await isFunctionProject(workspacePath))) {
if (await isFunctionProject(workspacePath)) {
const files = (await findFiles(context.workspaceFolder, `*/${hostFileName}`));
if (files.length === 0) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You honestly probably don't need these checks anymore either.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Talked offline and the checks are still needed.

@motm32 motm32 merged commit 31e733e into main Mar 29, 2024
@motm32 motm32 deleted the meganmott/fixNoWorkspace branch March 29, 2024 02:27
@microsoft microsoft locked and limited conversation to collaborators May 13, 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.

2 participants