text:
must gather race condition

Saw this in e2e run:
[Admin API] Must gather action
  should return information collected from a cluster cluster
  /data/vsts-agent/_work/3/s/gopath/src/github.com/Azure/ARO-RP/test/e2e/adminapi_mustgather.go:17
STEP: triggering the mustgather action
time="2020-07-31T18:26:06Z" level=info msg="read request" func="middleware.Log.func1.1()" file="pkg/frontend/middleware/log.go:110" client_principal_name= client_request_id= component=access correlation_id= request_id=c75b3db9-4ddd-4c75-bf44-b11fba357a3e request_method=POST request_path=/admin/subscriptions/46626fc5-476d-41ad-8c76-2ec49c6994eb/resourcegroups/v4-e2e-rg-v33411082-eastus/providers/microsoft.redhatopenshift/openshiftclusters/v4-e2e-v33411082/mustgather request_proto=HTTP/1.1 request_remote_addr="127.0.0.1:57258" request_user_agent=Go-http-client/1.1 resource_group=v4-e2e-rg-v33411082-eastus resource_id=/subscriptions/46626fc5-476d-41ad-8c76-2ec49c6994eb/resourcegroups/v4-e2e-rg-v33411082-eastus/providers/microsoft.redhatopenshift/openshiftclusters/v4-e2e-v33411082 resource_name=v4-e2e-v33411082 subscription_id=46626fc5-476d-41ad-8c76-2ec49c6994eb
time="2020-07-31T18:26:08Z" level=info msg="403: Forbidden: pods/must-gather: pods \"must-gather\" is forbidden: error looking up service account openshift-must-gather-v6tf4/default: serviceaccount \"default\" not found" func="frontend.reply()" file="pkg/frontend/frontend.go:375" client_principal_name= client_request_id= component=access correlation_id= request_id=c75b3db9-4ddd-4c75-bf44-b11fba357a3e resource_group=v4-e2e-rg-v33411082-eastus resource_id=/subscriptions/46626fc5-476d-41ad-8c76-2ec49c6994eb/resourcegroups/v4-e2e-rg-v33411082-eastus/providers/microsoft.redhatopenshift/openshiftclusters/v4-e2e-v33411082 resource_name=v4-e2e-v33411082 subscription_id=46626fc5-476d-41ad-8c76-2ec49c6994eb
time="2020-07-31T18:26:08Z" level=info msg="sent response" func="middleware.Log.func1.1.1()" file="pkg/frontend/middleware/log.go:101" body_read_bytes=0 body_written_bytes=255 client_principal_name= client_request_id= component=access correlation_id= duration=2.2390684419999998 request_id=c75b3db9-4ddd-4c75-bf44-b11fba357a3e request_method=POST request_path=/admin/subscriptions/46626fc5-476d-41ad-8c76-2ec49c6994eb/resourcegroups/v4-e2e-rg-v33411082-eastus/providers/microsoft.redhatopenshift/openshiftclusters/v4-e2e-v33411082/mustgather request_proto=HTTP/1.1 request_remote_addr="127.0.0.1:57258" request_user_agent=Go-http-client/1.1 resource_group=v4-e2e-rg-v33411082-eastus resource_id=/subscriptions/46626fc5-476d-41ad-8c76-2ec49c6994eb/resourcegroups/v4-e2e-rg-v33411082-eastus/providers/microsoft.redhatopenshift/openshiftclusters/v4-e2e-v33411082 resource_name=v4-e2e-v33411082 response_status_code=403 subscription_id=46626fc5-476d-41ad-8c76-2ec49c6994eb

• Failure [2.244 seconds]
[Admin API] Must gather action
/data/vsts-agent/_work/3/s/gopath/src/github.com/Azure/ARO-RP/test/e2e/adminapi_mustgather.go:14
  should return information collected from a cluster cluster [It]
  /data/vsts-agent/_work/3/s/gopath/src/github.com/Azure/ARO-RP/test/e2e/adminapi_mustgather.go:17

  Expected
      <int>: 403
  to equal
      <int>: 200

  /data/vsts-agent/_work/3/s/gopath/src/github.com/Azure/ARO-RP/test/e2e/adminapi_mustgather.go:24

The problem is that after creating the openshift-must-gather-XXX namespace, we don't wait for the existence of the default service account before creating the must-gather pod.

cc @ehashman

It's not a serious bug, but it makes the e2es flaky so would be good to fix as a priority.

repo: Azure/ARO-RP


text:
Test cases for GA SupportedVMSizes

Which issue this PR addresses:

Jira: https://issues.redhat.com/browse/ARO-2883
What this PR does / why we need it:

Test plan for issue:

Is there any documentation that needs to be updated for this PR?

Test cases for https://github.com/Azure/ARO-RP/pull/2798
cc @cadenmarchese

I don't think comparing the json bytes is not a good idea, because validate.Supported**VmSizes is a map and a map is not ordered.
I think we should avoid comparing in the way depending on the order of the map.
https://go.dev/ref/spec#Map_types

A map is an unordered group of elements of one type, called the element type, indexed by a set of unique keys of another type, called the key type.

If you use *map[api.VMSize]api.VMSizeStruct for wantResponse, you can compare wantResponse and its response directly with validateResponse, which uses deep.Equal and not dependent on the order.
	type test struct {
		name           string
		query          string
		wantStatusCode int
		wantResponse   *map[api.VMSize]api.VMSizeStruct
		wantError      string
	}

I don't think comparing the json bytes is not a good idea, because validate.Supported**VmSizes is a map and a map is not ordered. I think we should avoid comparing in the way depending on the order of the map.
https://go.dev/ref/spec#Map_types

A map is an unordered group of elements of one type, called the element type, indexed by a set of unique keys of another type, called the key type.

If you use *map[api.VMSize]api.VMSizeStruct for wantResponse, you can compare wantResponse and its response directly with validateResponse, which uses deep.Equal and not dependent on the order.
	type test struct {
		name           string
		query          string
		wantStatusCode int
		wantResponse   *map[api.VMSize]api.VMSizeStruct
		wantError      string
	}

