[BUG] Publishing APIs fails with errors 409 PessimisticConcurrencyConflict or 422 ManagementApiRequestFailed

Release version
APIOPS v5.0.0
Describe the bug
Publishing process fails on the random API (all objects before are deployed fine) with one of two errors:

System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/sub/resourceGroups/apim-name/providers/Microsoft.ApiManagement/service/apim-name/apis/api-name?api-version=2022-04-01-preview failed with status code 422. Content is '{"error":{"code":"ManagementApiRequestFailed","message":"Failed to connect to management endpoint apim-name.management.azure-api.net:3443 for a service deployed in a Virtual Network. Make sure to follow guidance at https://aka.ms/apim-vnet-common-issues for Inbound connectivity to Management endpoint. Check 'ApiManagement Control Plane - inbound' connectivity at https://aka.ms/apimnetworkstatus.","details":null,"innerError":null}}'.
System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/sub/resourceGroups/apim-name/providers/Microsoft.ApiManagement/service/apim-name/apis/another-api-name?api-version=2022-04-01-preview failed with status code 409. Content is '{"error":{"code":"PessimisticConcurrencyConflict","message":"Operation on the API is in progress","details":null}}'. build	27-Feb-2024 10:57:33	         at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri)

Expected behavior
We would like to be able to run publishing without errors.
Actual behavior
We have a quite large list of objects (APIs, products, tags, NVs, backends) we publish with APIOPS. Unfortunately publishing process fails on the random API (all objects before are deployed fine) with one of two errors:

System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/sub/resourceGroups/apim-name/providers/Microsoft.ApiManagement/service/apim-name/apis/api-name?api-version=2022-04-01-preview failed with status code 422. Content is '{"error":{"code":"ManagementApiRequestFailed","message":"Failed to connect to management endpoint apim-name.management.azure-api.net:3443 for a service deployed in a Virtual Network. Make sure to follow guidance at https://aka.ms/apim-vnet-common-issues for Inbound connectivity to Management endpoint. Check 'ApiManagement Control Plane - inbound' connectivity at https://aka.ms/apimnetworkstatus.","details":null,"innerError":null}}'.
System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/sub/resourceGroups/apim-name/providers/Microsoft.ApiManagement/service/apim-name/apis/another-api-name?api-version=2022-04-01-preview failed with status code 409. Content is '{"error":{"code":"PessimisticConcurrencyConflict","message":"Operation on the API is in progress","details":null}}'. build	27-Feb-2024 10:57:33	         at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri)

Interestingly this was happening rarely on all our environments, but recently (since a month or so) it almost always fails on our UAT instance of APIM, but other environments are still affected at 1/10 of deployments.
Reproduction Steps
We cannot share contents of our repo here, but can run it during the online meeting.

Perhaps this is related to numer of objects being published - maybe we hit hardware limits, management API quotas, West EU resource shortage?

28 backends
43 NamedValues
23 Products
36 tags
31 VersionSets
other objects.
28 APIs (the go as last and usually fail at 15th-20th API)

Since these look like transient errors, maybe there should be retry policy implemented somewhere here: https://github.com/Azure/apiops/blob/156314ff120d1ae7ccbc392699a0fd09270a611d/tools/code/publisher/Program.cs#L193C1-L194C1 and number of retries provided as configuration parameter.

I feel like this topic has been discussed before. Can you please take a look at the closed issues and if you can't find anything, let me know and I will loop in the lead dev on this.

It was discussed under 141 and was fixed.
It seems we are facing similar problem with apiops v5. The last comment in 141 mentioned that adding versionsets may cause it - will check and let you know tomorrow.

If that resolves it please remember to tag this as a duplicate before you close.

