azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Magic .azure files created in my development environment during deploy

Open chenlomis opened this issue 6 years ago • 13 comments

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

During the deployment two magic files were created in my development environment — .azure and .deployment. These files didn't have comments or links to any documentation regarding what these files were for, what they contained, or if the options were configurable

To Reproduce Steps to reproduce the behavior.

Expected behavior A clear and concise description of what you expected to happen.

Environment summary Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)

Additional context Add any other context about the problem here.

chenlomis avatar Dec 20 '19 18:12 chenlomis

Running az webapp up configures local context for which is included in the .Azure files see https://docs.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest#az-configure for more details.

Adding @btardif as FYI.

panchagnula avatar Dec 26 '19 23:12 panchagnula

We should add a comment to the content of the files with links to more info or explanation of what they are and what they are used for... re-opening this and assigning to me to come up with plan

btardif avatar Dec 30 '19 22:12 btardif

@btardif any update for this issue?

yonzhan avatar Mar 06 '20 13:03 yonzhan

@yonzhan , @btardif and I just had a quick chat about this issue and the webapp team is suspecting that the magical .azure file is being created via the CLI rather than the az webapp up command. There's confusion on what this file is and how to make use of it. It'd be great if we could investigate and confirm on what's happening and the next steps

chenlomis avatar Apr 03 '20 20:04 chenlomis

@chenlomis this is the same issue being discussed here: https://dev.azure.com/azuretracking/Azure%20tracking/_workitems/edit/680

btardif avatar May 13 '20 03:05 btardif

add to S173

yonzhan avatar Jun 14 '20 12:06 yonzhan

.azure should be a folder instead of a file, created by Azure CLI as the configuration folder.

https://github.com/Azure/azure-cli/blob/3b4d10d473a8d72dc2a1607478beb14424ce2004/src/azure-cli-core/azure/cli/core/_environment.py#L12

It is by-default created under the user's home folder, unless

  1. AZURE_EXTENSION_DIR is set
  2. az configure --scope local is used
  3. local-context is turn on

.deployment seems to be created by botservice:

https://github.com/Azure/azure-cli/blob/9370ec21d5febcb0e7099f1a3969a42d04c4ceb1/src/azure-cli/azure/cli/command_modules/botservice/custom.py#L560

Please share the full deployment script for us to further analyze the issue.

jiasli avatar Jul 24 '20 06:07 jiasli

The deployment path used is here: https://docs.microsoft.com/en-us/azure/app-service/containers/quickstart-python?tabs=bash

This generates a .azure/config file with no comment explaining what it is for.

The .deployment file comes from VS Code deploy so that is a separate issue.

qubitron avatar Aug 03 '20 13:08 qubitron

We have a document Azure CLI configuration explaining what .azure/config is.

Indeed, we can put a comments in .azure/config explaining what it is. @yonzhan @achandmsft @chenlomis, any thoughts?

jiasli avatar Aug 04 '20 02:08 jiasli

Sounds like a plan to me Something along the lines of:" this is where your CLI configs are stored" @qubitron that aligns with your proposal right?

chenlomis avatar Aug 04 '20 02:08 chenlomis

Yep something like "This file contains saved configurations for your CLI, read more at: aka.ms/1234".

We probably want an aka link in case we change where this points to.

qubitron avatar Aug 04 '20 18:08 qubitron

@jiasli @chenlomis should we re-open the issue?

qubitron avatar Aug 31 '20 15:08 qubitron

Created issue https://github.com/Azure/azure-cli/issues/15001 to track.

jiasli avatar Sep 01 '20 03:09 jiasli