I wish to use the map[api.VMSize]api.VMSizeStructforwantResponse` so it's a lot easier to compare and I don't need to json.MarshallIndent, but the API returns a []byte response as you can see here., https://github.com/Azure/ARO-RP/blob/master/pkg/frontend/admin_supportvmsizes_list.go#L34

Yes, the API returns []byte response in json format.
but validateResponse unmarshals the response if wantResponse can't be casted to []byte.
https://github.com/Azure/ARO-RP/blob/master/pkg/frontend/shared_test.go#L262
so when you use *map[api.VMSize]api.VMSizeStruct as a wantResponse's type, validateResponse unmarshals the response and use deep.Equal to compare.
I looked over some APIs that return []byte and their tests.
They just use the pointer of struct as a wantResponse's type and don't marshal it.
https://github.com/Azure/ARO-RP/blob/master/pkg/frontend/admin_openshiftversion_list_test.go
https://github.com/Azure/ARO-RP/blob/master/pkg/frontend/asyncoperationsstatus_get_test.go

Now I see what you meant, made the changes!

source: gharchive/pull-request

authors: SrinivasAtmakuri bitoku

license_type: permissive

license_source: github-api


text:
Add newer images for azure monitor metrics

What type of PR is this?
/kind feature

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[x] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

we were thinking to slim down VHD size to speed VM creation, to my knowledge this image isn't a key component blocking cluster startup.

authors: haitch vishiy

repo: Azure/AgentBaker

license: MIT


text:
Update README.md

New update in diagnostic settings and README.md file

Hi @tarosler , can you pls merge it to the master? Thanks

repo: Azure/Azure-Security-Center


text:
Pulse secure parser for Azure Sentinel

For standard log format with syslog type as below, the regex used in the pulseconnectsecure(function developed by @shainw and @acnccd) parser is not matching
'2021-11-03 01:20:46 - ive - [1.2.3.4] Jane, Mitchel(Employee)[] - Received OCSP response from '1.1.1.1' with url 'http://abc.com', user: 'Jane, Mitchel'  serial number: 'D8:DB:12:8A:DE:00:00:00:04:B1:8D''
Current regex :  (\d{4}-\d{2}-\d{2})\s(\d{2}:\d{2}:\d{2})\s(\S+)\s(\S+)\s(\S+)\s[(\S+)]\s(\S+,)\s(\S+)((.)?)[(.)]\s-\s(.*)
Can someone help me with a regex which matches for all the below syslog messages
'2021-11-03 01:20:46 - ive - [1.2.3.4] Jane, Mitchel(Employee)[] - Received OCSP response from '1.1.1.1' with url 'http://abc.com', user: 'Jane, Mitchel'  serial number: 'D8:DB:12:8A:DE:00:00:00:04:B1:8D''
2020-05-01 05:36:14 - ive - [10.0.0.0] user100(ABC Realm)[Personal_PC No RDP] - WebRequest ok : Host: sample.abc.com, Request: GET /Citrix/XDSWeb/dample/js/ctxs.webui.min_0204820BD028.js HTTP/1.1
2020-05-01 00:07:21 - ive - [127.0.0.1] System()[] - User Accounts modified. Removed username ABC\user34 from authentication server ABC Active Directory.

Hey.. we are looking into this issue and would get back to you asap... Thanks!!!

Hi @annanra ,
We have updated the regex of the parser to match the syslog messages shared by you. https://github.com/Azure/Azure-Sentinel/pull/3887. Can you please follow below steps and save the function with a different name and update us if the parser is working fine now?

Open Log Analytics Workspace
Open new Query window
Copy and Paste the updated query from the PulseConnectSecure.txt file provided in the https://github.com/Azure/Azure-Sentinel/pull/3887/files.
In the query window, on the second line of the query, enter the hostname(s) of your Pulse Connect Secure device(s) and any other unique identifiers for the logstream.
//    For example: | where Computer in ("server1, server2") and Facility == "local7"
Click on Save button and select as Function from drop down by specifying function name and alias as PulseConnectSecure_Test.

Run the query to validate data is being received and parsed.
Let us know, if the query works fine. Thanks!!

Hi @annanra, Closing this issue as there is no response on this for more than a month. Please re-open or create a new one, if the issue persists and needs help. Thanks.

source: gharchive/issue

authors: annanra ritika-msft v-rucdu

repo: Azure/Azure-Sentinel


text:
Warning: Error in winDialog: winDialog() cannot be used non-interactively

Hi,
I am trying to run IDEAR.rmd and get the following error "Warning: Error in winDialog: winDialog() cannot be used non-interactively". Any idea.
Regards,
Amit
session Info:

sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
other attached packages:
[1] rmarkdown_1.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.6     digest_0.6.10   mime_0.5        R6_2.1.3        xtable_1.8-2    magrittr_1.5    evaluate_0.9
[8] stringi_1.1.1   miniUI_0.1.1    shinyjs_0.7     tools_3.3.1     stringr_1.0.0   shiny_0.13.2    httpuv_1.3.3
[15] yaml_2.1.13     rsconnect_0.4.3 htmltools_0.3.5

the rmarkdown log is listed below:
Loading required package: shiny
Listening on http://127.0.0.1:3994
|..                                                               |   3%
inline R code fragments
|....                                                             |   6%
label: unnamed-chunk-1 (with options)
List of 3
$ echo   : logi FALSE
$ message: logi FALSE
$ warning: logi FALSE
processing file: IDEAR.rmd
Quitting from lines 23-240 (IDEAR.rmd)
Warning: Error in winDialog: winDialog() cannot be used non-interactively
Stack trace (innermost first):
105: winDialog
104: eval [#29]
103: eval
102: withVisible
101: withCallingHandlers
100: handle
99: evaluate_call
98: evaluate
97: in_dir
96: block_exec
95: call_block
94: process_group.block
93: process_group
92: withCallingHandlers
91: process_file
90: knitr::knit
89:
88: do.call
87: contextFunc
86: .getReactiveEnvironment()$runWith
85: shiny::maskReactiveContext
84: reactive reactive({
out <- rmd_cached_output(file, encoding)
output_dest <- out$dest
if (out$cached) {
if (nchar(out$resource_folder) > 0) {
shiny::addResourcePath(basename(out$resource_folder),
out$resource_folder)
}
return(out$shiny_html)
}
if (!file.exists(dirname(output_dest))) {
dir.create(dirname(output_dest), recursive = TRUE, mode = "0700")
}
resource_folder <- knitr_files_dir(output_dest)
perf_timer_reset_all()
dependencies <- list()
shiny_dependency_resolver <- function(deps) {
dependencies <<- deps
list()
}
output_opts <- list(self_contained = FALSE, copy_resources = TRUE,
dependency_resolver = shiny_dependency_resolver)
message("\f")
args <- merge_lists(list(input = reactive_file(), output_file = output_dest,
output_dir = dirname(output_dest), output_options = output_opts,
intermediates_dir = dirname(output_dest), runtime = "shiny",
envir = new.env()), render_args)
result_path <- shiny::maskReactiveContext(do.call(render,
args))
if (!dir_exists(resource_folder))
dir.create(resource_folder, recursive = TRUE)
shiny::addResourcePath(basename(resource_folder), resource_folder)
dependencies <- append(dependencies, list(create_performance_dependency(resource_folder)))
write_deps <- base::file(file.path(resource_folder, "shiny.dep"),
open = "wb")
on.exit(close(write_deps), add = TRUE)
serialize(dependencies, write_deps, ascii = FALSE)
if (!isTRUE(out$cacheable)) {
shiny::onReactiveDomainEnded(shiny::getDefaultReactiveDomain(),
function() {
unlink(result_path)
unlink(resource_folder, recursive = TRUE)
})
}
shinyHTML_with_deps(result_path, dependencies)
})
73: doc
72: shiny::renderUI
71: func
70: output$reactivedoc
3:
2: do.call
1: rmarkdown::run

Hi, thanks for the feedback. To run IDEAR, you should open the Run-IDEAR.R in RStudio, and click Source. Was this how you ran it and got the error?

I ran directly IDEAR in R Studio as I was getting error with running Run-IDEAR.R in RStudio. I have opened a separate issue https://github.com/Azure/Azure-TDSP-Utilities/issues/4.
Thanks for the quick response.
Regards,
Amit

Hi, Amitkb3,
For issue #4, we have figured out a possible cause of the error, and provided a way to run IDEAR correctly in RStudio. Basically, you need to (1) Open Run-IDEAR.r in RStudio; (2) Click Source to launch IDEAR. DO NOT execute the code line by line, or select all lines and click Run.
For this issue #3, running IDEAR.rmd directly will fail as expected. IDEAR.rmd should be triggered by Run-IDEAR.r in the way described above.
Hope it helps.
Let us know if you run into any other issue.

repo: Azure/Azure-TDSP-Utilities


text:
Check for previous/existing GitHub issues/module proposals

[X] I have checked for previous/existing GitHub issues/module proposals.

Check this module doesn't already exist in the module indexes

[X] I have checked for that this module doesn't already exist in the module indexes; or I'm proposing the module to be migrated from CARML/TFVM.

Bicep or Terraform?
Terraform
Module Classification?
Pattern Module
Module Name
avm-ptn-azure-ipam
Module Details
A terraform pattern to deploy the https://azure.github.io/ipam/#/ container as a web app with supporting resources.
Supported deployment models are the default public deployment or a virtual network integrated web app that can use service routes or private endpoints to access resources.
Do you want to be the owner of this module?
No
Module Owner's GitHub Username (handle)
No response
(Optional) Secondary Module Owner's GitHub Username (handle)
ChrisChapman-gh

We (BJSS) have most of the terraform written which we can submit as a pull request from a fork.
This should get the module most of the way there.
Were also happy to contribute to the maintenance.

@ChrisChapman-gh thank for proposal. Give as a time to search for module owner.

@prjelesi I'm happy to own and to work with BJSS on this

That would be awesome, thanks Paul.

Hi @pagyP
Thanks for requesting/proposing to be an AVM module owner!
We just want to confirm you agree to the below pages that define what module ownership means:

Team Definitions & RACI
Shared Specification (Bicep & Terraform)
Module Support

Any questions or clarifications needed, let us know!
If you agree, please just reply to this issue with the exact sentence below (as this helps with our automation 👍):
"I CONFIRM I WISH TO OWN THIS AVM MODULE AND UNDERSTAND THE REQUIREMENTS AND DEFINITION OF A MODULE OWNER"
Thanks,
The AVM Core Team
#RR

"I CONFIRM I WISH TO OWN THIS AVM MODULE AND UNDERSTAND THE REQUIREMENTS AND DEFINITION OF A MODULE OWNER"

Hi @prjelesi - What needs to happen next? can we get a repo spun up so I can fork it and start some PRs?
Cheers Chris

Hi @pagyP
Thanks for confirming that you wish to own this AVM module and understand the related requirements and responsibilities!
Before starting development, please ensure ALL the following requirements are met.
Please use the following values explicitly as provided in the module index page:

For your module:

ModuleName - for naming your module
TelemetryIdPrefix - for your module's telemetry

For your module's repository:

Repo name and folder path are defined in RepoURL
Create GitHub teams for module owners and contributors and grant them permissions as outlined here.
Grant permissions for the AVM core team and PG teams on your GitHub repo as described here.

Check if this module exists in the other IaC language. If so, collaborate with the other owner for consistency. 👍
You can now start the development of this module! ✅ Happy coding! 🎉
Please respond to this comment and request a review from the AVM core team once your module is ready to be published! Please include a link pointing to your PR, once available. 🙏
Any further questions or clarifications needed, let us know!
Thanks,
The AVM Core Team

Hi @prjelesi - What needs to happen next? can we get a repo spun up so I can fork it and start some PRs? Cheers Chris

Hi @ChrisChapman-gh , @pagyP will initiate repo creation process and when it is created you will be able to fork and work.
Let me know if you need any help to move fw.

@ChrisChapman-gh I've initiated the repository creation, just pending approval now.

@ChrisChapman-gh repo should now be available https://github.com/Azure/terraform-azurerm-avm-ptn-azure-ipam (thanks for your patience ), please fork and submit a PR as per https://azure.github.io/Azure-Verified-Modules/contributing/terraform/review/

@ChrisChapman-gh are you still planning/able to contribute to this?  Let me know either way please., thanks.

Hi Paul
Yes absolutely – had some leave and then straight onto a new project which has taken a lot of time to get up and running.
I should have some time soon to fork and contribute.
Cheers
Chris
From: Paul Paginton @.>
Sent: Tuesday, September 10, 2024 1:01 PM
To: Azure/Azure-Verified-Modules @.>
Cc: Chris Chapman @.>; Mention @.>
Subject: Re: [Azure/Azure-Verified-Modules] [Module Proposal]: avm-ptn-azure-ipam (Issue #913)
@ChrisChapman-ghhttps://github.com/ChrisChapman-gh are you still planning/able to contribute to this? Let me know either way please., thanks.
—
Reply to this email directly, view it on GitHubhttps://github.com/Azure/Azure-Verified-Modules/issues/913#issuecomment-2340485709, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4J7HYDQZ2YNXPCEEMTSLM3ZV3NQPAVCNFSM6AAAAABG6QBSOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBQGQ4DKNZQHE.
You are receiving this because you were mentioned.Message ID: @.@.>>
The information included in this email and any files transmitted with it may contain information that is confidential and it must not be used by, or its contents or attachments copied or disclosed to, persons other than the intended addressee. If you have received this email in error, please notify BJSS. In the absence of written agreement to the contrary BJSS' relevant standard terms of contract for any work to be undertaken will apply. Please carry out virus or such other checks as you consider appropriate in respect of this email. BJSS does not accept responsibility for any adverse effect upon your system or data in relation to this email or any files transmitted with it. BJSS Limited, a company registered in England and Wales (Company Number 2777575), VAT Registration Number 613295452, Registered Office Address, 1 Whitehall Quay, Leeds, LS1 4HR

Is there any update on this module? I am prepping to deploy IPAM and would like to include this in my pipeline

authors: ChrisChapman-gh bordera-randy pagyP prjelesi

repo: Azure/Azure-Verified-Modules


text:
Blobs with backward slashes in their names are stored with incorrect name

Blobs which have name like "Path\To\My\Blob" are created as "Blob" instead.

@michaelkruglos Please try with Azurite V3 has solid support for blob creation! Will close this issue.

authors: XiaoningLiu michaelkruglos

repo: Azure/Azurite


text:
[blob-storage]BlobClient.getProperties not returning archiveStatus

Which service(blob, file, queue, table) does this issue concern?
blob
Which version of the Azurite was used?
3.3.0-preview
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
What's the Node.js version?
v12.13.0
What problem was encountered?
Unit test failure:
BlobClient.beginCopyFromURL with rehydrate priority
  it.only("beginCopyFromURL with rehydrate priority", async () => {
    recorder.skip("browser");
    const newBlobURL = containerClient.getBlobClient(recorder.getUniqueName("copiedblobrehydrate"));
    const initialTier = BlockBlobTier.Archive;
    const result = await (await newBlobURL.beginCopyFromURL(blobClient.url, {
      tier: initialTier,
      rehydratePriority: "Standard"
    })).pollUntilDone();
    assert.ok(result.copyId);
    delay(1 * 1000);

    const properties1 = await blobClient.getProperties();
    const properties2 = await newBlobURL.getProperties();
    assert.deepStrictEqual(properties1.contentMD5, properties2.contentMD5);
    assert.deepStrictEqual(properties2.copyId, result.copyId);
    assert.deepStrictEqual(properties2.copySource, blobClient.url);
    assert.equal(properties2.accessTier, initialTier);

    await newBlobURL.setAccessTier(BlockBlobTier.Hot);
    const properties3 = await newBlobURL.getProperties();
    assert.equal(properties3.archiveStatus!.toLowerCase(), "rehydrate-pending-to-hot");
  });

assert.equal(properties3.archiveStatus!.toLowerCase(), "rehydrate-pending-to-hot") throw error because properties3.archiveStatus is undefined.
  /**
   * For blob storage LRS accounts, valid values are
   * rehydrate-pending-to-hot/rehydrate-pending-to-cool. If the blob is being rehydrated and is not
   * complete then this header is returned indicating that rehydrate is pending and also tells the
   * destination tier.
   */
  archiveStatus?: string;

Do we support LRS accounts?
Steps to reproduce the issue?
Re-run the test-case.
Have you found a mitigation/solution?
N/A
debug.log
debug.log
request_id
b1b8441a-d563-496d-ba8a-a40650d74307

Should add "archiveStatus" for get properties options.

Per rest doc, valid values are rehydrate-pending-to-hot/rehydrate-pending-to-cool. Since Azurite don't have this pedning status won't fix it.

@XiaoningLiu
Would you please help to close it?

authors: XiaoningLiu blueww ljian3377


text:
Suggestion: Group Monitored Items in one structure in standalone publisher with possibility of trigger

For our use cases we need a set of data points sampled and published in the same message.
Additional, it would be great if all the nodes are publishing when a certain endpoint changes, for example a boolean switching from false to true.
Grouping
We would like to be able to group nodes in the publishednodes.json config file of the standalone publisher.
The configuration could then look like the following with just a new section OpcNodeGroups:
[
    {
        "EndpointUrl": "opc.tcp://host.docker.internal:49322/",
        "UseSecurity": false,
        "OpcNodes": [
            {
                "Id": "ns=2;s=Machine1.Status",
                "OpcSamplingInterval": 1000,
                "OpcPublishingInterval": 5000,
                "DisplayName": "Machine1 Status"
            },
            {
                "Id": "ns=2;s=Machine1.Speed",
                "OpcSamplingInterval": 500,
                "OpcPublishingInterval": 2000,
                "DisplayName": "Machine1 Speed"
            }
        ],
        "OpcNodeGroups": [
            {
                "GroupId": "Machine1",
                "OpcSamplingInterval": 1000,
                "OpcPublishingInterval": 2000,
                "nodes": [
                    {
                        "Id": "ns=2;s=Machine1.Pressure",
                        "DisplayName": "Pressure"
                    },
                    {
                        "Id": "ns=2;s=Machine1.Temperature",
                        "DisplayName": "Temperature"
                    },
                    {
                        "Id": "ns=2;s=Machine1.TorqueA",
                        "DisplayName": "TorqueA"
                    },
                    {
                        "Id": "ns=2;s=Machine1.TorqueB",
                        "DisplayName": "TorqueB"
                    },
                    {
                        "Id": "ns=2;s=Machine1.OrderNumber",
                        "DisplayName": "OrderNumber"
                    },
                    {
                        "Id": "ns=2;s=Machine1.PartNumber",
                        "DisplayName": "PartNumber"
                    },
                    {
                        "Id": "ns=2;s=Machine1.PartFinished",
                        "DisplayName": "PartFinished"
                    }
                ]
            }
        ]
    }
]

The resulting message might then look like this the following sample. The messages asscociated the Group would then have a GroupId.
[
    {
        "NodeId": "nsu=MYServer;s=Machine1.Status",
        "ApplicationUri": "urn:MYSERVER:UA%20Server",
        "DisplayName": "Machine1 Status",
        "Value": {
            "Value": 389,
            "SourceTimestamp": "2020-11-20T15:39:52.2521132Z"
        }
    },
    {
        "NodeId": "nsu=MYServer;s=Machine1.Speed",
        "ApplicationUri": "urn:MYSERVER:UA%20Server",
        "DisplayName": "Machine1 Speed",
        "Value": {
            "Value": -298,
            "SourceTimestamp": "2020-11-20T15:39:52.2521132Z"
        }
    },
    {
        "GroupId": "Machine1",
        "NodeId": "nsu=MYServer;s=Machine1.Pressure",
        "ApplicationUri": "urn:MYSERVER:UA%20Server",
        "DisplayName": "Pressure",
        "Value": {
            "Value": -298,
            "SourceTimestamp": "2020-11-20T15:39:52.2521132Z"
        }
    },
    {
        "GroupId": "Machine1",
        "NodeId": "nsu=MYServer;s=Machine1.Speed",
        "ApplicationUri": "urn:MYSERVER:UA%20Server",
        "DisplayName": "Speed",
        "Value": {
            "Value": -298,
            "SourceTimestamp": "2020-11-20T15:39:52.2521132Z"
        }
    },
    {
        "GroupId": "Machine1",
        "NodeId": "nsu=MYServer;s=Machine1.TorqueA",
        "ApplicationUri": "urn:MYSERVER:UA%20Server",
        "DisplayName": "TorqueA ",
        "Value": {
            "Value": -298,
            "SourceTimestamp": "2020-11-20T15:39:52.2521132Z"
        }
    },
    {
        "GroupId": "Machine1",
        "NodeId": "nsu=MYServer;s=Machine1.TorqueB",
        "ApplicationUri": "urn:MYSERVER:UA%20Server",
        "DisplayName": "TorqueB",
        "Value": {
            "Value": -298,
            "SourceTimestamp": "2020-11-20T15:39:52.2521132Z"
        }
    },
    {
        "GroupId": "Machine1",
        "NodeId": "nsu=MYServer;s=Machine1.OrderNumber",
        "ApplicationUri": "urn:MYSERVER:UA%20Server",
        "DisplayName": "OrderNumber",
        "Value": {
            "Value": -298,
            "SourceTimestamp": "2020-11-20T15:39:52.2521132Z"
        }
    },
    {
        "GroupId": "Machine1",
        "NodeId": "nsu=MYServer;s=Machine1.PartNumber",
        "ApplicationUri": "urn:MYSERVER:UA%20Server",
        "DisplayName": "PartNumber",
        "Value": {
            "Value": -298,
            "SourceTimestamp": "2020-11-20T15:39:52.2521132Z"
        }
    },
    {
        "GroupId": "Machine1",
        "NodeId": "nsu=MYServer;s=Machine1.PartFinished",
        "ApplicationUri": "urn:MYSERVER:UA%20Server",
        "DisplayName": "PartFinished",
        "Value": {
            "Value": -298,
            "SourceTimestamp": "2020-11-20T15:39:52.2521132Z"
        }
    }
]

Trigger for Group
It would be great if all the nodes are publishing when a certain endpoint changes, for example a boolean switching from false to true.
Therefore a Trigger in the OpcNodeGroup would be required, which defines the node for the trigger.
[
    {
        "EndpointUrl": "opc.tcp://host.docker.internal:49322/",
        "UseSecurity": false,
        "OpcNodes": [
            {
                "Id": "ns=2;s=Machine1.Status",
                "OpcSamplingInterval": 1000,
                "OpcPublishingInterval": 5000,
                "DisplayName": "Machine1 Status"
            },
            {
                "Id": "ns=2;s=Machine1.Speed",
                "OpcSamplingInterval": 500,
                "OpcPublishingInterval": 2000,
                "DisplayName": "Machine1 Speed"
            }
        ],
        "OpcNodeGroups": [
            {
                "GroupId": "Machine1",
                "OpcSamplingInterval": 1000,
                "OpcPublishingInterval": 2000,
                "Trigger": {
                    "Id": "ns=2;s=Machine1.PartFinished",
                    "Trigger": {
                        "Type": "Once",
                        "Value": true
                    }
                },
                "nodes": [
                    {
                        "Id": "ns=2;s=Machine1.Pressure",
                        "DisplayName": "Pressure"
                    },
                    {
                        "Id": "ns=2;s=Machine1.Temperature",
                        "DisplayName": "Temperature"
                    },
                    {
                        "Id": "ns=2;s=Machine1.TorqueA",
                        "DisplayName": "TorqueA"
                    },
                    {
                        "Id": "ns=2;s=Machine1.TorqueB",
                        "DisplayName": "TorqueB"
                    },
                    {
                        "Id": "ns=2;s=Machine1.OrderNumber",
                        "DisplayName": "OrderNumber"
                    },
                    {
                        "Id": "ns=2;s=Machine1.PartNumber",
                        "DisplayName": "PartNumber"
                    },
                    {
                        "Id": "ns=2;s=Machine1.PartFinished",
                        "DisplayName": "PartFinished"
                    }
                ]
            }
        ]
    }
]

This is just a proposal /feature request. I'm glad to see other options and possibilities.
Thanks,
Martin

OPC UA PubSub supports datasets, which are equivalent to the subscription (per endpoint, per tag inside endpoint, batches of 1000).  They are part of the same network message (size permitting).
Regarding triggering, this has been requested as "polled" mode, where a set of nodes are sent on a trigger.  This has nothing to do with the way OPC UA subscriptions work, but rather would leverage something like the OPC Twin and a scheduler.
A poll mode issue feature request has been added as #1934.

authors: marcschier martin-weber

repo: Azure/Industrial-IoT


text:
In the case of parallel execution, one succeeds, but all others fail.

While provisioning a container app is in progress, other provision reques will be fail.
We need guidance or solution to this issue.

Cloud you please comment on how to do it, as well as any logs or screen shots?

If the Container App is in the process of provisioning, the following error will occur when the GitHub action is executed.

Looks like retry logic is needed, further investigation is needed to decide which layer the logic should be implemeted in.

I think the workaround would be to implement retry. In addition, I think that it is necessary to decide what it should be by discussing it separately.

@azure/core-rest-pipeline already has retry logic as described at the following documentation.
https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/documentation/pipeline.md
But the status code 409 in this case is not included in retry-target-response-codes as far as reading the following code.
https://github.com/Azure/azure-sdk-for-js/blob/82996230773ab8295f06b17a8b6f449f9d9f2a8c/sdk/core/core-rest-pipeline/src/retryStrategies/exponentialRetryStrategy.ts#L81-L94

Ref: https://github.com/Azure/azure-sdk-for-js/issues/23298

As guidance, at a minimum, the following guidance should be guided.

Run only one workflow at a time
Ref: Workflow syntax for GitHub Actions

The guidance is about GitHub Actions workflows' concurrency.
On the other hands, this issue can be happened when the action runs during any updates from Azure portal, CLI, PowerShell or REST API.

@k-in
Could you please try an action horihiro/aca-preview@v0.2.0-alpha2 that retries 10 times at maxiumum and let me know the result?

Released horihiro/aca-preview@v0.2.0-alpha3 that exposes max retry count as an input max-retries.
https://github.com/horihiro/aca-preview/blob/5d75583459e1a53ed6ebf3f8d956e0144bb7eb68/src/main.ts#L127-L137

By design, currently,

authors: horihiro k-in koudaiii

repo: Azure/aca-review-apps


text:
kubectl should be extracted from the hyperkube image

Say you're working with or testing managed disks. It's vital the kubectl is at the exact same revision as the running apiserver.
If we would extract hyperkube (and thus kubectl) from the container, we could place that on host. We'd also get to eliminate the extra kubectlVersion parameter/variable we have now.

Should be possible to do this with something roughly like: docker run <hyperkube_spec> -v /usr/local/bin:/host cp /hyperkube /host/hyperkube && hyperkube --symlinks

Thinking out loud:
We need to stream line the entire process. This will happen not only during testing beta feature (similar to md) but also when people upgrade cluster to versions that will break existing kubectl. maybe we can create a script toolkit as docker image that has bunch of scripts, one of them can extract kubectl from hyperkube spec. Also consider the reverse, upgrade something opps, now i want my old kubectl back.

Closing this P2 as it is nice to have, but can be currently solved in alternate ways.  We can consider re-opening if we get requests for this.

authors: anhowe colemickens khenidak

repo: Azure/acs-engine

license: mit

license_source: bigquery


text:
Fix potential nil pointer dereference when VM tags are empty

What this PR does / why we need it:
In setting up a regular Jenkins upgrade test with VM tags removed, I found a logging-related panic that this fixes.
If applicable:

[ ] documentation
[ ] unit tests
[ ] tested backward compatibility (ie. deploy with previous version, upgrade with this branch)

Release note:

NONE

/lgtm

authors: jackfrancis mboersma


text:
add crd webhooks

Description
Adds crd webhooks.
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Tested locally and unit tested. Will be e2e tested in a future PR.
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

Pull Request Test Coverage Report for Build 6735804858

224 of 498 (44.98%)  changed or added relevant lines in 5 files are covered.
5 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-5.7%) to 78.448%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/webhook/webhook.go
85
127
66.93%

pkg/webhook/cert.go
24
86
27.91%

pkg/webhook/nginxingress.go
96
180
53.33%

pkg/controller/controller.go
0
86
0.0%

Files with Coverage Reduction
New Missed Lines
%

pkg/controller/controller.go
5
20.34%

Totals

Change from base Build 6722886340:
-5.7%

Covered Lines:
2355

Relevant Lines:
3002

💛  - Coveralls

/ok-to-test sha=399b4f

/ok-to-test sha=399b54f

authors: OliverMKing coveralls

repo: Azure/aks-app-routing-operator


text:
[Discussion] ARRAffinity cookie is changing to become 'HttpOnly'

Discussion thread for https://github.com/Azure/app-service-announcements/issues/12

Hi, re. the SecureOnly flag; without this, anyone using Testing in Production will cause a penetration test to fail, irrespective of the lack of sensitive data in the cookie.  Are there any plans to introduce this?

Hi, Is there any way that we can append the secure tag for ARRAffinity ? I saw this post on msdn blog ( https://blogs.msdn.microsoft.com/webtopics/2018/05/14/securing-the-arraffinity-cookie/ ) I tried that solution for an ASP.NET Core web app but is not working, the ARRAffinity is still without the secure tag.

I'd also like to chime in the same. I agree that it is not a real "risk" but marking it as secure is good practice since it is using HTTPS and should cause no issues.

Just came across this, actually across #12. I needed this for a scenario when I was handling OAuth form a 3rd-party which absolutely didn't understand how OAuth should be implemented, so the 3rd-party was making call to our servers as part of authentication. That way of course any affinity was lost and I needed to pass affinity somehow around in OAuthe state. I had problems to figure out where to get WEBSITE_INSTANCE_ID from.
Hint for anybody who doesn't know where to read it from: Read WEBSITE_INSTANCE_ID from IConfiguration (which is available via DI in .NET Core) like config["WEBSITE_INSTANCE_ID"].

authors: DzonnyDZ alincosmin7 davidebbo glaidler kentongray


text:
setting custom health probe via portal gets reset automatically after some time

Describe the bug
I have deployed Elasticsearch in AKS using the link https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-quickstart.html,
and exposed (public ip / domain) using ingress app gateway.
Using ingress health probe is automatically created for elasticsearch, but since elasticsearch is by default protected with basic auth it returns 401 status code, which causes backend health to fail.
To resolve this, I tried manually editing the health probe from portal and set it as 200-399,401, which resolves the issue for sometime (it gets reset to 200-399 automatically after some time.)

@dipakyadav  By default AGIC assumes full control of the appgw. Hence any manual changes done by you in the application gateway shall be revoked by AGIC whenever any of these actions happen (New Pod launch, New ingress rule addition, Removal of ingress rules etc..). You have two options here, One is defining a ProhibitedTarget (you have to launch AGIC in shared mode for this). Another is editing the health check of the elasticsearch deployment (Editing the existing liveness/readiness probe).
Reference link for Azure Ingress Prohibited target
https://github.com/Azure/application-gateway-kubernetes-ingress/tree/master/crds
This issue shall be closed.

Thanks @vishal8k , will check


text:
Fix bug with "PasswordBoxes-Must-Have-Min-Length" test

Resolved #742 .
Added test case.

Hello @StartAutomating Brian Moore has directed me to you for your help. Here is a description of what we need, in addition to this being merged.

Get the PR merged and a new release performed.
Get Partner Center to uptake the release with the fix.

authors: edburns galiacheng

repo: Azure/arm-ttk


text:
fix e2e test

for #666

/azp run

authors: changlong-liu qiaozha


text:
autorest is adding u8 at the end of the file

Before asking the question:

[x] have you checked the faq, the documentation in the docs folder and couldn't find the information there
[x] have you checked existing issues for a similar question?

We are encountering an issue where we are using .net6, AutoRest code generation utility [cli version: 3.3.2; node: v16.14.2],
config as below
input-file: openapi.json
project-folder: .
output-folder: $(project-folder)/Generated
clear-output-folder: true
csharp: true
public-clients: true
skip-csproj: true
generation1-convenience-client: true
it is adding u8 at the end of many generated string part
ex:
writer.WritePropertyName("contents"u8);
writer.WritePropertyName("protectedFiles"u8);
does anyone know why that's the case? It is causing some error for our build as we current do not support c# version 11 as we are still on .net6. I have tried using many different versions of autorest but it still appends the u8 at end the of the string

This was recently add since it provides a performance improvement in serialization.  We can add a flag to turn this off which you can set in your autorest.md but we will probably keep the default for this to be on.
@AlexanderSher do you mind picking this up?

This was recently add since it provides a performance improvement in serialization. We can add a flag to turn this off which you can set in your autorest.md but we will probably keep the default for this to be on.
@AlexanderSher do you mind picking this up?

is there a specific flag that can be used to force the use of .net6? or csharp v10 instead of v11 ?

authors: jamesfan1 joaobarraca m-nash


text:
[Microsoft Generator CSharp] Migrate All Unbranded Test Projects

As a follow up to https://github.com/Azure/autorest.csharp/issues/4200, all of the remaining unbranded test projects should be migrated to the new generator and should serve as the validation when making changes to the generator code.

I want to consider the trade offs with only having cadl-ranch tests with very few exceptions.

authors: jorgerangel-msft m-nash


text:
skip the validation for external projects

Fixes https://github.com/Azure/autorest.csharp/issues/3179
Description
Add your description here!
Checklist
To ensure a quick review and merge, please ensure:

[ ] The PR has a understandable title and description explaining the why and what.
[ ] The PR is opened in draft if not ready for review yet.

If opened in draft, please allocate sufficient time (24 hours) after moving out of draft for review

[ ] The branch is recent enough to not have merge conflicts upon creation.

Ready to Land?

[ ] Build is completely green

Submissions with test failures require tracking issue and approval of a CODEOWNER

[ ] At least one +1 review by a CODEOWNER
[ ] All -1 reviews are confirmed resolved by the reviewer

Override/Marking reviews stale must be discussed with CODEOWNERS first

@m-nash I made a few changes, could you take a look again?

@m-nash latest regen is here: https://github.com/Azure/azure-sdk-for-net/pull/35727


text:
Release Notes for pre-beta

BEFORE YOU BEGIN: IMPORTANT NOTES
There are a lot of what I consider to be "minor" issues in here. My priority at this point has been to get enough generated code in place to get the complete end-to-end scenarios functioning, and I can worry about the 'details' once we start thoroughly testing.
Modifing the generation is actually really really trivial for me, so I consider the vast majority of the rest of it 'pretty minor'
I have code that's not exposed where auth and other things are handled for generating support for Azure ARM resources, and that's not going help you.
If this doesn't work for for you
Don't panic; this is pre-beta, and it works great for certain scenarios, but they may not be yours
If you can't get it to work with your stuff
Wait till I get back from vacation. I can't really help before I get back.
If you try to use petstore.json for testing
You will be smacked with a newspaper, and I shall not give you a treat.
If you don't think the cmdlets are very good
I should remind you that Jeffrey Snover reviewed this and he thinks a bit different.  You will have to wait till I get back for me to document why this works the way it does. Trust me when I say, I went to great lengths to design things a certain way, and everything has purpose and reason.
Caveats and known issues:
PLEASE IGNORE the errors like:
(they are actually harmless)
Error occurred in handler for 'ReadFile' in session 'session_5':
Error: Could not read 'obj/test.txt'.
    at QuickDataSource.ReadStrict (C:\Users\garretts\.autorest\@microsoft.azure_autorest-core@2.0.4280\node_modules\@microsoft.azure\autorest-core\dist\lib\data-store\data-store.js:26:19)
    at <anonymous>
Error occurred in handler for 'ReadFile' in session 'session_7':
Error: Could not read 'ContainerRegistryManagement.private.csproj'.
    at QuickDataSource.ReadStrict (C:\Users\garretts\.autorest\@microsoft.azure_autorest-core@2.0.4280\node_modules\@microsoft.azure\autorest-core\dist\lib\data-store\data-store.js:26:19)
    at <anonymous>

Bugs

there are a lot of little bugs. I haven't published my backlog yet.

WHAT IS MISSING FROM THIS BUILD

auth support
documentation and explinations.
field/class/property/method descriptions. Some are there, but I gotta go thru and do good pass everywhere.
Handlers for Retry/etc --
Persisting/editing names/parameters/etc for generated commands
use of proxy settings/etc
no support for streams, duration, or arrays at the root/base level of the request/response

Getting Started
Requires:

node 8.11.3 (stay away from node 10 for now
https://nodejs.org/dist/v8.11.3/node-v8.11.3-x64.msi

autorest 2.0.4280+
npm install -g autorest

dotnet 2.0.0 sdk - either install the one from the .net page or use

npm install -g dotnet-sdk-2.0.0

powershell core 6
https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/PowerShell-6.0.2-win-x64.zip

install the autorest.incubator plugin :
autorest --reset
autorest "--use=@microsoft.azure/autorest.incubator@preview"

Usage
autorest  --use="@microsoft.azure/autorest.incubator@preview" --powershell --output-folder=output-folder --input-file=path-or-url-to-swagger-file
sample run:
# run these from powershell core.
# Windows Powershell is not ok.
# The cmdlets can work in both, but be patient

autorest --use="@microsoft.azure/autorest.incubator@preview" --powershell --input-file=https://github.com/Azure/azure-rest-api-specs/blob/master/specification/redis/resource-manager/Microsoft.Cache/stable/2018-03-01/redis.json
--output-folder=./generated

# will generate the cmdlets into the output-folder
cd ./generated

# now we do one last step (build proxies and import the module)
./generate-proxies.ps1 -test

# Now you're in a new pwsh instance with the cmdlets
#example:
get-operation -verbose -debug

One quick comment - we're working through this - small typo on npm install, should be - npm i -g dotnet-sdk-2.0.0 not npm i -g dotnet-sdk.2.0.0

$ sudo npm install -g dotnet-sdk.2.0.0
npm WARN notice Due to a recent security incident, all user tokens have been invalidated. Please see https://status.npmjs.org/incidents/dn7c1fgrr7ng for more details. To generate a new token, visit https://www.npmjs.com/settings/~/tokens
or run "npm login".
npm ERR! code E404
npm ERR! 404 Not Found: dotnet-sdk.2.0.0@latest

don't think it works on centos7

Trying the powershell autorest generation code here: https://github.com/Azure/autorest/tree/master/Samples/1a-code-generation-minimal
$ autorest --use="@microsoft.azure/autorest.incubator@preview" --powershell
AutoRest code generation utility [version: 2.0.4280; node: v10.5.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest

There is a new version of AutoRest available (2.0.4282).
 > You can install the newer version with with npm install -g autorest@latest

   Loading AutoRest core      '/Users/alex.guo/.autorest/@microsoft.azure_autorest-core@2.0.4280/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4280)
   Loading AutoRest extension '@microsoft.azure/autorest.incubator' (preview->1.0.86)
   Loading AutoRest extension '@microsoft.azure/autorest.csharp' (~2.2.51->2.2.67)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.50->2.3.50)

WARNING (UndefinedTypeWithSchema): The schema 'User' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    - swagger-document:1:0

WARNING (UndefinedTypeWithSchema): The schema 'Category' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    - swagger-document:1:0

WARNING (UndefinedTypeWithSchema): The schema 'Pet' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    - swagger-document:1:0

WARNING (UndefinedTypeWithSchema): The schema 'Tag' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    - swagger-document:1:0

WARNING (UndefinedTypeWithSchema): The schema 'Order' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    - swagger-document:1:0

WARNING (TypeFileNotValid): The schema type 'file' is not a OAI standard type. This has been auto-corrected to 'type:string' and 'format:binary'
    - swagger-document:1:0
Error: Format 'Binary' not implemented.
    at SchemaDefinitionResolver.resolveTypeDeclaration (/Users/alex.guo/.autorest/@microsoft.azure_autorest.incubator@1.0.86/node_modules/@microsoft.azure/autorest.incubator/src/csharp/schema/schema-resolver.ts:80:19)
    at nameStuffRight (/Users/alex.guo/.autorest/@microsoft.azure_autorest.incubator@1.0.86/node_modules/@microsoft.azure/autorest.incubator/src/csharp/namer.ts:146:49)
Error: Inputs missing.
    at process (/Users/alex.guo/.autorest/@microsoft.azure_autorest.incubator@1.0.86/node_modules/@microsoft.azure/autorest.incubator/src/csharp/lowlevel-generator/main.ts:20:13)
Error: Inputs missing.
    at Object.processCodeModel (/Users/alex.guo/.autorest/@microsoft.azure_autorest.incubator@1.0.86/node_modules/@microsoft.azure/autorest.incubator/src/common/process-code-model.ts:18:13)
Error: Inputs missing.
    at processRequest (/Users/alex.guo/.autorest/@microsoft.azure_autorest.incubator@1.0.86/node_modules/@microsoft.azure/autorest.incubator/src/powershell/powershell-generator.ts:17:13)

And yes, we realize that test with petstore is a slap on the nose, but given we were having some challenges, we decided to start with the basics as a sanity check

@mallochine : "no support for streams, duration, or arrays at the root/base level of the request/response"

I'm not that familiar with the petstore example (linked in 1a-code-generation-minimal). What is a stream exactly? Is it where 'readme.md' is read into stdin? Should I actually have done --input-file="a.json" or something similar?
If yes to that last question, then I actually still run into the same code generation problem. So, please elaborate on what is a 'stream'?

No; the swagger file has format: binary somewhere in it.
That ends up being a stream. Not yet supported.

Ahha! We've got those all over the place in our code, which means a nice "e brake" for us here :(
Are you back from PTO @fearthecowboy ? Or more apt question - is there another drop that might support binary in the works?
Does it make sense for us to dig into the code and submit a PR, or just leave you too it at this point? No rush, we want to help you out here as much as we can, as i strongly believe that AutoRest is going to be our true north for both traditional client binaries (for other languages) and PowerShell (from the sounds of it)

Spacing between comments and previous code would be great,
        /// The URI for the proxy server to use
        [System.Management.Automation.Parameter(Mandatory = false, DontShow= true, HelpMessage = "The URI for the proxy server to use")]
        public System.Uri Proxy {get;set;}
        /// Credentials for a proxy server to use for the remote call
        [System.Management.Automation.Parameter(Mandatory = false, DontShow= true, HelpMessage = "Credentials for a proxy server to use for the remote call")]
        [System.Management.Automation.ValidateNotNull]
        public System.Management.Automation.PSCredential ProxyCredential {get;set;}

to
        /// The URI for the proxy server to use
        [System.Management.Automation.Parameter(Mandatory = false, DontShow= true, HelpMessage = "The URI for the proxy server to use")]
        public System.Uri Proxy {get;set;}

        /// Credentials for a proxy server to use for the remote call
        [System.Management.Automation.Parameter(Mandatory = false, DontShow= true, HelpMessage = "Credentials for a proxy server to use for the remote call")]
        [System.Management.Automation.ValidateNotNull]
        public System.Management.Automation.PSCredential ProxyCredential {get;set;}

Yes. Agreed. that's been driving me crazy.

For the ItemGroup > PackageReferences - what are your thoughts about adding Rosyln analyzers in there? When we were handcrafting our cmdlets, we found that using the in-built dotnet analyzers did help give us a wee bit of sanity right on build. Before we did that, we ended up chasing half working code in some areas, that various "stuff" caught. I'm happy to send in a PR if you'd like with my ideas @fearthecowboy
I'm talking about this part here: https://github.com/Azure/autorest.incubator/blob/a86ff8df11778f385e41243d90e7169ebe6e3347/src/powershell/powershell-generator.ts#L79

Yeah; we should have it conditional based on a configuration setting.
ie, add one of these: https://github.com/Azure/autorest.incubator/blob/a86ff8df11778f385e41243d90e7169ebe6e3347/src/powershell/project.ts#L304
this.enableRoslynAnalyzer = await service.GetValue('enable-roslyn-analyzer') || false;

and then emit it when project.enableRoslynAnalyzer is set.
(trying to get things more configuration driven)

ok, I'll give it a crack if I can break away a few cycles over the next few days. That seems like a sane approach.
The only tricky-ish bit is that we're statically creating the csproj by basically echo'ing a static config into a file with .writefile at the moment, which itself is fine.
Do we need to change that to be more like the bit right below it in code (the psd1 bit), where it has some conditional logic?
I could change it over to be this in the PR, but wanted to get your thoughts first
https://github.com/Azure/autorest.incubator/blob/a86ff8df11778f385e41243d90e7169ebe6e3347/src/powershell/powershell-generator.ts#L108

Yeah, it'd probably a good idea to move to the text-emitter style; it makes it easy to exclude stuff.

authors: JonKohler deathly809 fearthecowboy mallochine


text:
[typespec-python] when response body is a string, we shouldn't call json on it

typespec here defines our response body as a string: https://github.com/kristapratico/azure-rest-api-specs/blob/azopenai-python/specification/cognitiveservices/OpenAI.Inference/routes.tsp#L131
Generated code tries to call json() on response here and it fails because it's not json:
https://github.com/kristapratico/azure-rest-api-specs/blob/azopenai-python/specification/cognitiveservices/OpenAI.Inference/tsp-output/%40azure-tools/typespec-python/azure/openai/operations/_operations.py#L1335
Not entirely sure, but I think the code should be something like:
deserialized = _deserialize(
    str, response.text()
)

Will discuss about it in scrum meeting

authors: kristapratico msyyc


text:
BluePrint configure resourceGroup tags from parameter

I am trying to configure tags for ResourceGroups from the blueprints and I am experiencing some issue.
In the example below I am want to parse the Tags as an object parameter:
{
  "properties": {
    "type": "Microsoft.Blueprint/blueprints",
    "description": "Management Blueprint",
    "targetScope": "subscription",
    "parameters": {
      "tags": {
        "type": "object",
        "metadata": {
          "displayName": "Enter the Tags that need to be configured"
        },
        "defaultValue": {
          "tags1": "value1",
          "tags2": "value2"
        }
      }
    },
    "resourceGroups": {
      "ResourceGroup1": {
        "name": "resourceGroup01",
        "location": "westeurope",
        "metadata": {
          "displayName": "resourceGroup01"
        },
        "dependsOn": [],
        "tags": "[parameters('tags')]"
      }
    }
  }
}

However, the above template returns the error message below:
Import-AzBlueprintWithArtifact: Can't deserialize the JSON file '/management/Blueprint.json'.  'Error converting value "[parameters('tags')]" to type 'System.Collections.Generic.IDictionary`2[System.String,System.String]'. Path 'tags', line 26, position 38.'