We did couple of runs to find any pattern, unfortunately it is still failing on random APIs.
Below call stacks of both types of errors:
crit: Publisher[0] build   04-Mar-2024 11:38:08         System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/XXXXXXXXXXXX/resourceGroups/XXXXXXXXX/providers/Microsoft.ApiManagement/service/xxxxxxxxxx/apis/ksef-invoice?api-version=2022-04-01-preview failed with status code 409. Content is '{"error":{"code":"PessimisticConcurrencyConflict","message":"Operation on the API is in progress","details":null}}'. build   04-Mar-2024 11:38:08            at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri) build   04-Mar-2024 11:38:08            at common.HttpPipelineExtensions.PutResource(HttpPipeline pipeline, Uri uri, JsonObject resource, CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at publisher.Program.<>c__DisplayClass12_0.<<GetPutRestResource>b__0>d.MoveNext() build   04-Mar-2024 11:38:08         --- End of stack trace from previous location --- build   04-Mar-2024 11:38:08            at publisher.Api.PutApi(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at publisher.Api.<>c__DisplayClass23_0.<<ProcessArtifactsToPut>b__4>d.MoveNext() build   04-Mar-2024 11:38:08         --- End of stack trace from previous location --- build   04-Mar-2024 11:38:08            at System.Threading.Tasks.Parallel.<>c__501.<b__50_0>d.MoveNext()
build   04-Mar-2024 11:38:08         --- End of stack trace from previous location ---
build   04-Mar-2024 11:38:08            at common.IEnumerableExtensions.ForEachParallel[T](IEnumerable1 enumerable, Func2 action, CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Api.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at publisher.Service.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, ListRestResources listRestResources, PutRestResource putRestResource, DeleteRestResource deleteRestResource, ILogger logger, CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Publisher.RunWithoutCommitId(CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Publisher.Run(CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08   info: Microsoft.Hosting.Lifetime[0]
build   04-Mar-2024 11:38:08         Application is shutting down...
build   04-Mar-2024 11:38:08   fail: Microsoft.Extensions.Hosting.Internal.Host[9]
build   04-Mar-2024 11:38:08         BackgroundService failed
build   04-Mar-2024 11:38:08         System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/XXXXXXXXXXXX/resourceGroups/XXXXXXXXX/providers/Microsoft.ApiManagement/service/xxxxxxxxxx/apis/ksef-invoice?api-version=2022-04-01-preview failed with status code 409. Content is '{"error":{"code":"PessimisticConcurrencyConflict","message":"Operation on the API is in progress","details":null}}'.
build   04-Mar-2024 11:38:08            at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri)
build   04-Mar-2024 11:38:08            at common.HttpPipelineExtensions.PutResource(HttpPipeline pipeline, Uri uri, JsonObject resource, CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Program.<>c__DisplayClass12_0.<b__0>d.MoveNext()
build   04-Mar-2024 11:38:08         --- End of stack trace from previous location ---
build   04-Mar-2024 11:38:08            at publisher.Api.PutApi(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Api.<>c__DisplayClass23_0.<b__4>d.MoveNext()
build   04-Mar-2024 11:38:08         --- End of stack trace from previous location ---
build   04-Mar-2024 11:38:08            at System.Threading.Tasks.Parallel.<>c__501.<<ForEachAsync>b__50_0>d.MoveNext() build   04-Mar-2024 11:38:08         --- End of stack trace from previous location --- build   04-Mar-2024 11:38:08            at common.IEnumerableExtensions.ForEachParallel[T](IEnumerable1 enumerable, Func2 action, CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at publisher.Api.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Service.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, ListRestResources listRestResources, PutRestResource putRestResource, DeleteRestResource deleteRestResource, ILogger logger, CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at publisher.Publisher.RunWithoutCommitId(CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at publisher.Publisher.Run(CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService) build   04-Mar-2024 11:38:08   dbug: Microsoft.Extensions.Hosting.Internal.Host[3] build   04-Mar-2024 11:38:08         Hosting stopping build   04-Mar-2024 11:38:08   crit: Microsoft.Extensions.Hosting.Internal.Host[10] build   04-Mar-2024 11:38:08         The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted. build   04-Mar-2024 11:38:08         System.Net.Http.HttpRequestException: HTTP request to URI  https://management.azure.com/subscriptions/XXXXXXXXXXXX/resourceGroups/XXXXXXXXX/providers/Microsoft.ApiManagement/service/xxxxxxxxxx/apis/ksef-invoice?api-version=2022-04-01-previewfailed with status code 409. Content is '{"error":{"code":"PessimisticConcurrencyConflict","message":"Operation on the API is in progress","details":null}}'. build   04-Mar-2024 11:38:08            at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri) build   04-Mar-2024 11:38:08            at common.HttpPipelineExtensions.PutResource(HttpPipeline pipeline, Uri uri, JsonObject resource, CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at publisher.Program.<>c__DisplayClass12_0.<<GetPutRestResource>b__0>d.MoveNext() build   04-Mar-2024 11:38:08         --- End of stack trace from previous location --- build   04-Mar-2024 11:38:08            at publisher.Api.PutApi(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at publisher.Api.<>c__DisplayClass23_0.<<ProcessArtifactsToPut>b__4>d.MoveNext() build   04-Mar-2024 11:38:08         --- End of stack trace from previous location --- build   04-Mar-2024 11:38:08            at System.Threading.Tasks.Parallel.<>c__501.<b__50_0>d.MoveNext()
build   04-Mar-2024 11:38:08         --- End of stack trace from previous location ---
build   04-Mar-2024 11:38:08            at common.IEnumerableExtensions.ForEachParallel[T](IEnumerable1 enumerable, Func2 action, CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Api.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken) build   04-Mar-2024 11:38:08            at publisher.Service.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, ListRestResources listRestResources, PutRestResource putRestResource, DeleteRestResource deleteRestResource, ILogger logger, CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Publisher.RunWithoutCommitId(CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Publisher.Run(CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken)
build   04-Mar-2024 11:38:08            at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
build   04-Mar-2024 11:38:08   dbug: Microsoft.Extensions.Hosting.Internal.Host[4]
build   04-Mar-2024 11:38:08         Hosting stopped`
and 422:
failed with status code **422**. Content is '{"error":{"code":"ManagementApiRequestFailed","message":"Failed to connect to management endpoint xxxxx.management.azure-api.net:3443 for a service deployed in a Virtual Network. Make sure to follow guidance at https://aka.ms/apim-vnet-common-issues for Inbound connectivity to Management endpoint. Check 'ApiManagement Control Plane - inbound' connectivity at [https://aka.ms/apimnetworkstatus.","details":null,"innerError":null}](https://aka.ms/apimnetworkstatus.%22,%22details%22:null,%22innerError%22:null%7d)}'. build   04-Mar-2024 09:28:40            at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri) build   04-Mar-2024 09:28:40            at common.HttpPipelineExtensions.**WaitForLongRunningOperation**(HttpPipeline pipeline, Response response, CancellationToken cancellationToken) build   04-Mar-2024 09:28:40            at common.HttpPipelineExtensions.PutResource(HttpPipeline pipeline, Uri uri, JsonObject resource, CancellationToken cancellationToken) build   04-Mar-2024 09:28:40            at publisher.Program.<>c__DisplayClass12_0.<<GetPutRestResource>b__0>d.MoveNext() build   04-Mar-2024 09:28:40         --- End of stack trace from previous location --- build   04-Mar-2024 09:28:40            at publisher.Api.PutApi(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken) build   04-Mar-2024 09:28:40            at publisher.Api.<>c__DisplayClass23_0.<<ProcessArtifactsToPut>b__4>d.MoveNext() build   04-Mar-2024 09:28:40         --- End of stack trace from previous location --- build   04-Mar-2024 09:28:40            at System.Threading.Tasks.Parallel.<>c__501.<b__50_0>d.MoveNext()
build   04-Mar-2024 09:28:40         --- End of stack trace from previous location ---
build   04-Mar-2024 09:28:40            at common.IEnumerableExtensions.ForEachParallel[T](IEnumerable1 enumerable, Func2 action, CancellationToken cancellationToken)
build   04-Mar-2024 09:28:40            at publisher.Api.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken) build   04-Mar-2024 09:28:40            at publisher.Service.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, ListRestResources listRestResources, PutRestResource putRestResource, DeleteRestResource deleteRestResource, ILogger logger, CancellationToken cancellationToken)
build   04-Mar-2024 09:28:40            at publisher.Publisher.RunWithoutCommitId(CancellationToken cancellationToken)
build   04-Mar-2024 09:28:40            at publisher.Publisher.Run(CancellationToken cancellationToken)
build   04-Mar-2024 09:28:40            at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken)
build   04-Mar-2024 09:28:40            at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
build   04-Mar-2024 09:28:40   dbug: Microsoft.Extensions.Hosting.Internal.Host[3]
build   04-Mar-2024 09:28:40         Hosting stopping
build   04-Mar-2024 09:28:40   crit: Microsoft.Extensions.Hosting.Internal.Host[10]
build   04-Mar-2024 09:28:40         The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.`

@mgrabarz - the code should already use these default retry settings.
If you enable Trace logging, you should see the contents of each PUT request (including the ones that fail). Can you share the contents of one of those failing API calls? Please sanitize the logs before sharing.

When sanitising the PUT logs I just noticed that API being put at
URI https://management.azure.com/subscriptions/subID/resourceGroups/xxx-resougroup-uat-1/providers/Microsoft.ApiManagement/service/xxx-APIM-uat-1/apis/apiName?api-version=2022-04-01-preview..
References the following VersionSet in the body: "apiVersionSetId": "/subscriptions/subId/resourceGroups/xxx-resougroup-dev-1/providers/Microsoft.ApiManagement/service/xxx-APIM-dev-1/apiVersionSets/yyy
Not sure if this is generating the errors and what is the root cause of these being part of the body (extractor maybe, or pull request error), but need to investigate. I will reach back to you with findings.

The code is exported from the DEV environment, so a snapshot of what is set in DEV is pulling to bitbucket. When publishing, we indicate the configuration file with which we overwrite some values, e.g. backends, namedValues, diagnostics. We follow https://github.com/Azure/apiops/blob/main/configuration.prod.yaml
I haven't found any information anywhere that requires overwriting apiVersionSetId. In other environments, the publisher handles this.

I replaced the references in the code before publishing. The same errors appear, so these references do not matter, especially since the publication is successful in a different environment (SIT).

Sample http 422 error with trace=true when publishing API:
crit: Publisher[0]
System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/xxx-xxx-xxxxxx-resougroup-pre-1/providers/Microsoft.ApiManagement/service/xxxx-xxx-xxxxx-APIM-pre-1/apis/kojot-risks-sls?api-version=2022-04-01-preview&asyncId=65e9c35d4634611804b2f14a&asyncCode=200&t=638454155601197471&c=MIIHADCCBeigAwIBAgITHgPqjiEYPbwplso53QAAA-qOITANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMxMTUwNjMwWhcNMjUwMTI1MTUwNjMwWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM9KMX78fyew-eiggqjYM5A7ayuz0272xkOMnGH7qgN4mYZWzDMuFkoNaICFPynTgipZL2O0kJl7_KksAG5PRkxKu8bCPX3kO5_6vZohrPzoA4JXM1Jio7ZjNJgr8AHujjthjLWyW57mLuXN-UsiSNtEzvAltEoC3RXjdmhvb5Y6pPkXH9pqkVHedQyErBC4GtX4MCPLUNA73oD4IZMnhTmr40ghlOdWrJvrhbFvUZ2wt0Dypyrbpsznd_EaLmIP6xb6jnYJkKGN3iodNY6d4iXW4_ObOfAFkQ6gZBwsRwsmCsY4sYKmwWeJPJ0OxDHrUsydUN5FzP1Fr4lN13CH6jUCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCC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wYBBAGCN3sBATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAH5dY2xStVXS4iEp6x4nkeI2ACLGgnndFlt7lOoqMvMBpFG6KYBENcNLPAn_ICeKj5MznB_5EUQjTj2a62ltfNYKyjBv9pi8C7siGtRBvArDUJ0190Q1YW1uKGu5mBao3mZ3THTIw3ykZDXyYwk7yv94xHqlfQIRZsex4HYQ4WKwtU7x2suTztZ-F8ps-IIh-wSxr005kAmMunvpSpoTp4cmx8cUv68vtCj-iCL7b3R3uZRO2FYiNibQP5c3NgyURhem3d2_itbwFWBo3tXCfm-iQkevoQfx8h9YeitwpIXlFHVRRbbdls8uN0vCF7bUUHTuAkzGw_DuC9LiMV9upIk&s=iQdEuXQ_zv4OJ66KeMpxUDMH_6hOjf7TxhZ8EbFohIhL-48ytJEklL2qaJsflHzqqVO1BizQueLHCyIb3cbL5piM3ufL4PEXoqmgaWJoBY8IYgl2fvslI40iV7Vg_tQOFidlW6PRLaexU7PiLURskFS63hA1YFQGw-R04G9JKLX8LoBFxRAZqqAPLK25UmSBCfdECg5CLxD2RDmd762TRZSgEpXZTx2JctoKdEntHkk0-NueyjbyQ_m08UEsZuTRv5imK67XDF1xyYUtGe82uRpR4vft8aQqsBmv3zh49AfLVbMMv5yX6ju6g0TqrDCtRX4oft0IhUnEYKtsa-P3Sw&h=f4y2gAxBfjT30-AVZyGi2NljfG6zxytUfjfJWHyK2Fg failed with status code 422. Content is '{"error":{"code":"ManagementApiRequestFailed","message":"Failed to connect to management endpoint xxxx-xxx-xxxxx-APIM-pre-1.management.azure-api.net:3443 for a service deployed in a Virtual Network. Make sure to follow guidance at https://aka.ms/apim-vnet-common-issues for Inbound connectivity to Management endpoint. Check 'ApiManagement Control Plane - inbound' connectivity at https://aka.ms/apimnetworkstatus.","details":null,"innerError":null}}'.
at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri)
at common.HttpPipelineExtensions.WaitForLongRunningOperation(HttpPipeline pipeline, Response response, CancellationToken cancellationToken)
at common.HttpPipelineExtensions.PutResource(HttpPipeline pipeline, Uri uri, JsonObject resource, CancellationToken cancellationToken)
at publisher.Program.<>c__DisplayClass12_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at publisher.Api.PutApi(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Api.<>c__DisplayClass23_0.<b__4>d.MoveNext()
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__501.<<ForEachAsync>b__50_0>d.MoveNext()       --- End of stack trace from previous location ---          at common.IEnumerableExtensions.ForEachParallel[T](IEnumerable1 enumerable, Func2 action, CancellationToken cancellationToken)          at publisher.Api.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Service.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, ListRestResources listRestResources, PutRestResource putRestResource, DeleteRestResource deleteRestResource, ILogger logger, CancellationToken cancellationToken)          at publisher.Publisher.RunWithoutCommitId(CancellationToken cancellationToken)          at publisher.Publisher.Run(CancellationToken cancellationToken)          at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken) info: Microsoft.Hosting.Lifetime[0]       Application is shutting down... fail: Microsoft.Extensions.Hosting.Internal.Host[9]       BackgroundService failed       System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/xxx-xxx-xxxxxx-resougroup-pre-1/providers/Microsoft.ApiManagement/service/xxxx-xxx-xxxxx-APIM-pre-1/apis/koj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x4nkeI2ACLGgnndFlt7lOoqMvMBpFG6KYBENcNLPAn_ICeKj5MznB_5EUQjTj2a62ltfNYKyjBv9pi8C7siGtRBvArDUJ0190Q1YW1uKGu5mBao3mZ3THTIw3ykZDXyYwk7yv94xHqlfQIRZsex4HYQ4WKwtU7x2suTztZ-F8ps-IIh-wSxr005kAmMunvpSpoTp4cmx8cUv68vtCj-iCL7b3R3uZRO2FYiNibQP5c3NgyURhem3d2_itbwFWBo3tXCfm-iQkevoQfx8h9YeitwpIXlFHVRRbbdls8uN0vCF7bUUHTuAkzGw_DuC9LiMV9upIk&s=iQdEuXQ_zv4OJ66KeMpxUDMH_6hOjf7TxhZ8EbFohIhL-48ytJEklL2qaJsflHzqqVO1BizQueLHCyIb3cbL5piM3ufL4PEXoqmgaWJoBY8IYgl2fvslI40iV7Vg_tQOFidlW6PRLaexU7PiLURskFS63hA1YFQGw-R04G9JKLX8LoBFxRAZqqAPLK25UmSBCfdECg5CLxD2RDmd762TRZSgEpXZTx2JctoKdEntHkk0-NueyjbyQ_m08UEsZuTRv5imK67XDF1xyYUtGe82uRpR4vft8aQqsBmv3zh49AfLVbMMv5yX6ju6g0TqrDCtRX4oft0IhUnEYKtsa-P3Sw&h=f4y2gAxBfjT30-AVZyGi2NljfG6zxytUfjfJWHyK2Fg failed with status code 422. Content is '{"error":{"code":"ManagementApiRequestFailed","message":"Failed to connect to management endpoint xxxx-xxx-xxxxx-APIM-pre-1.management.azure-api.net:3443 for a service deployed in a Virtual Network. Make sure to follow guidance at https://aka.ms/apim-vnet-common-issues for Inbound connectivity to Management endpoint. Check 'ApiManagement Control Plane - inbound' connectivity at https://aka.ms/apimnetworkstatus.","details":null,"innerError":null}}'.          at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri)          at common.HttpPipelineExtensions.WaitForLongRunningOperation(HttpPipeline pipeline, Response response, CancellationToken cancellationToken)          at common.HttpPipelineExtensions.PutResource(HttpPipeline pipeline, Uri uri, JsonObject resource, CancellationToken cancellationToken)          at publisher.Program.<>c__DisplayClass12_0.<<GetPutRestResource>b__0>d.MoveNext()       --- End of stack trace from previous location ---          at publisher.Api.PutApi(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)          at publisher.Api.<>c__DisplayClass23_0.<<ProcessArtifactsToPut>b__4>d.MoveNext()       --- End of stack trace from previous location ---          at System.Threading.Tasks.Parallel.<>c__501.<b__50_0>d.MoveNext()
--- End of stack trace from previous location ---
at common.IEnumerableExtensions.ForEachParallel[T](IEnumerable1 enumerable, Func2 action, CancellationToken cancellationToken)
at publisher.Api.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)          at publisher.Service.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, ListRestResources listRestResources, PutRestResource putRestResource, DeleteRestResource deleteRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Publisher.RunWithoutCommitId(CancellationToken cancellationToken)
at publisher.Publisher.Run(CancellationToken cancellationToken)
at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
dbug: Microsoft.Extensions.Hosting.Internal.Host[3]
Hosting stopping
dbug: Microsoft.Extensions.Hosting.Internal.Host[4]
Hosting stopped
crit: Microsoft.Extensions.Hosting.Internal.Host[10]
The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/xxx-xxx-xxxxxx-resougroup-pre-1/providers/Microsoft.ApiManagement/service/xxxx-xxx-xxxxx-APIM-pre-1/apis/kojot-risks-sls?api-version=2022-04-01-preview&asyncId=65e9c35d4634611804b2f14a&asyncCode=200&t=638454155601197471&c=MIIHADCCBeigAwIBAgITHgPqjiEYPbwplso53QAAA-qOITANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwMTMxMTUwNjMwWhcNMjUwMTI1MTUwNjMwWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM9KMX78fyew-eiggqjYM5A7ayuz0272xkOMnGH7qgN4mYZWzDMuFkoNaICFPynTgipZL2O0kJl7_KksAG5PRkxKu8bCPX3kO5_6vZohrPzoA4JXM1Jio7ZjNJgr8AHujjthjLWyW57mLuXN-UsiSNtEzvAltEoC3RXjdmhvb5Y6pPkXH9pqkVHedQyErBC4GtX4MCPLUNA73oD4IZMnhTmr40ghlOdWrJvrhbFvUZ2wt0Dypyrbpsznd_EaLmIP6xb6jnYJkKGN3iodNY6d4iXW4_ObOfAFkQ6gZBwsRwsmCsY4sYKmwWeJPJ0OxDHrUsydUN5FzP1Fr4lN13CH6jUCAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHM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HSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAH5dY2xStVXS4iEp6x4nkeI2ACLGgnndFlt7lOoqMvMBpFG6KYBENcNLPAn_ICeKj5MznB_5EUQjTj2a62ltfNYKyjBv9pi8C7siGtRBvArDUJ0190Q1YW1uKGu5mBao3mZ3THTIw3ykZDXyYwk7yv94xHqlfQIRZsex4HYQ4WKwtU7x2suTztZ-F8ps-IIh-wSxr005kAmMunvpSpoTp4cmx8cUv68vtCj-iCL7b3R3uZRO2FYiNibQP5c3NgyURhem3d2_itbwFWBo3tXCfm-iQkevoQfx8h9YeitwpIXlFHVRRbbdls8uN0vCF7bUUHTuAkzGw_DuC9LiMV9upIk&s=iQdEuXQ_zv4OJ66KeMpxUDMH_6hOjf7TxhZ8EbFohIhL-48ytJEklL2qaJsflHzqqVO1BizQueLHCyIb3cbL5piM3ufL4PEXoqmgaWJoBY8IYgl2fvslI40iV7Vg_tQOFidlW6PRLaexU7PiLURskFS63hA1YFQGw-R04G9JKLX8LoBFxRAZqqAPLK25UmSBCfdECg5CLxD2RDmd762TRZSgEpXZTx2JctoKdEntHkk0-NueyjbyQ_m08UEsZuTRv5imK67XDF1xyYUtGe82uRpR4vft8aQqsBmv3zh49AfLVbMMv5yX6ju6g0TqrDCtRX4oft0IhUnEYKtsa-P3Sw&h=f4y2gAxBfjT30-AVZyGi2NljfG6zxytUfjfJWHyK2Fg failed with status code 422. Content is '{"error":{"code":"ManagementApiRequestFailed","message":"Failed to connect to management endpoint xxxx-xxx-xxxxx-APIM-pre-1.management.azure-api.net:3443 for a service deployed in a Virtual Network. Make sure to follow guidance at https://aka.ms/apim-vnet-common-issues for Inbound connectivity to Management endpoint. Check 'ApiManagement Control Plane - inbound' connectivity at https://aka.ms/apimnetworkstatus.","details":null,"innerError":null}}'.
at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri)
at common.HttpPipelineExtensions.WaitForLongRunningOperation(HttpPipeline pipeline, Response response, CancellationToken cancellationToken)
at common.HttpPipelineExtensions.PutResource(HttpPipeline pipeline, Uri uri, JsonObject resource, CancellationToken cancellationToken)
at publisher.Program.<>c__DisplayClass12_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at publisher.Api.PutApi(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Api.<>c__DisplayClass23_0.<b__4>d.MoveNext()
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__501.<<ForEachAsync>b__50_0>d.MoveNext()       --- End of stack trace from previous location ---          at common.IEnumerableExtensions.ForEachParallel[T](IEnumerable1 enumerable, Func2 action, CancellationToken cancellationToken)          at publisher.Api.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Service.ProcessArtifactsToPut(IReadOnlyCollection`1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, ListRestResources listRestResources, PutRestResource putRestResource, DeleteRestResource deleteRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Publisher.RunWithoutCommitId(CancellationToken cancellationToken)
at publisher.Publisher.Run(CancellationToken cancellationToken)
at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)

Sample http 409 error form publisher trace:
info: Publisher[0]
Putting API ksef-invoice...
trce: PutRestResource[0]
Beginning request to put REST resource {
"properties": {
"apiRevision": "1",
"apiVersion": "v1",
"apiVersionSetId": "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/xxxx-xxx-xxxxx-resougroup-pre-1/providers/Microsoft.ApiManagement/service/xxxx-xxx-xxxxx-pre-1/apiVersionSets/xxxxxxxxxxxxxxxxxxxxxxx",
"authenticationSettings": {},
"contact": {
"email"<EMAIL_ADDRESS>"name": "ksef-invoice",
"url": http://wiki.pzu.pl/confluence/display/HIP/Hybrydowa\u002BPlatforma\u002BIntegracji\u002B-\u002BHIP
},
"description": "\u003Cp\u003E\u003Cfont size=\u00222\u0022\u003EAPI na platformie HIP Sahul do obs\u0142ugi faktur wysy\u0142anych do systemu zewn\u0119trznego KSEF. Wszystkie operacje wymagaj\u0105 podania w nag\u0142\u00F3wku HTTP tokena sesji interaktywnej otwartej w KSEF.\u003Cbr/\u003EAPI udost\u0119pnia metody:\u003Cul\u003E\u003Cli\u003E\u003Cb\u003EPUT /ksef/invoice\u003C/b\u003E - wysy\u0142ka faktury xml, zgodnej ze schematem KSEF udost\u0119pnianym na stronie Ministerstwa Finans\u00F3w: https://ksef-test.mf.gov.pl/. Operacja wymaga podania zawarto\u015Bci XML zakodowanego do postaci base64. W przypadku wysy\u0142ki faktury w trybie szyfrowanym nale\u017Cy ustawi\u0107 flag\u0119: encryption=true oraz poda\u0107 wektor inicjalizacyjny do szyfrowania wygenerowany podczas otwierania sesji interaktywnej w KSEF.\u003C/li\u003E\u003Cli\u003E\u003Cb\u003EGET /ksef/invoice/status/\u003Ci\u003E{elementReferenceNumber}\u003C/i\u003E\u003C/b\u003E - pobranie statusu faktury przes\u0142anej do KSEF w ramach tej samej sesji interaktywnej. Pobranie odbywa si\u0119 za pomoc\u0105 unikalnego numeru referencyjnego faktury przekazywanego w parametrze, wygenerowanego przez KSEF podczas wysy\u0142ki.\u003C/li\u003E\u003C/ul\u003EAby uzyska\u0107 dost\u0119p do us\u0142ugi nale\u017Cy doda\u0107 u\u017Cytkownika technicznego do grupy AD: \u003Cb\u003Ehip_ksef_user \u003Ci\u003E(_dev/_int/_uat/_pre)\u003C/i\u003E\u003C/b\u003E.\u003C/font\u003E\u003C/p\u003E",
"displayName": "ksef-invoice",
"isCurrent": true,
"license": {
"name": "Grupa PZU",
"url": http://www.pzu.pl/
},
"path": "ksef/invoice",
"protocols": [
"http",
"https"
],
"serviceUrl": https://uat-gw-apim.pzu.pl/ksef/invoice/v1,
"subscriptionKeyParameterNames": {
"header": "Ocp-Apim-Subscription-Key",
"query": "subscription-key"
},
"subscriptionRequired": false,
"format": "openapi",
"value": "{.....................}"
}
} at URI https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/xxxx-xxx-xxxxx-resougroup-pre-1/providers/Microsoft.ApiManagement/service/xxxx-xxx-xxxxx-pre-1/apis/ksef-invoice?api-version=2022-04-01-preview...
crit: Publisher[0]
System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/xxxx-xxx-xxxxx-resougroup-pre-1/providers/Microsoft.ApiManagement/service/xxxx-xxx-xxxxx-pre-1/apis/ksef-invoice?api-version=2022-04-01-preview failed with status code 409. Content is '{"error":{"code":"ManagementApiRequestFailed","message":"Connection was closed unexpectedly by endpoint xxxx-xxx-xxxxx-pre-1.management.azure-api.net:3443 for the Developer SKU service which will have inherent downtime during underneath platform upgrades. Please refer to SLA at https://aka.ms/apimsla and considering upgrading to a SKU Tier with higher SLA.","details":null,"innerError":null}}'.
at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri)
at common.HttpPipelineExtensions.PutResource(HttpPipeline pipeline, Uri uri, JsonObject resource, CancellationToken cancellationToken)
at publisher.Program.<>c__DisplayClass12_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at publisher.Api.PutApi(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Api.<>c__DisplayClass23_0.<b__4>d.MoveNext()
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__501.<<ForEachAsync>b__50_0>d.MoveNext()       --- End of stack trace from previous location ---          at common.IEnumerableExtensions.ForEachParallel[T](IEnumerable1 enumerable, Func2 action, CancellationToken cancellationToken)          at publisher.Api.ProcessArtifactsToPut(IReadOnlyCollection1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Service.ProcessArtifactsToPut(IReadOnlyCollection`1 files, JsonObject configurationJson, ServiceDirectory serviceDirectory, ServiceUri serviceUri, ListRestResources listRestResources, PutRestResource putRestResource, DeleteRestResource deleteRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Publisher.RunWithoutCommitId(CancellationToken cancellationToken)
at publisher.Publisher.Run(CancellationToken cancellationToken)
at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken)

@adkasperski - The version set issue makes sense.  You can't publish an API and reference a version set in another APIM instance. You should be able to override any property supported by the REST API in your environment's configuration file. For the version set ID, I expect it will look something like this:
apis
- name: myapi
  properties:
    apiVersionSetId: yourversionsetid

As for last comment, this is not an ApiOps issue - has to do with the fact that you're using the Developer SKU (which has no SLA). Every now and then, the APIM team makes changes to the platform, and instances using that SKU are unavailable while the changes happen. You'll just have to wait and try again later, or use a different SKU.

One other thing when overriding: I've noticed that many APIM resource ID properties also support a shorter format if it's in the same instance. Rather than specifying a full version set resource ID that includes the subscription, resource group, and instance name(/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}), you may be able to just specify /apiVersionSets/{versionSetId}. Haven't tested this personally, but it might work.

@adkasperski please let us know if the shortened format that @guythetechie is suggesting works so we can update our wiki.

Thanks. I'll check the @guythetechie suggestion and get back the result.

The following configuration works correctly:
apis:

name: sample-api
properties:
apiVersionSetId: "/apiVersionSets/653f85cb2dbf4ce375624664"

On the other hand if we shorten the API specification, the publisher will also work correctly:
{
"properties": {
"apiRevision": "1",
"apiVersion": "v1",
"apiVersionSetId": "/apiVersionSets/653f85cb2dbf4ce375624664",
....
But it does not resolve the problem. Errors still appear. I think this is not an APIOPs problem, but a problem with the availability of the APIM service. We've already created the ticket to Microsoft APIM Support.

We have noticed that in UAT/PRE environments where these errors occur, the publishing time of individual, even small API components (named values, backends, version set, etc.) takes significantly longer than in the PRD environment where these errors do not occur. Up to several dozen API components are published per second on PRD, while on UAT/PRE it takes more than 10 seconds to publish a single component. We read the publication durations from the Activity Logs in the Management Plane of the APIM service.
Are any timeouts set in apiops tools? And could the publishing problems be caused by some other apiops settings?

Just as a piece of information, but every time we receive a 409 in the publisher pipeline, the APIM Management endpoint seems also irresponsive, so much so I receive an error if I try to open the APIs definitions from the Azure Portal. It happens every time

Please see this section in my response. The developer SKU often goes offline for maintenance. I would recommend using non-developer SKUs if you need more availability.

As for last comment, this is not an ApiOps issue - has to do with the fact that you're using the Developer SKU (which has no SLA). Every now and then, the APIM team makes changes to the platform, and instances using that SKU are unavailable while the changes happen. You'll just have to wait and try again later, or use a different SKU.

Just to be sure, only the management portal goes sometimes offline while the gateway still works? I'm asking because when happened to us, request where processed correctly even if the pipeline was failing for those errors.

We use Developer SKU for non-production environments.
The answer from MS Support:
This is not an ApiOps issue - has to do with the fact that you're using the Developer SKU (which has no SLA). Every now and then, the APIM team makes changes to the platform, and instances using that SKU are unavailable while the changes happen. You'll just have to wait and try again later, or use a different SKU.


Can md_in_html be used for a Grid layout?

I'm facing a weird issue, where using markdown in a div for a Grid setup is rendering the first grid section, but not the second one next to it.
As an example, the following setup:

## Getting Started

You can install the library as shown here.

## Configuration

TODO: Install code

...is rendering like this:

As you can see is the code block rendered, but the H2 header is for whatever reason not.
I'm not sure if any extra steps are required here. I tried with markdown="1", markdown="block" and markdown="span" but neither did change the result.
I also tried adding the tag to the div section of the second grid block without any success.
Here are the relevant CSS parts if they are of any importance:

/* Grid stuff */

.mdx-grid-container {
    background-color: var(--md-admonition-bg-color);
    padding: 1rem;
}

.mdx-grid-container h2, .mdx-grid-container h3 {
    text-align: center;
    margin-top: 0;
}

.mdx-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media only screen and (max-width: 600px) {
    .mdx-grid-wrapper {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.mdx-grid-child {
    background-color: var(--md-default-bg-color);
    padding: 0.5rem;
}

What happens if you put a space between the two divs?

What happens if you put a space between the two divs?

Same result

Try this, it works for me. You have to apply markdown to all block elements. It does not apply them recursively and automatically.

## Getting Started

You can install the library as shown here.

## Configuration

```
TODO: Install code
```

That seems to do the trick


[OOBE] add PT hero image

Summary of the Pull Request
What is this about:
Add PT hero image
What is include in the PR:
How does someone test / validate:
Quality Checklist

[ ] Linked issue: #xxx
[ ] Communication: I've discussed this with core contributors in the issue.
[ ] Tests: Added/updated and all pass
[ ] Installer: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Docs: Added/ updated
[ ] Binaries: Any new files are added to WXS / YML

[ ] No new binaries
[ ] YML for signing for new binaries
[ ] WXS for installer for new binaries

Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.

I see why i missed this.  i searched for FluentIconsFancyZones
          <File Source="$(var.BinX64Dir)Settings\Assets\FluentIcons\FluentIcons$(var.File)" />


Improve documentation on how to check the code style

The documentation in Contributing to the community/Introduction/Code style now covers instructions on checking codes using pre-commit and python-related tools i.e. isort. Yapf, docformmater, and prospector. It seems that it recommends users first, running pre-commit and then run one of those tools to fix any formatting errors and invalid syntax. This section benefits from a better explanation/structure on what checks are actually needed.

@SarahAlidoost The documentation has been restructured some time ago. Is this still an issue?


simplify Micromasters dedp indicator in intermediate and mart tables

What are the relevant tickets?
https://github.com/mitodl/hq/issues/3934
Description (What does it do?)
Eliminate dedp indicator field from int__micromasters__course_certificates it's only used in the marts__micromasters_summary and there we added code to pull it from int__mitx__programs there. Replaced complicated if statement on int__micromasters__course_enrollments with the is_dedp_program field on int__mitx__programs.  These changes are based on feedback from Rachel as well.
How can this be tested?
dbt build --select int__micromasters__course_certificates
dbt build --select int__micromasters__course_enrollments
dbt build --select marts__micromasters_summary

I took a look the counts and I have purposely improved them in the latest version.  in the old version this single enrollment was counting twice when it should have only been counted once:
select *
from int__micromasters__course_enrollments
where courserun_readable_id= 'MITx/14.73x/1T2021'
and user_email=<EMAIL_ADDRESS>


chore: update readme

Include examples of implmenting hooks and providers
Include CONTRIBUTING.md

Signed-off-by: Benjamin Evenson<EMAIL_ADDRESS>

Codecov Report

Merging #41 (3002333) into main (d78d448) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #41   +/-   ##
=======================================
  Coverage   99.33%   99.33%
=======================================
  Files          15       15
  Lines         303      303
  Branches       24       24
=======================================
  Hits          301      301
  Partials        2        2

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@beeme1mr Thanks for the review, I've addressed above.


Cm readme inference update

Changes:

Added tips for Intel and Reference implementations
Added reference to installation page before cm commands.
changed --docker_cm_repo <Custom CM repo URL> to --docker_cm_repo=<Custom CM repo URL>
Changed the code version from v4.1 to v4.1-dev
Model name printed inside the main.py

deployed: https://anandhu-eng.github.io/inference/


unknown hotspot in influx and dashboard

Hi mate,
I originally posted this to just say thanks. I didn't have any issues yesteday - but couldn't find any other way to say thanks for putting this together. I was using konstk1's original one after you provided some fixes, but this version with the grafana dash is brilliant.
...but i was just checking out the dashboard this evening and noticed that there's a third hotspot which is not in my configuration.
I've got two helium hotspot id's set using the HELIUM_HOTSPOT docker variable which has been fine since 28/04. I'm not sure where the third hotspot has come from or why its in there...
Thanks again 👍

I believe this was resolved. I had similar issues but changed a lot of code since then.


x/tools/godoc: static files links old tour mod/url

What did you do?
View the main page of a godoc server under Sub-repositories
http://<IP_ADDRESS>:6060/pkg/#subrepo
What did you expect to see?
Links to the current tour (under x/website) and and tour URL go.dev/tour
What did you see instead?
Old (x/tour) mod link and tour.golang.org.

@golang/tools-team

The godoc command was deprecated


cargo-bloat: 0.8.2 -> 0.8.3

Motivation for this change
Update cargo-bloat to the latest release.

https://github.com/RazrFalcon/cargo-bloat/releases/tag/v0.8.3

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Notify maintainers
cc @

@GrahamcOfBorg build cargo-bloat


Replace rand crate with fastrand

We're only using rand crate in a single place in the "production" part of our Rust code:
https://github.com/newsboat/newsboat/blob/f2a9fd644946d1a64a40c50919b7b749e8934063/rust/libnewsboat/src/utils.rs#L249-L251
(And also in tests, but those are only compiled by developers and, sometimes, package maintainers, so are less of an issue.)
Yet this crate is quite heavy: according to cargo -Z timings, it accounts for 8.9 seconds of CPU time on my machine (including getrandom).
We should replace it with https://crates.io/crates/fastrand, which is smaller. It's not a cryptographically secure RNG, but since we're using it for shuffling items, it's fine.
We also transitively depend on rand via gettext-sys because tempfile depends on rand. So if you're feeling adventurous, go push https://github.com/Stebalien/tempfile/pull/118 to the completion too :)
The Newsboat part of the work sounds simple enough, so this is a "good first issue". Please drop a comment here if you need more advice or run into some trouble!

Stebalien/tempfile#118 got replaced by https://github.com/Stebalien/tempfile/pull/141, which only enabled a couple features on the rand crate. We could do the same here.

(And also in tests, but those are only compiled by developers and, sometimes, package maintainers, so are less of an issue.)
Should fastrand also be used in tests so that rand can be completely removed?


settings_org: Fix incorrect selector for the save changes button.

This change fixes a bug where pressing Enter does not save the
changes as expected, due to an incorrect selector, when the
save/discard changes button shows up in settings. Tested by changing
the Organization name and pressing Enter at Manage Organization >
Organization profile > Organization name.

This seems correct, but should we as a follow-up change the HTML for settings_save_discard_widget.hbs to use actual button elements rather than divs with type="button"?  I'm not sure there's a good reason for the current pattern.

Yeah, I am looking into this. Having <span> inside a <button> is totally valid.


Installation and Setup issue

The ng new  command never finishes, but the project seems to have been created, however after that I run the command npm install angularfire2 firebase --save and I get several UNMET DEPENDENCY messages...

/ Installing packages for tooling via npm
Terminate batch job (Y/N)?

See #325.

Simply install it from GitHub directly:
npm install git+https://github.com/angular/angularfire2.git

npm install git+https://github.com/angular/angularfire2.git --save

is this closed?


Diksha summary-rollup Periodic Selection is not working

In admin console, Click on the configuration and select from date, To date and stopping hours in the Diksha summary-rollup Periodic Selection.
Issue : Error found while configuring diksha

@Sharathnaik38 I updated the python files please re-test.

Closing this defect as it has been test validated successfully


Allow sending 50m+ files to telegram channels

This PR switches the Telegram connector from Bot API to the Core API, resolves #23 and likely closes #31.
Before and after:

Known issues

Technically it should be possible to inject the author into the feed item and add it to the audio file, it's not done in the current code
HTML runes like " are not decoded, which also leads to some messages losing the links as the text is decoded

 - here the last line is a link originally
~MTProto library spawns goroutines it never kills, no fix available at the time of writing~ fixed by switching to a fork

Known issues are covered by newly created issues.

Hey @paskal, please consider using gotd/td as Telegram client, should be better maintained and probably more ergonomic.

I'll check it, but it's unlikely I will change the used library. The existing one already works except for HTML parsing, which I need to fix on this app side and which is unlikely solved in the library you mentioned.

Got it, thank you for reply.
I've added comparison that can help with trade-offs of picking one or other implementation.

I'll take a closer look into your library now, you got my attention.

@ernado @tdakkota I see that switch to that library would require complete code rewrite and is not trivial because the only real example is gotd/bot source example. I still need to fix the incomplete HTML parsing logic I have for the currently used library; the message module doesn't seem to solve that problem for me.
If you're interested in using that library for this particular use case, I propose you take my code and rewrite it for your library and send an MR to this repo; however, I personally do not want to spend another day on a rewrite of a working code for the sake of rewrite itself.

Ok, I'd better improve gotd examples and documentation.
Anyway it seems like switching from current library to gotd is a matter of time unless someone is going to spend several months fixing issues, introducing missing features and maintaining.

The trick is, you don't need to fix something which is not broken, and you don't need to introduce missing features if you already have all the required features on the table. I don't see where the necessity to "spend several months fixing issues" in feed-master comes from.
I am running a feed-master from this branch with the same config as one in production for two weeks by now, and it works as reliable as the current master. The only known problems are coming not from the library but from the way I parse the incoming HTML from the RSS feed. gotd/td doesn't solve this for me as well. For the file upload in feed-master, both libraries have feature parity.

Current library uses MTProto v1 that is deprecated and will be eventually disabled by Telegram in the future, so things can just stop working randomly, not considering that it is like using software that has open CVE.
I'm also going to quote xelaj/mtproto comment here:
https://github.com/xelaj/mtproto/blob/216789b95a5d644ebbdd1acb7eb46ff61647960a/internal/aes_ige/ige_cipher.go#L160-L161

ЭТО ЕБАНАЯ МАГИЧЕСКАЯ ФУНКЦИЯ ОНА НАХУЙ РАБОТАЕТ ПРОСТО БЛЯТЬ НЕ ТРОГАЙ ШАКАЛ ЕБАНЫЙ

If you are ok with this, I'm done here.

let me clarify a little bit from my perspective. Sending 50+ Mb files is a nice to have feature, however, this is not that essential for the particular application. I think the time and efforts @paskal already invested into this task were a little bit too much for the end goal, but I can hardly see anyone "spend several months" to improve it or adopt any other library regardless of the ergonomics.
If v1 will be disabled by tg one day - well, so be it. Feed master can always do what it always did with the bot API, i.e. upload under 50m files only and put external links for the bigger file.

As alternative you can also host your own local bot api server, it is official and should be enough to send 50+ Mb files.

Rebased on top of current master just to show how much more complex it is rather than using the self-hosted bot API server we choose to go with. Closing this PR.


Error: Class "Shim\Command\Command" not found

When upgrading from 3.5 to 3.6 or higher I get this when running my tests (and lots of them):
There was 1 error:

1) App\Test\TestCase\Command\Throttle\ThrottleMaintenanceCommandTest::test_per_minute_throttle_by_ip_matches_multiple_users
Error: Class "Shim\Command\Command" not found

/srv/app/vendor/dereuromark/cakephp-setup/src/Command/MailCheckCommand.php:16
/srv/app/vendor/cakephp/bake/src/BakePlugin.php:141
/srv/app/vendor/cakephp/bake/src/BakePlugin.php:94
/srv/app/vendor/cakephp/bake/src/BakePlugin.php:70
/srv/app/vendor/cakephp/cakephp/src/Http/BaseApplication.php:253
/srv/app/vendor/cakephp/cakephp/src/Console/CommandRunner.php:148
/srv/app/vendor/cakephp/cakephp/src/Console/TestSuite/ConsoleIntegrationTestTrait.php:98
/srv/app/tests/TestCase/Command/Throttle/ThrottleMaintenanceCommandTest.php:135

I'm on cake 5.0.11. I couldn't really make much of it with a brief look over the projects source or its composer.json. I'm not sure where this namespace is supposed to come from.

Is the shim plugin installed?

https://github.com/dereuromark/cakephp-shim/blob/master/src/Command/Command.php
Is supposed to be there since this is used.
Make sure composer install ran properly

https://github.com/dereuromark/cakephp-setup/commit/2739b60d03991393f17978ae3550dd7eea04d1f6
should fix it
The plugin expects Shim and Tools to be installed for some things. And I didnt hard require those since you might not need them.
But I agree that loading the commands should not directly fail.

=> https://github.com/dereuromark/cakephp-setup/releases/tag/3.7.1

Thanks!


There is no patchtst in the dictionary

File "Test.py", line 9, in long
nf = NeuralForecast.load(path=f'./checkpoints/test_run/{CODE}/')
File "/node/SMGPT/.venv/lib/python3.8/site-packages/neuralforecast/core.py", line 723, in load
MODEL_FILENAME_DICT[model_name].load_from_checkpoint(f"{path}/{model}")
KeyError: 'patchtst'

There is no patchtst in the dictionary

Hey @LeonTing1010,
Thanks for using the library. The error is fixed in the main branch you can install it using this line:
!pip install git+https://github.com/Nixtla/neuralforecast.git


Decision Needed: Choosing a Dependency Injection Library for Our Project

As we continue to improve our codebase, we have identified a need for implementing dependency injection (DI) in our project. We're not using the Spring framework, so we need to integrate an alternative DI library.
After researching, we've shortlisted the following five libraries:

Library
Maintained By
Key Features
Best Use Cases

Google Guice
Google
Lightweight, Supports method, field, and constructor injection, Integrates well with other Google libraries
General purpose, particularly where performance is a concern

Dagger
Google
Compile-time DI, Ensures code correctness via compile-time checks, Lightweight
Android Development, and general purpose where compile-time DI is beneficial

PicoContainer
Open Source Community
Minimalistic, Supports constructor, setter, and method injection
Small to medium applications, where simplicity is a priority

HK2
Eclipse Foundation
Lightweight, Dynamic DI, Supports service-based architecture
JavaEE applications, Microservices

CDI
Java Community Process (JCP)
Part of Java EE, Integrates well with other Java EE technologies, Supports context and scopes
Enterprise-level JavaEE applications

Before deciding, we need to consider our specific needs and constraints, such as the size and complexity of our project, performance requirements, and our team's familiarity with these libraries.
Once we've chosen a library, we will proceed with these steps:

[ ]  Add the library to our project dependencies.
[ ]  Refactor our code to apply dependency injection where appropriate.
[ ]  Thoroughly test all refactored classes to ensure they still function correctly.
[ ]  Document the changes and the DI process in our project documentation.

The library of our choice will be Google Guice, since We are using Google Json already, and Google Guice is fairly popular.


Translate Namespace and Maven paragraph in Spring.md into Korean. #11

Related issue number
Issue: #11
Description
Translate Namespace and Maven paragraph in Spring.md into Korean.

@kypark7
Thank you for your support! I will fix them that you mentioned as soon as possible.

Looks great - thank you!


Update plotting.py

Should fix https://github.com/pydata/pandas/issues/10214#issuecomment-106091734

Thanks @scls19fr !
Can you add:

test cases (pls see test_graphics.py)
release note for the bug fix (doc/source/whatsnew)

Sorry @sinhrks but I feel:

In pandas/doc/source/whatsnew/v0.17 there's a bunch of one-line notes describing bug fixes. Add one like that.
Tests for this are in pandas/tests/test_graphics.py The idea is to make a test that fails without your change, but works with your change. There's a bunch of helpful info here: https://github.com/pydata/pandas/wiki/
Let us know what you're stuck on, and we can walk you through it. Most of us are in the chat room if you want quicker feedback on git stuff.

Superseded by https://github.com/pydata/pandas/pull/10233


libxkbcommon-x11.so.0 installed in system but not detected by mechvibes.

Installed with snap store, the mechvibes have this errors on console:
/snap/mechvibes/1/re…enderer/init.js:166 Unable to load preload script: /snap/mechvibes/1/resources/app.asar/src/preload.js | (anonymous) | @ | /snap/mechvibes/1/re…enderer/init.js:166
/snap/mechvibes/1/re…enderer/init.js:167 Error: libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory
although it is installed in the system:
hari@acer:~$ sudo apt install libxkbcommon-x11-0
[sudo] password for hari:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libxkbcommon-x11-0 is already the newest version (1.6.0-1build1).

this causes the application to be stuck in the loading screen, I couldn't figure out why this issues exists. btw i'm using ubuntu 24.04

I'll have to investigate. This might be an issue with ubuntu 24?

same issue persist in fedora 40. I installed mechvibes with snap package manager.


Coinbase.lua:52: attempt to index a nil value

Hello,
since a few days the balances do not update anymore and I get this error:
Coinbase.lua:52: attempt to index a nil value
What could be the problem?

I deleted the old Coinbase.lua file and added the new CoinbaseV3.lua file do the extensions folder and now the authorization works.
But it shows no portfolio items and a zero balance (which is not the case in my Coinbase account).

i do have a similar issue. After further investigation it turns out Coinbase crippled their API. When I checked my proviously generated was gone. I created a new one but now some currencies are missing. For example my ETH2 wallet is gone.

Hello @FS-12
We apologize for the inconvenience you’re experiencing. For personalized assistance, please contact our support team directly.
Ticket ID:CON678
Coinbase support
To start a chat with a live support agent, click the live chat icon at the bottom corner of the page.

Hello @iSchorsch
Has your issues been resolved?

Hello @FS-12 We apologize for the inconvenience you’re experiencing. For personalized assistance, please contact our support team directly. Ticket ID:CON678 Coinbase support
To start a chat with a live support agent, click the live chat icon at the bottom corner of the page.

@iSchorsch  Watch out, this is for sure scam! They will try to steal your credentials. I have experienced a similar scam before.

So, there is no way to access a Coinbase portfolio with moneymoney anymore, right?


Disable normal mode completely

Is your feature request related to a problem? Please describe.
Hi there! First off, thank you for your project! It's really great. Recently I upgraded and saw the addition of a normal mode for the clap window. While this could be nice, it doesn't really fit ever use case/need. It would be great if there was an option to disable it all together for those who do not want it.
Describe the solution you'd like
An option to disable normal in vim-clap buffer
let g:clap_normal_mode_support = 0 "or 1 to enable

Something like this would be great. Given the context a fuzzy searcher, I'm never doing anything where I wish I could exit insert mode.

Make sense, I can add an option g:clap_insert_mode_only to disable the feature of other modes which will be enabled by default and you need to disable it explicitly.

Use let g:clap_insert_mode_only = v:true in #335.


Unusual increase in the index of the inputBuffer in the AudioProcessor

Version
Media3 1.2.0
More version details
No response
Devices that reproduce the issue

Emulator Pixel 7 Pro API 32, 33, 34.
Infinix hot 30

Devices that do not reproduce the issue

Xiaomi K40s
Samsung Note FE, S7Edge

Reproducible in the demo app?
Not tested
Reproduction steps

Utilize the queueInput function of BaseAudioProcessor or handleBuffer of TeeAudioProcessor, paying close attention to the index values of the inputBuffer.
Observe the unexpected and abnormal increase in the index values.

Here is my customized BaseAudioProcessor used to convert the inputBuffer into FFT:
    override fun onConfigure(inputAudioFormat: AudioProcessor.AudioFormat): AudioProcessor.AudioFormat {
        if (inputAudioFormat.encoding != C.ENCODING_PCM_16BIT) {
            throw AudioProcessor.UnhandledAudioFormatException(inputAudioFormat)
        }
        init(inputAudioFormat)
        return inputAudioFormat
    }

    override fun queueInput(inputBuffer: ByteBuffer) {
        val remaining = inputBuffer.remaining()
        if (remaining == 0) return
        processInputForFFT(inputBuffer)
        replaceOutputBuffer(remaining).put(inputBuffer).flip()
    }

    private fun init(inputAudioFormat: AudioProcessor.AudioFormat) {
        srcBufferPosition = 0
        bytesToProcess = SAMPLE_SIZE * 2
        dst = FloatArray(SAMPLE_SIZE + 2)
        sampleRate = inputAudioFormat.sampleRate
        channelCount = inputAudioFormat.channelCount
        audioTrackBufferSize = getDefaultBufferSizeInBytes(inputAudioFormat)
        srcBuffer = ByteBuffer.allocate(audioTrackBufferSize + BUFFER_EXTRA_SIZE)
        srcBuffer.clear()
    }

    private fun processInputForFFT(inputBuffer: ByteBuffer) {
        var position = inputBuffer.position()
        val limit = inputBuffer.limit()
        val fftBuffer = ByteBuffer.allocateDirect(inputBuffer.remaining()).order(ByteOrder.nativeOrder())
        while (position < limit) {
            var summedUp = 0
            for (channelIndex in 0 until channelCount) {
                summedUp += inputBuffer.getShort(position + 2 * channelIndex).toInt()
            }
            fftBuffer.putShort((summedUp / channelCount).toShort())
            position += channelCount * 2
        }
        srcBuffer.put(fftBuffer.array())
        srcBufferPosition += fftBuffer.array().size
        val tempShortArray = ShortArray(SAMPLE_SIZE)
        while (srcBufferPosition > audioTrackBufferSize) {
            srcBuffer.position(0)
            srcBuffer.asShortBuffer().get(tempShortArray, 0, SAMPLE_SIZE)
            val src =
                tempShortArray.map { (it.toFloat() * Short.MAX_VALUE + it) / (Short.MAX_VALUE * Short.MAX_VALUE) }
                    .toFloatArray()
            srcBuffer.position(bytesToProcess)
            srcBuffer.compact()
            srcBufferPosition -= bytesToProcess
            if (srcBufferPosition > 0) {
                srcBufferPosition = 0
            }
            srcBuffer.position(srcBufferPosition)
            // Call the function to process FFT (presumed to be a C++ function for Complex to FFT conversion)
            processFFT(src, dst)
        }
    }

    private fun getDefaultBufferSizeInBytes(inputAudioFormat: AudioProcessor.AudioFormat): Int {
        val outputPcmFrameSize =
            Util.getPcmFrameSize(inputAudioFormat.encoding, inputAudioFormat.channelCount)
        val minBufferSize =
            AudioTrack.getMinBufferSize(
                inputAudioFormat.sampleRate,
                Util.getAudioTrackChannelConfig(inputAudioFormat.channelCount),
                inputAudioFormat.encoding
            )
        Assertions.checkState(minBufferSize != AudioTrack.ERROR_BAD_VALUE)
        val multipliedBufferSize = minBufferSize * EXO_BUFFER_MULTIPLICATION_FACTOR
        val minAppBufferSize =
            durationUsToFrames(
                inputAudioFormat,
                EXO_MIN_BUFFER_DURATION_US
            ).toInt() * outputPcmFrameSize
        val maxAppBufferSize = minBufferSize.toLong()
            .coerceAtLeast(
                durationUsToFrames(
                    inputAudioFormat,
                    EXO_MAX_BUFFER_DURATION_US
                ) * outputPcmFrameSize
            )
            .toInt()
        val bufferSizeInFrames = Util.constrainValue(
            multipliedBufferSize,
            minAppBufferSize,
            maxAppBufferSize
        ) / outputPcmFrameSize
        return bufferSizeInFrames * outputPcmFrameSize
    }

    private fun durationUsToFrames(
        inputAudioFormat: AudioProcessor.AudioFormat,
        durationUs: Long
    ): Long {
        return durationUs * inputAudioFormat.sampleRate / C.MICROS_PER_SECOND
    }

    companion object {
        private const val SAMPLE_SIZE = 4096

        // From DefaultAudioSink.java:160 'MIN_BUFFER_DURATION_US'
        private const val EXO_MIN_BUFFER_DURATION_US: Long = 250000

        // From DefaultAudioSink.java:164 'MAX_BUFFER_DURATION_US'
        private const val EXO_MAX_BUFFER_DURATION_US: Long = 750000

        // From DefaultAudioSink.java:173 'BUFFER_MULTIPLICATION_FACTOR'
        private const val EXO_BUFFER_MULTIPLICATION_FACTOR = 4

        // Extra size next in addition to the AudioTrack buffer size
        private const val BUFFER_EXTRA_SIZE = SAMPLE_SIZE * 8
    }

Expected result
https://github.com/androidx/media/assets/33225351/619f1687-f988-413f-9ee5-7759d55e83f1
Actual result
Screen_recording_20231228_162039.webm
Media
*mp3
Bug Report

[ ] You will email the zip file produced by adb bugreport to<EMAIL_ADDRESS>after filing this issue.

das

For those encountering similar issues when converting inputBuffer to FFT, there are a few scenarios to be aware of:

The entire FFT result may become NaN or infinity. (The error originates from the inputBuffer data)
The entire FFT result may spike to a random value, causing visual distortion. (The error is specific to certain devices when it comes to the inputBuffer data)
My temporary solution is to check the FFT result at position 2048. At this position, the value should oscillate within the range of 0 to 2.
jfloat _output = static_cast<float>(complex_abs(complexOutput[sampleSize / 2])); if (std::isinf(_output) || std::isnan(_output) || _output > 2) {  // Handle the problematic case }
This solution is temporary and impacts the performance of the application. Additionally, it may slow down the frame rate of the visualization.
I have thoroughly reviewed the entire code, and it seems that the issue is related to ExoPlayer. I am hopeful to receive a response from ExoPlayer developers soon. It has been almost two months since I reported this bug, and there has been no response.

`@OptIn(UnstableApi::class)
class FFT(private val audioBufferSink: AudioBufferSink) {
private var channelCount = 2
private val dst = FloatArray(SAMPLE_SIZE/2)
private val src = ShortArray(SAMPLE_SIZE )

fun init(inputAudioFormat: AudioProcessor.AudioFormat) {
    channelCount = inputAudioFormat.channelCount
}

fun queueInput(inputBuffer: ByteBuffer) {
    var position = inputBuffer.position()
    val limit = inputBuffer.limit()
    src[0] = 0
    var i = 1
    while (position < limit) {
        src[i++] = inputBuffer.getShort(position + 2)
        position += channelCount * 2
    }
    processFFT(src, dst)
}

private external fun processFFT(input: ShortArray, output: FloatArray)

fun onFftCallback(result: FloatArray) {
    audioBufferSink.onFft(result)
}

interface AudioBufferSink {
    fun onFft(fft: FloatArray)
}

companion object {
    init {
        System.loadLibrary("fft")
    }

    private const val TAG = "FFT"

    private const val SAMPLE_SIZE = 4096
}

}`
Screen_recording_20240214_012753.webm

Hi @nguyenhuynhdev !
Can you debug a bit on your end, and report back?

For the same file, is the number of bytes given to you in fun queueInput(inputBuffer: ByteBuffer) different between the repro / no-repro devices?
Are the byte values given to you in fun queueInput(inputBuffer: ByteBuffer) different between the repro / no-repro devices?

Thanks for sharing some code, but also seeing an example .mp3 file would help.
Pretty sure your code will only fill up fftBuffer completely for mono, 1-channel audio, while for 2-channel stereo files, fftBuffer will have a bunch of zeros when you convert it to array and put it in srcBuffer.
        val fftBuffer = ByteBuffer.allocateDirect(inputBuffer.remaining()).order(ByteOrder.nativeOrder())
        while (position < limit) {
            var summedUp = 0
            for (channelIndex in 0 until channelCount) {
                summedUp += inputBuffer.getShort(position + 2 * channelIndex).toInt()
            }
            fftBuffer.putShort((summedUp / channelCount).toShort())
            position += channelCount * 2
        }
        srcBuffer.put(fftBuffer.array())

When you say "the index values of the inputBuffer" -- what does that mean?
We give no guarantees about the size of inputBuffers passed in to AudioProcessor -- the docs are here https://github.com/androidx/media/blob/b930b40a16c06318e43c81771fa2b1024bdb3f29/libraries/common/src/main/java/androidx/media3/common/audio/AudioProcessor.java#L163
The size of inputBuffers can differ between devices with different audio decoder implementations

Hello @ychaparov,
I appreciate your feedback. Upon investigating as per your suggestion, here are the refined results:

The byte count for both repro and no-repro devices is consistent on the same audio file.
Byte values differ, but only within the range of +-1.

I've identified this as an error originating from my FFT processing function. During debugging, I found that the C++ free() function, used to release complex data, is the cause of irregular fluctuations in the FFT on some devices. This is despite it being a data release function at the end without any logic code (still a problem in the Android native library). I've implemented an alternative solution for memory release, restoring stability. However, NaN or infinity errors persist during conversion, but these issues seem unrelated to the library, so I'll close this bug report.
Additionally, in the conversion process within the function:
var position = inputBuffer.position()
val limit = inputBuffer.limit()
src[0] = inputBuffer.getShort(position)
var i = 1
while (position < limit) {
    src[i++] = inputBuffer.getShort(position + 2)
    position += channelCount * 2
}
processFFT(src, dst)

To reduce the load on FFT processing and evenly distribute data from start to end, after obtaining the FFT, I will convert it once again to frequencyBandLimits. There is only a slight difference in the representation of the sound wave. For those interested in handling the details, they can use the following function to retrieve the entire audio data from both audio channels:
val array = inputBuffer.duplicate().moveToByteArray()
val srcBuff = ByteBuffer.allocateDirect(SAMPLE_SIZE * 2)
srcBuff.position(1)
srcBuff.put(array)
srcBuff.position(0)
srcBuff.asShortBuffer().get(src)
processFFT(src, dst)

The results are now really smooth:
Screen_recording_20240217_234221.webm
Thank you!


[REQ] Cursor changer

Acknowledgement of preliminary instructions

[X] I have read and acknowledged the preliminary instructions.

What idea do you have?
Make it easier to change cursor so we don't have to go through all the pain of doing this: https://www.youtube.com/watch?v=BaiKkDwnEMU

Forgot to reply to this, but we already have this planned on our feature list. Thank you for the thought though.


Enable "Hyper-V" tests

We are excited to release Linux GOS automation in Hyper-V in Jenkins.

[x] Import Test Cases to LISAv2 xml file
[x] Validate existing LISAv2 tests for Hyper-V
[x] Validate Azure regression test during import Hyper-V tests.
[ ] Enable SRIOV support for HyperV
[ ] Enable Passthrough disk support for HyperV
[x] Enable LISAv2 framework to run HyperV tests
[x] Define test coverage/scope

@juhlee-microsoft  let's move the PCI passthrough outside of this. We'll be working on those scenarios when we schedule the specific test areas.
Everything else from the list has been completed, we should close this item.


Config abstraction

Config Madness
This is a mad idea, but i think its possible.. so lets go with a new concept...
of "revel integrated" configuration..
Though a journey of code, and config files in

ini
conf
json js
yaml yml
txt

how I want to use ma djingo/2 interface and the git repos in that user accounts, and php.ini here and a json there...
The only thing I think, we all dream of is that we have to "config" somehow..
this is the config of the scenario.. even config machine to machine or somewhere else..and certainly sharing configs is a pin in the but...
I dont want to tap in the config, and if on e changes then the others..
So this means we need to somehow use revel to be a configuration and a service, and also a config that is reloadable..
Dreams
#myxxx.config.conf
revel runconfig /home/me/my-silly.ini
or
revel runconfig /home/me/mobile.json
[well.Hello.There]
[db_engines]
require_refs conf/db
[db]
import_conf * /~/config/

@landaire Have u got a patch for the yaml config

yeeeeeaaaaaahhhhh I worked on it on my way to Seattle that one time and haven't touched it since.
https://gist.github.com/landaire/0a1efe7738f5defd990f

This sums it up..
http://i.imgur.com/3uyRWGJ.jpg

Will be good also use json, yaml, etc for I18n

Can we look at this again,, and either cancel it
or use something from this..
What we want is to read various configs, and use anything and not be tied to "revel" config format..
Subdomains is a huge ieeue we have to address..
and is a necessity..
This means either messing with new syntax with revel..
or using a comformant format..
even we interchange with other apps..
lets shit, and get off the pot..
we allow any format u want..
and make the config simple... and transportable.. and futurable winth include eta all

This is scheduled for v0.15 and the priority is not high enough to worry about it right now. This will have to wait until other more important features are complete.


added code to set GIT_EXEC_PATH and the tests

This is in response to Issue 137 in the heroku-buildpack-apt repo.
If git is in the project.toml file - make sure GIT_EXEC_PATH is correctly defined after successful installation or if it is already installed.
Added unit tests

Adding each env var to the code is not a feasable approach long term.  Kept this work in a branch in my fork
Closing this PR and am going to open a new one with my configurable environment variable solution.

Adding each env var to the code is not a feasable approach long term

So whilst normally I would agree, I think we do need to add handling in this CNB for commonly used packages (by setting specific env vars), since otherwise it leads to poor UX if such packages don't work out of the box.

Adding each env var to the code is not a feasable approach long term

So whilst normally I would agree, I think we do need to add handling in this CNB for commonly used packages (by setting specific env vars), since otherwise it leads to poor UX if such packages don't work out of the box.

In another PR, I extended the project.toml file:
[_]
schema-version = "0.2"

[com.heroku.buildpacks.deb-packages]
install = [
    { name = "git",
      env = { "GIT_EXEC_PATH" = "{install_dir}/usr/lib/git-core",
              "GIT_TEMPLATE_DIR" = "{install_dir}/usr/share/git-core/templates" }
    },
    { name = "babeld" },
    { name = "ghostscript",
      skip_dependencies = true,
      force = true,
      env = { "GS_LIB" = "{install_dir}/var/lib/ghostscript" }
    },
]

so these can be defined per package and added after the installation.


Fix whitespace in config

No alphanumeric characters were harmed in the creation of this pull request.

@stevendanna fixed to 4 spaces!

lgtm rebase and mwr

http://wilson.ci.chef.co/job/chef-server-12-trigger-ad_hoc/184/


create ability to redirect Console.log to a physical file

When building an application in node.js there may be a large volume of information output by npm, it is not always possible to see all of this because the console only allows a limited number of lines to be visible and data is lost once you have reached the limit. I would like to redirect what is in Console.log to a physical file so that when the console has lost the data I can still see it, also if it is in a physical log file I will be able to search and query the data which will be very useful in finding the information I need. e.g. would like to output any npm vulnerability reports to a searchable file so we can identify improvements.

@CNA-Prv-Rec how and where are you running your npm build scripts?


Deprecated selector in method-separator\styles\method-separator.less

In method-separator\styles\method-separator.less:
Starting from Atom v1.13.0, the contents of atom-text-editor elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host and ::shadow pseudo-selectors, and prepend all your syntax selectors with syntax--. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:

atom-text-editor .meta.function:not(.c)::before, atom-text-editor::shadow .meta.function:not(.c)::before => atom-text-editor .meta.function:not(.c)::before, atom-text-editor.editor .syntax--meta.syntax--function:not(.c)::before

atom-text-editor .name.function::before, atom-text-editor::shadow .name.function::before => atom-text-editor .name.function::before, atom-text-editor.editor .syntax--name.syntax--function::before

Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.


Incorrect PowerShell example

[Enter feedback here]
At least for PowerShell core, I think the lines
$x509Cert = new-object System.Security.Cryptography.X509Certificates.X509Certificate2
$x509Cert.Import($secretByte, "", "Exportable,PersistKeySet")

should be replaced with a single line of
$x509Cert = new-object System.Security.Cryptography.X509Certificates.X509Certificate2($secretByte,'','Exportable,PersistKeySet')

When looking at this link   it indicates that import is obsolete since the object is immutable.

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

ID: d39f7f3d-668d-a922-4695-0539a075dcdc
Version Independent ID: 31b6a561-d2bb-350d-e4f5-3399df55b7b8
Content: Export certificates from Azure Key Vault
Content Source: articles/key-vault/certificates/how-to-export-certificate.md
Service: key-vault
Sub-service: certificates
GitHub Login: @sebansal
Microsoft Alias: sebansal

@ericcsinger
Thanks for your feedback! We will investigate and update as appropriate.

Thanks @ericcsinger ! It does look like the import is obsolete.
I made a pull request to update the Powershell. https://github.com/MicrosoftDocs/azure-docs-pr/pull/190856
@sebansal could you please review this?

@MarileeTurscak-MSFT  the PR link 404s, do you have an updated link to it?

Also the docs still show the old method, so this is not complete.


feat: new concatenation operator for working with arrays

Which issue does this PR close?

Closes https://github.com/apache/arrow-datafusion/issues/6603
Rationale for this change

What changes are included in this PR?

Are these changes tested?
Yes

Are there any user-facing changes?
Yes

https://github.com/apache/arrow-datafusion/actions/runs/5271901967/jobs/9533617876?pr=6615
🤔  that is not good:

= note: /usr/bin/ld: final link failed: No space left on device