Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make interaction use azureProfile.json from .azure #5442

Merged
merged 4 commits into from
Feb 1, 2018

Conversation

williexu
Copy link
Contributor

@williexu williexu commented Feb 1, 2018


Closes: #5421

  • az login from the cli caches its subscription and profile inside the ".azure" directory.
  • interactive mode would look inside ".azure-shell" and require a separate login from within interactive mode (which is disabled in CloudShell).

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

(see Authoring Command Modules)

@promptws
Copy link

promptws commented Feb 1, 2018

View a preview at https://prompt.ws/r/Azure/azure-cli/5442
This is an experimental preview for @microsoft users.

@williexu williexu added the Interactive az interactive label Feb 1, 2018
@@ -634,7 +634,7 @@ def cli_execute(self, cmd):
azure_folder = self.config.config_dir
if not os.path.exists(azure_folder):
os.makedirs(azure_folder)
ACCOUNT.load(os.path.join(azure_folder, 'azureProfile.json'))
ACCOUNT.load(os.path.join(get_config_dir(), 'azureProfile.json'))
CONFIG.load(os.path.join(azure_folder, 'az.json'))
SESSION.load(os.path.join(azure_folder, 'az.sess'), max_age=3600)
Copy link
Member

Choose a reason for hiding this comment

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

I think all of these should use get_config_dir()?
Looks like azure_folder should be changed instead?

Copy link
Member

@tjprescott tjprescott left a comment

Choose a reason for hiding this comment

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

Glad the fix is small.

@@ -3,6 +3,10 @@
Release History
===============

0.3.16
++++++
* Point to azureProfile.json in .azure directory.
Copy link
Member

Choose a reason for hiding this comment

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

I would recommend: "Fix issue where user is prompted to login when using interactive mode in Cloud Shell."

Copy link
Member

@tjprescott tjprescott left a comment

Choose a reason for hiding this comment

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

Recommend changing the wording in release history to be more customer-facing. Also, please post the work around to the original issue and the in the ICM ticket.

@williexu williexu merged commit a63b235 into Azure:dev Feb 1, 2018
@williexu williexu deleted the cloudshellinteractive branch February 5, 2018 20:43
LukaszStem pushed a commit to LukaszStem/azure-cli that referenced this pull request Feb 21, 2018
* make interaction use azureProfile.json from .azure

* history and version bump

* azure-folder points to .azure

* address feedback
@haroldrandom haroldrandom added the Interactive az interactive label Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Interactive az interactive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

az interactive in Azure Cloud Shell: authentication problem?
5 participants