When I configure the Tags on ResourceGroup and use a String parameter as input it works fine:
{
    "properties": {
      "type": "Microsoft.Blueprint/blueprints" ,
        "description": "Management Blueprint",
        "targetScope": "subscription",
        "parameters": {
          "tagsvalue": {
            "type": "string",
            "defaultValue": "value1"
          }

        },
        "resourceGroups": {
              "ResourceGroup1": {
                "name": "resourceGroup01",
                "location": "westeurope",
                "metadata": {
                  "displayName": "resourceGroup01"
                },
                "dependsOn": [],
                "tags": {
                  "Tags1": "[parameters('tagsvalue')]"
                }
              }
        }
    }
  }

Is this a bug or is it not possible to forward an object to the Tags part?

+1

I don't think we support object parameters. I think the tag values need to be passed individually. Have you tried that?

Hi  @pkhabazi
The reason I believe you are getting the error message 'Error converting value "[parameters('tags')]" to type 'System.Collections.Generic.IDictionary`2[System.String,System.String]' is because the "[parameters('tags')]" expression within the resourceGroups section does not actually get substituted with the "tags" object you defined in the parameters section. The ARM interpreter is passing a literal string "[parameters('tags')]" to the function that attempts conversion to a System.Collections.Generic.IDictionary<String,String> object and that is why it fails.
So in your first example, you are actually trying to pass a string to the tags element while it is expecting an object. In your second example, you are passing an object. Keep in mind that in the second example, the "[parameters('tagsvalue')]" string is also not getting replaced with "value1" when you run the Import-AzBlueprintWithArtifact command. It just sets the value of the "Tags1" key to the "[parameters('tagsvalue')]" string.
VS Code's syntax highlighting for ARM templates is misleading in this case. The color coding for the "[parameters('tags')]" expression in the resourceGroups section should be represented in the standard red denoting a string.

authors: DennisR73 alex-frankel felipebbc pkhabazi

repo: Azure/azure-blueprints


text:
Azure DevOps CLI Create Service Connection with Installation Token

Extension name: Azure DevOps
Description
How do I create a GitHub service connection using an InstallationToken (the installed GitHub app) instead of an OAuth flow/PAT?
I can see the following service connection in one of my existing orgs, by running:
az devops service-endpoint list
[
  {
    "authorization": {
      "scheme": "InstallationToken"
    },
    "createdBy": {
      ...
    },
    "data": {
      "AvatarUrl": "https://avatars3.githubusercontent.com/u/63518284?v=4",
      "pipelinesSourceProvider": "github"
    },
   ...
    "type": "GitHub",
    "url": "https://github.com"
  }
]

But how do I create such a connection using the DevOps CLI? It only seems to support OAuth or entering a PAT when creating a GitHub connection.

devops

Bump. Not supported?

This would be really useful. At the moment using terraform for devops isn't really possible without this

As a workaround, I've tried using the az devops service-endpoint create --org [ORG] -p [PROJECT] --service-endpoint-configuration CustomServiceEndpoint.json with the file below, without much luck. When I access the project build information got the error
An error occurred while fetching the pipeline. TF400864: The Item specified by the key '26501285-261b-409c-b7ce-154f1da82d74' does not exist. where the key 26501285... is the actual project id
  {
    "description": "",
    "administratorsGroup": null,
    "authorization": {
      "parameters": {
        "accessToken": null
      },
      "scheme": "InstallationToken"
    },
    "createdBy": null,
    "data": {
      "AvatarUrl": "https://avatars2.githubusercontent.com/u/2916417?v=4",
      "pipelinesSourceProvider": "github"
    },
    "name": "SomeName",
    "type": "GitHub",
    "url": "https://github.com",
    "readersGroup": null,
    "groupScopeId": null,
    "serviceEndpointProjectReferences": null,
    "operationStatus": null,
    "isReady": true,
    "isShared": false,
    "owner": "Library"
  }

Don't have the specs for this json and since I cannot create it by hand I cannot follow the https://docs.microsoft.com/en-gb/azure/devops/cli/service-endpoint?view=azure-devops#create-service-endpoint-using-a-configuration-file to get the json.
If any one figures this json schema, drop here a message.

This process is terrbile and not really fit for production but you can sort of manage it via terraform. I haven't tried creating one via the cli. You can create an oauth service connection in terraform:
resource "azuredevops_serviceendpoint_github" "organisation" {
  project_id            = azuredevops_project.platform.id
  service_endpoint_name = "some_org"
  description           = ""

  auth_oauth {
    oauth_configuration_id = "000000000-0000-0000-0000-000000000000"
  }
}

Which you then have to go an manually authorize as the azuredevops_resource_authorization resource doesn't work. You can then go to your pipeline and "convert" the oauth service endpoint to an "app connection", like this:

This creates a new service connection named "my connection (1)" or whatever you called it. You can them import this new object to terraform with terraform import azuredevops_serviceendpoint_github.s projectid/service-endpoint-id and use it for any new pipelines for that project. I haven't come acorss a scenario where you'd need multiple github connections per project so it seems to be a one time operation.
resource "azuredevops_serviceendpoint_github" "s" {
  project_id            = azuredevops_project.platform.id
  service_endpoint_name = "my connection (1)"
   description           = ""
}

authors: admin-simeon b0bu crmitchelmore saamorim yonzhan

repo: Azure/azure-cli-extensions


text:
This page is incorrect

The examples are different from the definitions.
Also, --group-name is now --name.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 01f8fe72-48f6-2e30-0741-d83bafc5d438
Version Independent ID: 32ed6908-2c71-3c17-683b-d07eb08d4590
Content: az account management-group
Content Source: latest/docs-ref-autogen/ext/managementgroups/account/management-group.yml
Service: azure
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

Yeah, I see this too. Various commands are mixing up the az account management-group with the az cli extension for managementgroups.

Please remove this page, or reference to the correct cli https://docs.microsoft.com/en-us/cli/azure/account/management-group?view=azure-cli-latest  -- this caused much confusion.

Thank all for the findings. I will remove this extension from this repo.

authors: KevinBrooke bebattis jiasli kylecweeks


text:
AZ image copy between different EA subscription ( same location/Different location) not working.

If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli

Extension name (the extension in question)
az image copy
Description of issue (in as much detail as possible)
Throws error while copying the image from one EA subscription to another subscription. Tried with same location also different location.
command failed: ['/opt/az/bin/python3', '-m', 'azure.cli', 'group', 'create', '--name', 'image-copy-rg', '--location', 'southindia', '--output', 'json', '--subscription', '****', '--tags', 'created_by=image-copy-extension']
output: ERROR: Operation failed with status: 'Forbidden'. Details: 403 Client Error: Forbidden for url: https://management.azure.com/subscriptions//resourcegroups/image-copy-rg?api-version=2018-05-01
The command failed with an unexpected error. Here is the traceback:
Command '['/opt/az/bin/python3', '-m', 'azure.cli', 'group', 'create', '--name', 'image-copy-rg', '--location', 'southindia', '--output', 'json', '--subscription', '**********', '--tags', 'created_by=image-copy-extension']' returned non-zero exit status 1.
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 351, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 409, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 402, in _run_job
six.reraise(sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 171, in call
return self.handler(args, kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 451, in default_command_handler
return op(command_args)
File "/home/jaya/.azure/cliextensions/image-copy-extension/azext_imagecopy/custom.py", line 104, in imagecopy
target_subscription)
File "/home/jaya/.azure/cliextensions/image-copy-extension/azext_imagecopy/custom.py", line 193, in create_resource_group
run_cli_command(cli_cmd)
File "/home/jaya/.azure/cliextensions/image-copy-extension/azext_imagecopy/cli_utils.py", line 35, in run_cli_command
raise ex
File "/home/jaya/.azure/cliextensions/image-copy-extension/azext_imagecopy/cli_utils.py", line 21, in run_cli_command
cmd_output = check_output(cmd, stderr=STDOUT, universal_newlines=True)
File "/opt/az/lib/python3.6/subprocess.py", line 336, in check_output
kwargs).stdout
File "/opt/az/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/opt/az/bin/python3', '-m', 'azure.cli', 'group', 'create', '--name', 'image-copy-rg', '--location', 'southindia', '--output', 'json', '--subscription', '', '--tags', 'created_by=image-copy-extension']' returned non-zero exit status 1.

@jayaakshayan the command failed because the temporary resource group creation failed - see the first few lines of your message.
Is the user running the image copy command has permissions to create new resource groups?
If not, a quick workaround is to pre-create the group manually just like this command tries to do:
command failed: ['/opt/az/bin/python3', '-m', 'azure.cli', 'group', 'create', '--name', 'image-copy-rg', '--location', 'southindia', '--output', 'json', '--subscription', '*************', '--tags', 'created_by=image-copy-extension']

Thanks Tamir, it was policy level restriction not to create resource group with out tag, I have removed the policy for the specific resource group which sorted out the issue.

authors: jayaakshayan tamirkamara


text:
[Front Door] Add update func for backend and fix backend_host_header

Fix issues:

https://github.com/Azure/azure-cli/issues/17270
https://github.com/Azure/azure-cli/issues/17269

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

[ ] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
[ ] Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

Front Door

Please update extension version and history before release.

authors: 00Kai0 kairu-ms yonzhan


text:
serviceconnector-passwordless update dependency

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

General Guidelines

[x] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
[x] Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

serviceconnector

Hi @jsntcy, could you help merge the PR. It's an urgent fix.


text:
Add new params to support auto binding

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

Add arguments --bind-service-registry in spring app create.
Add arguments --bind-application-configuration-service in spring app create.

General Guidelines

[ ] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
[x] Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Thank you for your contribution! We will review the pull request and get back to you soon.

Please fix CI issues.

authors: moarychan yonzhan


text:
Failure in running az vmss update on diskprofile

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az vmss update
Errors:
pop from empty list
Traceback (most recent call last):
Temp\pip-install-qxmmnr17\knack\knack\cli.py, ln 206, in invoke
azure\cli\core\commands\__init__.py, ln 603, in execute
azure\cli\core\commands\__init__.py, ln 661, in _run_jobs_serially
azure\cli\core\commands\__init__.py, ln 654, in _run_job
Local\Temp\pip-install-qxmmnr17\six\six.py, ln 693, in reraise
azure\cli\core\commands\__init__.py, ln 631, in _run_job
azure\cli\core\commands\__init__.py, ln 305, in __call__
azure\cli\core\commands\arm.py, ln 525, in handler
azure\cli\core\commands\arm.py, ln 806, in set_properties
azure\cli\core\commands\arm.py, ln 968, in _get_name_path
IndexError: pop from empty list

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az vmss update -g {} -n {} --set {} {} {}

Expected Behavior
Environment Summary
Windows-10-10.0.18362-SP0
Python 3.6.6
Shell: cmd.exe

azure-cli 2.0.72

Additional Context

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az vmss update
Errors:
pop from empty list
Traceback (most recent call last):
Temp\pip-install-qxmmnr17\knack\knack\cli.py, ln 206, in invoke
azure\cli\core\commands\__init__.py, ln 603, in execute
azure\cli\core\commands\__init__.py, ln 661, in _run_jobs_serially
azure\cli\core\commands\__init__.py, ln 654, in _run_job
Local\Temp\pip-install-qxmmnr17\six\six.py, ln 693, in reraise
azure\cli\core\commands\__init__.py, ln 631, in _run_job
azure\cli\core\commands\__init__.py, ln 305, in __call__
azure\cli\core\commands\arm.py, ln 525, in handler
azure\cli\core\commands\arm.py, ln 806, in set_properties
azure\cli\core\commands\arm.py, ln 968, in _get_name_path
IndexError: pop from empty list

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az vmss update --name {} -g {} --set {} {} {}

Expected Behavior
Environment Summary
Windows-10-10.0.18362-SP0
Python 3.6.6
Shell: cmd.exe

azure-cli 2.0.72

Additional Context

The same works from Powershell
PS C:\Users\naragati> $vmss = Get-AzVmss -ResourceGroupName "inmobilab" -VMScaleSetName "navininmboi"
PS C:\Users\naragati> $vmss.VirtualMachineProfile.StorageProfile.OsDisk.DiskSizeGB = 512
PS C:\Users\naragati> $vmss | Update-AzVmss
ResourceGroupName                      : inmobilab
Sku                                    :
Name                                 : Standard_DS1_v2
Tier                                 : Standard
Capacity                             : 2
UpgradePolicy                          :
Mode                                 : Manual
VirtualMachineProfile                  :
OsProfile                            :
ComputerNamePrefix                 : navininmb
AdminUsername                      : navin
LinuxConfiguration                 :
DisablePasswordAuthentication    : False
ProvisionVMAgent                 : True
StorageProfile                       :
ImageReference                     :
Publisher                        : Canonical
Offer                            : UbuntuServer
Sku                              : 16.04-LTS
Version                          : latest
OsDisk                             :
Caching                          : ReadWrite
CreateOption                     : FromImage
DiskSizeGB                       : 512
ManagedDisk                      :
StorageAccountType             : Premium_LRS
NetworkProfile                       :
NetworkInterfaceConfigurations[0]  :
Name                             : navininmboiNic
Primary                          : True
EnableAcceleratedNetworking      : False
NetworkSecurityGroup             :
Id                             : /subscriptions/8d2d94f8-2e1c-428f-9e66-d36fd0b60f42/resourceGroups/inmobilab/p
roviders/Microsoft.Network/networkSecurityGroups/navininmboinsg
DnsSettings                      :
IpConfigurations[0]              :
Name                           : navininmboiIpConfig
Subnet                         :
Id                           : /subscriptions/8d2d94f8-2e1c-428f-9e66-d36fd0b60f42/resourceGroups/inmobilab/p
roviders/Microsoft.Network/virtualNetworks/inmobi/subnets/default
PublicIPAddressConfiguration   :
Name                         : pub1
IdleTimeoutInMinutes         : 15
PrivateIPAddressVersion        : IPv4
EnableIPForwarding               : False
Priority                             : Regular
ProvisioningState                      : Succeeded
Overprovision                          : True
DoNotRunExtensionsOnOverprovisionedVMs : False
UniqueId                               : 78e029f1-e242-42ac-9c62-a4fa2fe1b388
SinglePlacementGroup                   : True
PlatformFaultDomainCount               : 5
Id                                     : /subscriptions/8d2d94f8-2e1c-428f-9e66-d36fd0b60f42/resourceGroups/inmobilab/p
roviders/Microsoft.Compute/virtualMachineScaleSets/navininmboi
Name                                   : navininmboi
Type                                   : Microsoft.Compute/virtualMachineScaleSets
Location                               : centralus
Tags                                   : {}

@qwordy  please take a look and response.

Thanks for you feedback.
Could you please run az vmss update --name {} -g {} --set {} {} {} --debug and paste the output here

Hi, could you provide more detailed info? You can paste the full command here except sensitive information like resource group or name, so that I can diagnose it.

Hi,
I’ve updated the outputs in the github page on same day.
Regards,
Navin
From: Feiyue Yu notifications@github.com
Sent: Sunday, September 8, 2019 7:05 PM
To: Azure/azure-cli azure-cli@noreply.github.com
Cc: Navin Kumar Ragati Navin.Ragati@microsoft.com; Author author@noreply.github.com
Subject: Re: [Azure/azure-cli] Failure in running az vmss update on diskprofile (#10464)
Hi, could you provide more detailed info? You can paste the full command here except sensitive information like resource group or name, so that I can diagnose it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-cli%2Fissues%2F10464%3Femail_source%3Dnotifications%26email_token%3DANDUPBGI6J4VA4KPN3SRWJDQIWVODA5CNFSM4IUM55J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6GBI6Y%23issuecomment-529273979&data=02|01|Navin.Ragati%40microsoft.com|d963abc0fa37468c6fce08d734ca2bf8|72f988bf86f141af91ab2d7cd011db47|1|0|637035915245571635&sdata=WQ9f%2FBg1tOT39SnycxPNOhRLO%2Bj%2FDcfqr9M07hru27A%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FANDUPBAOZBNXADKZRU7MAETQIWVODANCNFSM4IUM55JQ&data=02|01|Navin.Ragati%40microsoft.com|d963abc0fa37468c6fce08d734ca2bf8|72f988bf86f141af91ab2d7cd011db47|1|0|637035915245581631&sdata=u%2Ftut06gS0gdTQ4kqOh6QGQEj02lgXNPJ9GxadioFVE%3D&reserved=0.

This is the same command that I ran the other day for my internal lab
C:\Users\naragati>az vmss update -g inmobilab -n navininmboi --set VirtualMachineProfile.StorageProfile.OsDisk.DiskSizeGB = 512

Do you have a space between DiskSizeGB and 512?
It's the problem. I see the same error if I insert space between key and value.
Space is used to separate multiple key-value pairs in --set.
However, I think the error message is confusing. I plan to make it more user-friendly.

Thanks for the feedback, yeah if the error message can be user friendly it would help in self-serving.
From: Feiyue Yu notifications@github.com
Sent: Monday, September 9, 2019 11:09 PM
To: Azure/azure-cli azure-cli@noreply.github.com
Cc: Navin Kumar Ragati Navin.Ragati@microsoft.com; Author author@noreply.github.com
Subject: Re: [Azure/azure-cli] Failure in running az vmss update on diskprofile (#10464)
Do you have a space between DiskSizeGB and 512?
It's the problem. I see the same error if I insert space between key and value.
Space is used to separate multiple key-value pairs in --set.
However, I think the error message is confusing. I plan to make it more user-friendly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-cli%2Fissues%2F10464%3Femail_source%3Dnotifications%26email_token%3DANDUPBDOFWAWWYL4NNHZV4DQI42W7A5CNFSM4IUM55J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6J6FPA%23issuecomment-529785532&data=02|01|Navin.Ragati%40microsoft.com|c15301258386494e7aa908d735b5582f|72f988bf86f141af91ab2d7cd011db47|1|0|637036925364059850&sdata=HNju57Epu%2BuIG8G9MWfflQtG8mxrKWYd2zjnqw0g%2BrE%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FANDUPBBNDXPRLNAZUPW6EJTQI42W7ANCNFSM4IUM55JQ&data=02|01|Navin.Ragati%40microsoft.com|c15301258386494e7aa908d735b5582f|72f988bf86f141af91ab2d7cd011db47|1|0|637036925364069848&sdata=mc3fQiUllzlhSgDo%2FBcjBE9T2nV2B2KpgChJrfE3yVY%3D&reserved=0.

Add to Sprint 75. Make error message more understandable.

The user's problem has been solved. However, we'll improve user experience by providing more accurate error information in future release. Close the issue.

I have made the error message more clear. PR merged.

authors: naragati qwordy yonzhan

repo: Azure/azure-cli


text:
az vmss update can't set osDisk caching to None

This is autogenerated. Please review and update as needed.
Describe the bug
These commands work:
$ az vmss update --set virtualMachineProfile.storageProfile.osDisk.caching=ReadOnly
# outputs
...
      "storageProfile": {
        "osDisk": {
          "caching": "ReadOnly"
...
$ az vmss update --set virtualMachineProfile.storageProfile.osDisk.caching=ReadWrite
# outputs
...
      "storageProfile": {
        "osDisk": {
          "caching": "ReadWrite"
...

This one does not. It returns successfully but will not change the value of the field to "None".
$ az vmss update --set virtualMachineProfile.storageProfile.osDisk.caching=None
# outputs
...
      "storageProfile": {
        "osDisk": {
          "caching": "ReadWrite"
...

If I try to PATCH the VMSS directly and then update all instances via the CLI, the operation succeeds. So it's not an API level issue, the bug is in CLI or Python SDK.
ace@ace-vm:~$ cat patch.json
{
    "properties": {
        "virtualMachineProfile": {
            "storageProfile": {
                "osDisk": {
                    "caching": "None"
                }
            }
        }
    }
}
ace@ace-vm:~$
ace@ace-vm:~$ az rest --method patch --uri "${VMSS_RESOURCE_ID}?api-version=2020-06-01" --body "${PATCH}"
...
      "storageProfile": {
        "osDisk": {
          "caching": "None"
...

Command Name
az vmss update
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
Create a VMSS with ReadWrite/ReadOnly OS disk caching, then try this:
az vmss update -g {} -n {} --set virtualMachineProfile.storageProfile.osDisk.caching=None

Expected Behavior
It should change the caching mode to None, as demonstrated via the patch.
Environment Summary
Linux-5.4.0-37-generic-x86_64-with-debian-bullseye-sid
Python 3.6.10
Installer: DEB

azure-cli 2.11.1

Extensions:
kusto 0.1.0 (dev) /home/ace/code/azure-cli-extensions/src/kusto
aks-preview 0.4.62 (dev) /home/ace/code/azure-cli-extensions/src/aks-preview

Additional Context

hi @qwordy could you pls help to look at is this a partial patch issue? thanks.

You can't set it to None through PUT. None means don't change. It keeps the old value. This is designed by service.

@qwordy can you please explain the sample output for my PATCH? 'None' does NOT mean "don't change". It is a valid value from the service perspective?

I disagree that this works as intended. Please see my workaround for this bug: https://github.com/alexeldeib/azbench/blob/3d59017d1a0c3dcb5a6a9a06088ff825da5145e3/scripts/cluster.sh#L73-L88

It is a known issue in Azure CLI. The default implementation of update command in CLI is using PUT. We are migrating it to PATCH. It is a long term plan.

authors: alexeldeib qwordy yungezz