doAzureParallel icon indicating copy to clipboard operation
doAzureParallel copied to clipboard

minor fixes in 'Pushing output files' example

Open zerweck opened this issue 5 years ago • 4 comments

The sharedKeys object is not necessary to select the storageAccount object. Also, the storageAccountName is already an object in this script, but was referred as a string.

zerweck avatar Jun 20 '19 18:06 zerweck

Hi @zerweck

Are you using an older version of the credentials configuration file?

Thanks, Brian

brnleehng avatar Jun 20 '19 19:06 brnleehng

Hi @brnleehng No, I just ran the 'Getting Started script' 2 days ago from the Azure Shell. The JSON that the Batch Explorer gives me also has the structure for Shared Key authentication like this:

{
  "batchAccount": {
    "name": "asd",
    "key": "xxx",
    "url": "https://asd.batch.azure.com"
  },
  "storageAccount": {
    "name": "asd",
    "key": "xxx",
    "endpointSuffix": "core.windows.net"
  },
  "githubAuthenticationToken": {}
}

Since this file is parsed via fromJSON in the given example, no list object sharedKeys is needed to subselect the storage account parameters.

zerweck avatar Jun 20 '19 22:06 zerweck

If have now identified the following two sources for the version of the credentials.json without the sharedKeys object:

  1. https://github.com/Azure/doAzureParallel/blob/9e9b4942f40e957140ca415a917963193b5e4dc9/account_setup.py#L533-L546
  2. Selecting doAzureParallel in the Batch Explorer "Credentials and code samples for this Batch account" window (current Version 2.2.0-stable.368)

The only place where it is created with the sharedKeys object is doAzureParallel::generateCredentialsConfig. I am now wondering if the version without sharedKeys is outdated or the generateCredentialsConfig is non-standard.

zerweck avatar Jul 29 '19 14:07 zerweck

This appears the set up script is outdated. The config file should include sharedKeys property to support our AAD credentials.

I'll take a look on adding the fix.

Thanks, Brian

brnleehng avatar Jul 29 '19 18:07 brnleehng