Microsoft Graph API Support

According to https://docs.microsoft.com/en-us/graph/migrate-azure-ad-graph-overview:

Azure Active Directory (Azure AD) Graph is deprecated. To avoid loss of functionality, migrate your applications to Microsoft Graph before June 30, 2022 when Azure AD Graph API endpoints will stop responding to requests.

We need to switch Azure CLI to use Microsoft Graph API instead.

Microsoft Graph API Support

Call Microsoft Graph API with az rest
As Microsoft Graph REST API v1.0 is now GA, we can call it directly with az rest to achieve the same effect as az ad commands, including all latest features from Microsoft Graph.
Examples
Update redirectUris for an Application
Originally posted at https://github.com/Azure/azure-cli/issues/9501#issuecomment-610979930. We call the Update application API. The GUID part in the following URLs are the object ID of the application.
# Get the application
az rest --method GET --uri 'https://graph.microsoft.com/v1.0/applications/b4e4d2ab-e2cb-45d5-a31a-98eb3f364001'

# Update `redirectUris` for `web` property
az rest --method PATCH --uri 'https://graph.microsoft.com/v1.0/applications/b4e4d2ab-e2cb-45d5-a31a-98eb3f364001' --headers 'Content-Type=application/json' --body '{"web":{"redirectUris":["https://myapp.com"]}}'

Add owners to a service principal
Originally posted at https://github.com/Azure/azure-cli/issues/9250#issuecomment-603621148. We call the servicePrincipal: Add owner API.
appId=93dde3da-9fca-47dd-aee2-409b402ffed3
spObjectId=$(az ad sp show --id $appId --query objectId --output tsv)

# Get the object Id for the current user
ownerObjectId=$(az ad signed-in-user show --query objectId -o tsv)

# This applies to both user and service principal as owners
az rest -m POST -u https://graph.microsoft.com/beta/servicePrincipals/$spObjectId/owners/\$ref --headers Content-Type=application/json -b<EMAIL_ADDRESS>\"https://graph.microsoft.com/beta/directoryObjects/$ownerObjectId\"}"

# To add a user as an owner
az rest -m POST -u https://graph.microsoft.com/beta/servicePrincipals/$spObjectId/owners/\$ref --headers Content-Type=application/json -b<EMAIL_ADDRESS>\"https://graph.microsoft.com/beta/users/$ownerObjectId\"}"

# To add a service principal as an owner
az rest -m POST -u https://graph.microsoft.com/beta/servicePrincipals/$spObjectId/owners/\$ref --headers Content-Type=application/json -b<EMAIL_ADDRESS>\"https://graph.microsoft.com/beta/servicePrincipals/$ownerObjectId\"}"

Remarks

The above commands are for Bash which Azure Cloud Shell uses
In both PowerShell and CMD terminal, double quotes " in the JSON body (as contents) need to be escaped by \, even if the JSON body is surrounded by single quotes ': '{\"key\":\"value\"}'. For more info, please see Quoting Issues

A comment made by @jiasli in issue #9250 suggests that it should be possible to add a Service Principal as the Owner of an Application using the MS Graph API as follows.
az rest --method post --uri https://graph.microsoft.com/V1.0/applications/$appObjectId/owners/$ref --headers Content=Type=application/json --body "{\"@odata.id\":\"https://graph.microsoft.com/V1.0/directoryObjects/$spObjectId\"}"

this currently returns a Bad Request
{
  "error": {
    "code": "Request_BadRequest",
    "message": "The reference target 'Application_xxx' of type 'Application' is invalid for the 'owners' reference.",
    "innerError": {
      "request-id": "bdf80192-becb-43d5-9447-e0e2a91d7d68",
      "date": "2020-05-27T01:25:14"
    }
  }
}

xxx in the response above is the $spObjectId
Is this still a supported scenario using the MS Graph API?
az ad app owner add --id $appObjectId --owner-object-id $spObjectId

returns a similar result.

This error The reference target 'Application_xxx' of type 'Application' is invalid for the 'owners' reference. indicates xxx is an application object ID, not a service principal object ID.
If you are using Azure CLI, retrieve the service principal object ID with
# Use appId 46eb4122-bd2b-4f54-af7b-6d79b46ee31a
$ az ad sp show --id 46eb4122-bd2b-4f54-af7b-6d79b46ee31a --query objectId --output tsv
8aaa6158-7450-4407-ba08-61377f23d05f

If you are using Azure Portal, retrieve the service principal object ID with

Please notice that this issue is only for tracking purpose. For specific issues, you may create a new issue or reply to #9250.

Thanks @jiasli, works well when you have the right id!

@jiasli Thanks man! It solved our problem too! I was ripping my hair for 2 weeks now.
However just to understand.. Before I made the SP1 an owner of SP2, SP1 wasn't able to update the reply urls with error
az ad app update --id <appid> --add replyUrls "http://test" --debug
https://graph.windows.net:443 "GET /<tenantid>/applications?$filter=identifierUris%2Fany%28s%3As%20eq%20%<appid>%27%29&api-version=1.6 HTTP/1.1" 200 121

Insufficient privileges to complete the operation.
This was even despite SP1 having all the permissions on SP2 via full custom role, so I figured it's because it cannot read the Directory itself to list all applications and filter them.
Now when we made the SP1 owner of SP2, it can update the ReplyURLs without having any explicit API permissions nor any custom role as above.
What are we missing? Why does it work without Directory.Read.All?
Thank you!

Hi @Tbohunek,
Actually you are hitting a known issue that a Directory.Read.All permission should not be mandatory to update an application.
https://github.com/Azure/azure-cli/blob/2b6fe1ee100355dcae6681b01f8101ac81109f8a/src/azure-cli/azure/cli/command_modules/role/custom.py#L1068-L1079
You can see from the code that a tenant query is mandatory before CLI can treat the --id as an object ID.
az ───→ identifierUri ───→ objectId   This doesn't work because tenant-level query is needed to search for the app
 │                             ↑
 └─────────────────────────────┘      This works because no tenant-level query is needed

This is certainly a design flaw and we plan to fix it in the Microsoft Graph integration. We are considering whether we should split identifierUris, appId and objectId to avoid confusions, but this would certainly be a BREAKING CHANGE.
For example, az role assignment create already has this fix. --assignee-object-id is used for bypassing Graph permission issues:
> az role assignment create -h
...
    --assignee                : Represent a user, group, or service principal. supported format:
                                object id, user sign-in name, or service principal name.
    --assignee-object-id      : Use this parameter instead of '--assignee' to bypass graph
                                permission issues. This parameter only works with object ids for
                                users, groups, service principals, and managed identities. For
                                managed identities use the principal id. For service principals, use
                                the object id and not the app id.

With that being said, I am not able to repro your scenario. I got Insufficient privileges to complete the operation. with both appId and appObjectId as expected:
# Owner Service Principal (not Application)
$ ownerObjectId="b0460b1a-d53a-42e8-a6a4-d9f43f0ccc73"

# Owned Application
$ appId="46eb4122-bd2b-4f54-af7b-6d79b46ee31a"
$ appObjectId="9580df2b-3c36-4a15-b909-15bb1b30b3a7"

# Add the owner
$ az rest --method post --uri https://graph.microsoft.com/V1.0/applications/$appObjectId/owners/\$ref --body "{\"@odata.id\":\"https://graph.microsoft.com/V1.0/directoryObjects/$ownerObjectId\"}"

$ az ad app update --id $appId --add replyUrls "http://test"
Insufficient privileges to complete the operation.

$ az ad app update --id $appObjectId --add replyUrls "http://test"
Insufficient privileges to complete the operation.

If an app can do tenant-level query without Directory.Read.All permission, this is definitely a security breach. 😉
Please check

Whether your are really using the owner application logged in with az account show
Whether there are remaining permissions left for the owner application

Even as an owner, the owner application still need Application.ReadWrite.OwnedBy permission to update its owned applications. For Microsoft Graph:

(Same for AD Graph, but due to the design flaw mentioned above, az ad app update won't work.)
To bypass the tenant-level query, you can directly use Microsoft Graph Update application to update the redirectUris.
$ az rest -m PATCH -u https://graph.microsoft.com/v1.0/applications/$appObjectId --body '{"web":{"redirectUris":["https://myapp.com"]}}' --verbose
Request URL: 'https://graph.microsoft.com/v1.0/applications/9580df2b-3c36-4a15-b909-15bb1b30b3a7'
Request method: 'PATCH'
Request headers:
    'User-Agent': 'AZURECLI/2.6.0 (DEB)'
    'Accept-Encoding': 'gzip, deflate'
    'Accept': '*/*'
    'Connection': 'keep-alive'
    'x-ms-client-request-id': '65f37202-02b9-4723-b788-3dda87354bac'
    'Content-Type': 'application/json'
    'CommandName': 'rest'
    'ParameterSetName': '-m -u --body --verbose'
    'Authorization': 'Bearer eyJ0eXAiOiJKV...'
    'Content-Length': '46'
Request body:
{"web":{"redirectUris":["https://myapp.com"]}}
Response status: 204
Response headers:
    'Cache-Control': 'private'
    'Content-Type': 'text/plain'
    'request-id': '180fda8f-739e-41ea-b540-4ea8bfe8bed4'
    'client-request-id': '180fda8f-739e-41ea-b540-4ea8bfe8bed4'
    'x-ms-ags-diagnostic': '{"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"SliceC","Ring":"5","ScaleUnit":"000","RoleInstance":"AGSFE_IN_24"}}'
    'Strict-Transport-Security': 'max-age=31536000'
    'Date': 'Thu, 28 May 2020 05:05:20 GMT'
Response content:

command ran in 1.641 seconds.

Again, if you have further questions regarding this specific topic, please kindly create a new issue. I am glad to help. 😊

@jiasli Thank you, this helped me find out that I was not using properly isolated CLI sessions, so adding the ReplyURL after making the SP and owner was run by wrong SP.
Now I granted the SP1 the Azure AD Graph: Application.ReadWrite.OwnedBy API permission and it works as expected.
Note that in the azure-cli 2.6.0 command it's visible that it uses the Azure AD Graph and not the new MS Graph:
az --version

azure-cli                          2.6.0
command-modules-nspkg              2.0.3
core                               2.6.0
nspkg                              3.0.4
telemetry                          1.0.4

az ad app update --id de9b193b-6b87-4ee8-954e-de1e6e6d99d9  --add replyUrls "http://test" --debug

https://graph.windows.net:443 "GET /<tenantid>/applications?$filter=identifierUris%2Fany%28s%3As%20eq%20%27de9b193b-6b87-4ee8-954e-de1e6e6d99d9%27%29&api-version=1.6 HTTP/1.1" 403 219

I am glad it is working for you.
Yes, az ad is still using AD Graph API. This's what this whole issue is talking about. Since Microsoft Graph Service Principal API is GA, we recommend using az rest instead of az ad for the time being until we fully migrate az ad to Microsoft Graph.

However, I tried to add Microsoft Graph: Application.ReadWrite.OwnedBy to the owner application, then I am able to list all applications in the tenant using this owner application!
> az rest -u 'https://graph.microsoft.com/v1.0/applications' --query "value[].displayName"
[
  "sp19e92232ca5",
  "sp168579505de",
  "sp25f660911937e",
  ...

This is against the AAD doc https://docs.microsoft.com/en-us/graph/permissions-reference#remarks-3:

NOTE: Using the Application.ReadWrite.OwnedBy permission to call GET /applications to list applications will fail with a 403.  Instead use GET servicePrincipals/{id}/ownedObjects to list the applications owned by the calling application.

@jiasli thanks for all the examples of utilizing az rest to call service principals. I'm fighting with a possible edge case now. In an attempt to categorize and programmatically rotate client secrets we're aiming to use Tags on service principal objects. For the most part, this works fine by running az commands like:
az ad sp update --id appID --add tags "tags:value"
Before I got to this point I ran into the nanosecond/microsecond Azure Portal bug with az cli and I am getting similar behavior when trying to update tags on a service principal using the above command. The client secrets were set using the "old" method, outlined below:
                   $servicePrincipal = New-AzureRmADServicePrincipal -ApplicationId $spn.ApplicationId                     $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($servicePrincipal.Secret)                     $spnPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)                     [Runtime.InteropServices.Marshal]::ZeroFreeBSTR($BSTR)                     $SecureStringPassword = ConvertTo-SecureString -String $spnPassword -AsPlainText -Force                     #Apply the password to the app                     New-AzureRmADAppCredential -ApplicationId $spn.ApplicationId -Password $SecureStringPassword
When trying to tag service principals created this way I am finding the generic error: az : Update to existing credential with KeyId 'keyID' is not allowed.
Do you have any working examples of updating tags with the az rest method? I can't seem to get the payload correct.
az rest -m "PATCH" -u https://graph.microsoft.com/v1.0/servicePrincipals/objID --headers "Content-Type=application/json" -b '{\"tags\":\""tag:value"\"}'
Any help is appreciated, thanks!

@scals44, do you mind creating a new issue for us to track? Thank you.

sorry to jump on this thread but is there any easy of updating the redirectUris (by adding one property) using the rest API...it seems like patch will overwrite all of the redirectUrls e.g:
 az rest --method PATCH --uri "https://graph.microsoft.com/v1.0/applications/$OBJECT_ID" --headers 'Content-Type=application/json' --body "{\"spa\":{\"redirectUris\": [\"https://addanotherurlhere.com\"]}}"
Ends up deleting all the other URLs, since the cli doesn't support updating spa URLs at all yet (only web redirectUris/replyUrls)...

@jaslloyd Someone else may correct me, but I don't believe there is a way to atomically add one URI. However, you can query the Graph API to obtain the existing redirect URIs and use that to formulate your PATCH body:
az rest --method GET --uri 'https://graph.microsoft.com/v1.0/applications/OBJECT-ID-HERE?$select=spa' --headers 'Content-Type=application/json'

returns:
{
<EMAIL_ADDRESS>"https://graph.microsoft.com/v1.0/$metadata#applications(spa)/$entity",
  "spa": {
    "redirectUris": [
      "https://myapp.com"
    ]
  }
}

With that said, it is disappointing that the CLI itself is so incapable when it comes to many common functions 😕

Hi @jaslloyd, @rmsy's answer is correct. As spa.redirectUris is a property, there is no API from MS Graph API to add new entries to it. You need to GET the value first, do the addition, then PATCH it back.

@jaslloyd, here is my build step for ensuring an URI is included:
SPA_OLD_URIS=$(az rest --method GET --uri "https://graph.microsoft.com/v1.0/applications/$APP_ID" | jq -c '.spa.redirectUris | unique')
SPA_NEW_URIS=$(printf '%s\n' "$SPA_OLD_URIS" | jq -c ". + [\"$NEW_URI\"] | unique")
if [ "x$SPA_NEW_URIS" != "x$SPA_OLD_URIS" ]; then
    SPA_PATCH=$(printf '%s\n' "$SPA_NEW_URIS" | jq -c '{"spa":{"redirectUris":.}}')
    az rest --method PATCH --uri "https://graph.microsoft.com/v1.0/applications/$APP_ID" --headers 'Content-Type=application/json' --body="$SPA_PATCH"
fi

(I actually need two URIs for each environment, so I have jq -c ". + [\"$NEW_URI\", \"$NEW_URI/silent-renew.html\"] | unique" for the addition).
It could probably be simplified using the built-in JMESPath capability of az to directly calculate the patch in the initial GET, but this was easier to debug.

@rmsy @jialindai @jan-hudec thanks for the help, p.s by chance do you happen to know what permissions a service principal needs to update the redirect_uris of itself? I tried adding Application.ReadWrite.OwnedBy but no luck

Is there an indication when azure cli will be migrated to Microsoft Graph API?

Time flies! Still nothing on Microsoft side despite them convincing us to migrate our workloads...

Azure CLI team is currently working on the ADAL -> MSAL migration. We will start the planning and implementation of Active Directory Graph -> Microsoft Graph migration once the previously task is done. + @achandmsft
Meanwhile, Microsoft Graph team is currently developing their own CLI tool: https://github.com/microsoftgraph/msgraph-cli. This project is still at its early phase. You are very welcome to play with it and share any feedback.

@jiasli thanks for the clarification. We are all looking forward. ❤
However, isn't it a bit contra-productive to introduce yet another CLI tool on top of az? The confusion between Get-AzADxxx and Get-AzureADxxx (think Connect-AzureAD, Login-AzAccount, Connect-AzAccount) is already enough. 🤕

We are currently are running into the same issue. Adopting other commands or tools is contra-productive indeed. Please give us a clear timeline.

We are currently are running into the same issue. Adopting other commands or tools is contra-productive indeed. Please give us a clear timeline.

Pretty crazy that MS makes it hard to use the old thing with new service principals, while there is no way to avoid using the old APIs with automation tooling at the moment. It seems to me that the deprecation is a bit over eager at this point.
If you are only going to support the new graph in March, then why not deprecate the old thing in March? Now all your users have to find a github issue to tell them about a workaround. It's not even in the official documentation.

There is no fully-fledged Python SDK for Microsoft Graph, but only a light-weight client: https://github.com/microsoftgraph/msgraph-sdk-python-core.
During the migration, Azure CLI will use REST call and construct/display the JSON object directly, without building an SDK model.

Any update on this? do I update my scripts to use az rest commands or is there actual ms graph commands to use yet?

is there via az rest any replacement for the command az ad sp credential reset --name <name>?
With az ad sp credential reset i am facing the well known issue Insufficient privileges to complete the operation.

@oalimerko, please use az rest to invoke Microsoft Graph API like application: addPassword or servicePrincipal: addPassword.

Discussion: whether to preserve deprecate AD Graph parameter names
There has been an internal discussion recently about whether we should preserve deprecated AD Graph parameter names.
For Azure PowerShell, after the Microsoft Graph migration, it uses deprecated AD Graph parameter names as official names, and new Microsoft Graph parameter names as aliases. For example, according to https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadapplication?view=azps-7.2.0, New-AzADApplication uses the deprecated AD Graph property name -HomePage as the official parameter name:

According to https://docs.microsoft.com/en-us/graph/migrate-azure-ad-graph-property-differences, homepage has been replaced by web/homePageUrl in Microsoft Graph:

The new corresponding parameter name should be -WebHomePageUrl, but -WebHomePageUrl is used as an alias, instead of the official name. Other parameters face similar problems:

-AvailableToOtherTenants which conflicts with -SignInAudience
-ReplyUrls vs -WebRedirectUri. New-AzADApplication makes -ReplyUrls and -WebRedirectUri the same:

However, in Microsoft Graph, replyUrls is split into web/redirectUris and publicClient/redirectUris, instead of replaced by web/redirectUris:

Problems

New users of Microsoft Graph can't easily find the corresponding parameter names (-WebHomePageUrl). Instead, they will have to learn the deprecated AD Graph parameter names (-HomePage). This increases learning effort for new users.
The cmdlet parameter doesn't match the output - -HomePage maps to web/homePageUrl, introducing inconsistency.

Azure CLI's solution: be consistent with new Microsoft Graph API
Currently, as detailed in https://docs.microsoft.com/cli/azure/microsoft-graph-migration, we decide to replace deprecated AD Graph parameter names with new Microsoft Graph ones, such as

--homepage argument is replaced by --web-home-page-url

If you have any feedback, please feel free to left a comment in this issue.

@jiasli Would it be sensible to keep the old names as aliases where it makes sense? Like I'm not looking forward to typing --web-home-page-url not to mention I'm not going to remember it.

For --homepage, we can surely do it, as it is a one-one mapping to --web-home-page-url, unlike --reply-urls which doesn't have a definitive mapping:

--reply-urls argument is split into --web-redirect-uris and --public-client-redirect-uris

@maartengo, @anarsen, @bbkane, any thoughts?

The idea was that alias follows the current/original use, so  --reply-urls would alias to --web-redirect-uris, but I see this isn't very popular idea, so never mind.

but I see this isn't very popular idea, so never mind.

No, no. This is definitely a very constructive idea. That's exactly why I am so hesitating on the change. 😊

Thanks @joukevandermaas for the feedback.

The AD graph change is already producing huge churn in our organization for no perceivable benefit on our side.

I totally understand your concern. This is very valuable user voice. As you can see from this GitHub issue, this is the decision of AAD Graph service and we Azure CLI team also have been spending lots of effort adopting the new Microsoft Graph API, but I believe Microsoft Graph is introducing more functionalities and will definitely be a better successor to AD Graph: https://docs.microsoft.com/en-us/graph/overview
That said, since the whole az ad command module will undergo larging amount of breaking changes, keeping old AD Graph names will do little benefit and will even introduce input-output inconsistency.

Please support also Get-MgContext command.
https://docs.microsoft.com/en-us/graph/powershell/app-only?tabs=azure-portal#authenticate

Run Get-MgContext to verify that you've authenticated with app-only. The output should look like the following.
ClientId              : YOUR_APP_ID
TenantId              : YOUR_TENANT_ID
CertificateThumbprint :
Scopes                : {Group.Read.All, User.Read.All}
AuthType              : AppOnly
CertificateName       : YOUR_CERT_SUBJECT
Account               :
AppName               : Graph PowerShell Script
ContextScope          : Process

@lkurzyniec, this doesn't seem to to related to Microsoft Graph migration. Similar Azure CLI command is az account show.

@jiasli got it, you are right

Thanks @joukevandermaas for the feedback.

The AD graph change is already producing huge churn in our organization for no perceivable benefit on our side.

I totally understand your concern. This is very valuable user voice. As you can see from this GitHub issue, this is the decision of AAD Graph service and we Azure CLI team also have been spending lots of effort adopting the new Microsoft Graph API, but I believe Microsoft Graph is introducing more functionalities and will definitely be a better successor to AD Graph: https://docs.microsoft.com/en-us/graph/overview
That said, since the whole az ad command module will undergo larging amount of breaking changes, keeping old AD Graph names will do little benefit and will even introduce input-output inconsistency.

Hey  @jiasli, I completely agree with the fact that Graph is going to be a better successor to AD Graph.
My main concern here is the lack of clarity on what is actually going to change in regards of the 'az ad' module behaviours, do we have some sort of list with the expected changes?

My main concern here is the lack of clarity on what is actually going to change in regards of the 'az ad' module behaviours, do we have some sort of list with the expected changes?

Surely we have! 😊 Please see https://docs.microsoft.com/en-us/cli/azure/microsoft-graph-migration

Hey @jiasli! In this documentation, there are no breaking changes mentioned on the az ad sp show command. However, the warning appears for the entire az module as seen in this PR. This is blocking our scripts. Could you please fix it? Or is there any replacement for the command?

@RamonaStefan, your script shouldn't decide whether a command is successful based on stderr. It should check the exit code instead. Please see https://github.com/Azure/azure-cli#exit-codes
If you want to disable the warning, there is a global argument --only-show-errors to disable warnings for a specific command. You may also disable warnings for all commands with
az config set core.only_show_errors=True

For more info, please see https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration

@acefei, Azure CLI is merely a REST client. For permission issue, you may reach out to AAD support: https://azure.microsoft.com/en-us/support/create-ticket/

@acefei what shell you running that from?

For me it works. Just running from PowerShell.
@acefei did you grant/obtain admin consent on Application.ReadWrite.OwnedBy? That is required.
You can remove Directory.Read.All Delegated, that isn't used here.
There's however another problem, https://github.com/Azure/azure-cli/issues/9742, so you need to call --body '{\"passwordCredential\":{\"displayName\": \"xxxx\"}}' instead. 😞

@jiasli There's one more problem..
az rest --method POST --uri https://graph.microsoft.com/v1.0/applications/<app_objectid>/addPassword --body '{\"passwordCredential\":{\"displayName\": \"mytest6\"}}'

Bad Request({"error":{"code":"TooManyAppPasswords","message":"Not allowed to add 3 passwords. You can only add a maximum of 2 passwords.","details":[{"target":"passwordCredentials","code":"TooManyAppPasswords"}],"innerError":{"date":"2022-04-15T17:18:50","request-id":"f0c9aaac-9875-403e-bbd9-9048ec006efb","client-request-id":"f0c9aaac-9875-403e-bbd9-9048ec006efb"}}})

Same error also when adding Secret via Portal.
It seems this only happens for Apps created with az rest --method POST --uri https://graph.microsoft.com/v1.0/applications --body '{\"displayName\":\"myclicreated\"}'.
When I create App via Portal and I make the SP its owner with az ad app owner add, then I can use the above az rest or Portal to add as many passwords as I please.
Any clue what's behind that? Is this the right repo for this issue?

@Tbohunek, I believe the 3 passwords limitation is a design of Graph API application: addPassword.
I can reproduce the same. Let me internally involve Graph team on this issue.

@jiasli I don't think so. The Graph API addPassword works on a App created via Azure Portal. It has to do with the App config but comparing its json with Graph-API created App doesn't reveal any clues.

I wonder what's your problem @joukevandermaas 👎

@Tbohunek you are spamming an issue that many people are monitoring with something only tangentially related. Can you not imagine why I might find that annoying? Why not take the unrelated issues somewhere else so those of use who care about the original topic can get notified when there are actual updates on this issue?
I tried to indicate this in a way that does not update everyone who follows this issue but I guess that didn't work.

@acefei what shell you running that from?
I ran az rest in mcrmcr.microsoft.com/azure-cli in container.

@acefei, Azure CLI is merely a REST client. For permission issue, you may reach out to AAD support: https://azure.microsoft.com/en-us/support/create-ticket/

Unfortunately, I did that, but I can't find AAD related in the problem type with Technical issue type.
BTW, I don't think it was a typical permission issue. As we know, there are two type applications with the same Client ID
once the SPN created, Enterprise applications (service principals) and App registrations (application).
so they are using different Microsoft Graph API.
In my problem, with the same client ID and same permissions that following the requirement in API page, the permission issue only occurs on POST /applications/{id}/owners/$ref, but passed on POST /servicePrincipals/{id}/owners/$ref

For me it works. Just running from PowerShell with Az CLI installed. @acefei did you grant/obtain admin consent on Application.ReadWrite.OwnedBy? That is required. You can remove Directory.Read.All Delegated, that isn't used here.
There's however another problem, #9742, so you need to call --body '{\"passwordCredential\":{\"displayName\": \"xxxx\"}}' instead. 😞

I think my original thread was clear.

I've obtain admin consent on Application.ReadWrite.OwnedBy (see the screenshot)
Do you mentioned the escape characters? yes I did, but the problem persists.
Literally, from the Application.ReadWrite.OwnedBy permission, the operator should be the owner of the application, so I tried to add appId into its owner list by az rest -m POST -u https://graph.microsoft.com/v1.0/applications/$AppObjectId/owners/\$ref -b<EMAIL_ADDRESS>\"https://graph.microsoft.com/v1.0/directoryObjects/$AppObjectId\"}", but that return Insufficient privileges to complete the operation

@acefei your screenshot does not show whether the consent was actually granted, just that permission is configured. Add a wider screenshot.
Instead of modifying an existing App, try creating new App. Does that not work either?

is there any update now i still get "Insufficient privileges to complete the operation" trying to use
`# Starter pipeline
Start with a minimal pipeline that you can customize to build and deploy your code.
Add steps that build, run tests, deploy, and more:
https://aka.ms/yaml
trigger:

main

pool:
vmImage: ubuntu-latest
steps:

task: AzureCLI@2
inputs:
azureSubscription: SC-ARM-001
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
# Place scripting here
$appId = (az ad app create --display-name AuthTest --homepage https://mhauthtest.azurewebsites.net --identifier-uris https://mhauthtest.azurewebsites.net --reply-urls https://mhauthtest.azurewebsites.net/.auth/login/aad/callback --query 'appId' -o tsv)
Write-Host "App ID: $appId"`
at Azure DevOps Pipeline

I found the 'updated' version for this: https://learn.microsoft.com/en-us/graph/api/rbacapplication-post-roleassignmentschedulerequests?view=graph-rest-1.0&tabs=powershell

@jiasli There's one more problem.. az rest --method POST --uri https://graph.microsoft.com/v1.0/applications/<app_objectid>/addPassword --body '{\"passwordCredential\":{\"displayName\": \"mytest6\"}}'

Bad Request({"error":{"code":"TooManyAppPasswords","message":"Not allowed to add 3 passwords. You can only add a maximum of 2 passwords.","details":[{"target":"passwordCredentials","code":"TooManyAppPasswords"}],"innerError":{"date":"2022-04-15T17:18:50","request-id":"f0c9aaac-9875-403e-bbd9-9048ec006efb","client-request-id":"f0c9aaac-9875-403e-bbd9-9048ec006efb"}}})

Same error also when adding Secret via Portal.
It seems this only happens for Apps created with az rest --method POST --uri https://graph.microsoft.com/v1.0/applications --body '{\"displayName\":\"myclicreated\"}'. When I create App via Portal and I make the SP its owner with az ad app owner add, then I can use the above az rest or Portal to add as many passwords as I please.
Any clue what's behind that? Is this the right repo for this issue?

Did you ever find the cause for this?


Content Items with ListPart always returns empty

Whenever we query for an item by Id (/api/content/{contentItemId}, all the parts are retrieved fine, but ListPart section is not populated.
I came across ListQueryHelpers in OrchardCore [link] (https://github.com/OrchardCMS/OrchardCore/pull/4865)
but not sure how to deal with that in the API world.

The ListPart is an empty marker class so it would always return empty.
to get the items of a list you would need to write an api controller to return them - we don’t expose a rest api for it currently. You could use the IContainerService to make the query.
or make a sql query and call that from the query rest endpoint.
alternatively make the query with graphql as it already supports that.


Trying to set environment variable for production always returns the default one

Description
Setting '.env' and '.env.production' file return default variable defined inside '.env' while 'yarn run build'
Expected behavior
It should return .env.production variable
Actual behavior
It return .env variable
Environment
Run these commands in the project folder and fill in their results:

<EMAIL_ADDRESS>

node v6.7.0

npm v3.10.3:

Operating system: MacOs

Browser and version: Chrome latest

Can't reproduce it with clean CRA project

Please provide a project reproducing this.

I did the same thing with clean project and it works as expected. Here is the repo:
https://github.com/abarisic86/configTest
Any ideas how to debug it?

.env.production etc is a feature introduced in 1.0.0, you must upgrade from 0.9.5!
Let us know if you need any help upgrading.


2.20.0 result.headers.get('x-content-type-options') does not return header

Summary.
Expected Result
What you expected. (as seen with downgrading to 2.19.1)
Successfully installed requests-2.19.1 urllib3-1.23
(pytest-env) ./test_send_request.py
-> assert result.headers.get('x-content-type-options') == 'nosniff', \
(Pdb) result.headers
{'Server': 'nginx', 'Date': 'Sat, 27 Oct 2018 08:22:52 GMT', 'Content-Type': 'application/json', 'Content-Length': '675', 'Connection': 'keep-alive', 'Set-Cookie': 'redacted; HttpOnly; Path=/', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'DENY', 'X-XSS-Protection': '1; mode=block', 'Referrer-Policy': 'same-origin'}

Actual Result (2.20.0)
-> assert result.headers.get('x-content-type-options') == 'nosniff', \
(Pdb) result.headers.get('x-content-type-options') <--- no header returned
(Pdb) result.headers
{'Date': 'Sat, 27 Oct 2018 08:04:06 GMT', 'Content-Type': 'text/html; charset=utf-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding', Max-Age=864000000; Path=/usernamepassword/login; HttpOnly; Secure', 'X-Robots-Tag': 'noindex, nofollow, noindex, nofollow, nosnippet, noarchive', 'Cache-Control': 'private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'Strict-Transport-Security': 'max-age=15724800', 'Content-Encoding': 'gzip'}

What happened instead.
Reproduction Steps
import requests

System Information
$ python3 -m requests.help

python3 -m requests.help
{
  "chardet": {
    "version": "3.0.4"
  },
  "cryptography": {
    "version": ""
  },
  "idna": {
    "version": "2.7"
  },
  "implementation": {
    "name": "CPython",
    "version": "3.6.5"
  },
  "platform": {
    "release": "17.7.0",
    "system": "Darwin"
  },
  "pyOpenSSL": {
    "openssl_version": "",
    "version": null
  },
  "requests": {
    "version": "2.20.0"
  },
  "system_ssl": {
    "version": "100020ff"
  },
  "urllib3": {
    "version": "1.23"
  },
  "using_pyopenssl": false
}

We need far more information than is provided here to help you. In all honesty, though, I severely doubt this is a bug in Requests. For example,

What URL are you requesting?
Can you share the test code that is failing?
Are there redirects involved?

Have you checked the redirects to see what's happening?

@sigmavirus24
I have nginx config that is configured like so:
    location / {
      proxy_pass http://my_api;

      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto https;
      proxy_set_header Host $http_host;
      proxy_redirect   off;

      add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
      add_header X-Content-Type-Options    "nosniff"       always;
      add_header X-Frame-Options           "DENY"          always;
      add_header X-XSS-Protection          "1; mode=block" always;
      add_header Referrer-Policy           "same-origin"   always;
    }

And with 2.19.1 we get these headers back, which has been checked and passing in our CI-pipeline for ages. But now I looked again I see Strict-Transport-Security value is off as well. From my point of view the only thing that changed was the requests version (literally swapping between the two in the same virtual env and calling the endpoint).
I'll have to do some more digging to see what is going on.

@sigmavirus24
After some further analysis we did uncover one endpoint that was doing a bad redirect. It was redirecting to http, which was then again upgraded by nginx but without X-Content-Type-Options in the response headers.
We don't think that STS headers are being honoured by requests and if we confirm this will look at creating an enhancement request.
Closing this issue then.


Log RecordNotFound as 404

This is an attempt/proposal to fix #110 and parts of #27.
It will correctly log an ActiveRecord::RecordNotFound as a 404 and other things coming back from AR and others.
It will however not log a ActionController::RoutingError as this is out of reach with the current implementation. See the referenced issues for this.

:+1:

@pxlpnk - Any plans to release a new version of the gem with this fix?

@jturkel I'll cut a release. Watch this space.

Is there a way to do the same for ActionController::RoutingError?

@kitop Did you try the latest release? It should have been resolved by #134

Yes.
We're using 0.3.3, and still seeing some of those logging.
Eg:
ActionController::RoutingError (No route matches [GET] "/assets/images/wordpress.jpg"):
  actionpack (4.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  newrelic_rpm (<IP_ADDRESS>8) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  newrelic_rpm (<IP_ADDRESS>8) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
  lograge (0.3.3) lib/lograge/rails_ext/rack/logger.rb:15:in `call_app'
  railties (4.2.3) lib/rails/rack/logger.rb:20:in `block in call'

Any ideas why it could happen?

This happens in the rack stack. lograge currently can not handle those errors.
In general rails has two (two my knowledge) kind of 404 exceptions. One being from ActiveRecord when a record is not found and the other from the routing stack that is handled in rack.

Ah, gotcha. Thanks for the explanation @pxlpnk!!


feat: support GitHub Enterprise Server

Fixed this action to work on GitHub Enterprise Server.

:tada: This PR is included in version 1.2.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Warnings reflect option removal

Fixes https://github.com/KaylorBen/nixcord/issues/57

Just wondering, have any other of these deprecated options been removed? Because they might cause errors too no?

It was a specific issue caused in this case. Shouldn't happen in future. Just caught it myself trying to rebuild, thanks for fixing so quickly.


Fix issues around tlsRedirect

Fixes https://github.com/istio/istio/issues/27315
Fixes https://github.com/istio/istio/issues/27157

This partially reverts https://github.com/istio/istio/pull/24958. This
PR did two things - allow using httpsRedirect without VirtualServices
(good) and remove all routes when using httpsRedirect (bad). The latter
breaks in two cases: when a user has an HTTPS server and they put
httpsRedirect, it previously was silently ignored - after the PR, all
the routes were dropped. With this change, these routes are added, and
users will get a warning at validation time since the config is not
useful.
The other case is that a user can have an HTTP server but still "bypass"
the httpsRedirect with X-Forward-Proto and num_trusted_hops, so removing
the routes breaks this.
Both of these cases have unit and integration tests.
Additionally, the original PR indirectly caused httpsRedirect=true to
take precedence during Gateway conflicts. Previously, the last gateway
won, which caused weird behavior. I kept the behavior of the original PR
here; during conflict we will keep the httpsRedirect. This isn't ideal,
since it interferes with cert-manager ACME requests. Longer term we will
want to make httpsRedirect per-route most likely. See
https://github.com/istio/istio/issues/27643#issuecomment-755755760 for
more info.
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Pull Request Attributes
Please check any characteristics that apply to this pull request.
[ ] Does not have any changes that may affect Istio users.

@howardjohn: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test lint_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test lint_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test lint_istio

integ-pilot-k8s-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test lint_istio

integ-pilot-k8s-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test lint_istio

integ-pilot-k8s-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-k8s-tests_istio

integ-pilot-multicluster-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-multicluster-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test lint_istio

integ-pilot-k8s-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-k8s-tests_istio

integ-pilot-multicluster-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-multicluster-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-k8s-tests_istio

integ-pilot-multicluster-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-multicluster-tests_istio

lint_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test lint_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-k8s-tests_istio

integ-pilot-multicluster-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-multicluster-tests_istio

lint_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test lint_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-multicluster-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-multicluster-tests_istio

lint_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test lint_istio

integ-pilot-k8s-tests_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-multicluster-tests_istio
7ebe9c517421268614842340bb12d21a568d879b
link
/test integ-pilot-multicluster-tests_istio

lint_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test lint_istio

integ-pilot-k8s-tests_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test lint_istio

integ-pilot-k8s-tests_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test integ-pilot-k8s-tests_istio

integ-pilot-multicluster-tests_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test integ-pilot-multicluster-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test lint_istio

integ-pilot-k8s-tests_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test integ-pilot-k8s-tests_istio

integ-pilot-multicluster-tests_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test integ-pilot-multicluster-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test integ-pilot-k8s-tests_istio

integ-pilot-multicluster-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-multicluster-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
41ce9b3ac704c0b9e37aff21e0f71b74af8382f6
link
/test integ-pilot-k8s-tests_istio

integ-pilot-multicluster-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-multicluster-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-multicluster-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-multicluster-tests_istio

integ-pilot-k8s-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-multicluster-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-multicluster-tests_istio

integ-pilot-k8s-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

/retest

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-multicluster-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-multicluster-tests_istio

integ-pilot-k8s-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-multicluster-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-multicluster-tests_istio

integ-pilot-k8s-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-k8s-tests_istio

integ-pilot-multicluster-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-multicluster-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-k8s-tests_istio

integ-pilot-multicluster-tests_istio
7ae9114480278e92a01c673e4a5bbfb8b7e3ac1f
link
/test integ-pilot-multicluster-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


Do periodic security update (yarn audit)

Similar to issues in other repos:

https://github.com/liferay/liferay-npm-tools/issues/491
https://github.com/liferay/liferay-js-themes-toolkit/issues/504

This issue will substitute these currently open dependabot PRs:

https://github.com/liferay/eslint-config-liferay/pull/159 (acorn)
https://github.com/liferay/eslint-config-liferay/pull/189 (lodash)

Note that in this repo, too, we applied new config to limit Dependabot to one open PR at a time — it will still "spam" us, in the sense that if we close that PR it can open another, but at least we won't have up to 10 open PRs in the list at any one time.
More context on our policy here: https://github.com/liferay/liferay-frontend-guidelines/blob/master/general/security.md

Adding: https://github.com/liferay/eslint-config-liferay/pull/198

Adding: https://github.com/liferay/eslint-config-liferay/pull/199 (eslint-plugin-sort-destructure-keys)

Superseded by: https://github.com/liferay/liferay-frontend-projects/issues/2


Microsoft.Bcl causing warnings during install

After converting a solution to use Paket, I see a lot of these warnings (1 per project) when I do a paket install:
Package Microsoft.Bcl contains libraries, but not for the selected TargetFramework net461 in project
The corresponding entry in paket.dependencies is:
nuget Microsoft.Bcl 1.1.10
Am I doing something wrong?

this should be fixed in latest alpha version.


Failed to connect to Coway servers

On the current .4.3.2 version. Have deleted/downloaded multiple times. Every time I try to log in I get "Failed to connect to Coway servers". Can successfully login/out via the app so I know the creds are correct.
Have disabled all firewalls, adguard, suricata, etc to no avail.
This was working fine up until a week or two ago.
Any suggestions/thoughts?
thank you!

Please share any logs from the time the error occurs.

Wow! That was fast! :) This is all I see in the HA logs - is there any additional info elsewhere that I am missing?
This error originated from a custom integration.
Logger: custom_components.coway
Source: custom_components/coway/util.py:36
integration: Coway IoCare (documentation, issues)
First occurred: 14:56:45 (2 occurrences)
Last logged: 15:02:24
Failed to get information from Coway servers:

There should also be a ConnectionError in your logs since it is raised after the error message above is logged.

No, not seeing that at all. Downloaded the entire HA core log file and nothing other than what I posted above.
home-assistant_2024-06-01T21-15-26.305Z.log

Any chance you could share your credentials with me temporarily on discord (RobertD502)? This way we can narrow it down to if it is an integration issue or specific to your setup.

yup - elsteve3007-friend request sent

Fixed by disabling IPv6 on Home Assistant machine.


add Nokia SR OS support

I am volunteering to add Nokia SR OS support. Will come up with a PR shortly

welllllll I dare say you done did it and we can close this one :) nice job @hellt !! 🔥


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.

Bicep or Terraform?
Bicep
Module Classification?
Pattern Module
Module Name
avm/ptn/azd/ml-hub-dependencies
Module Details
Please add a Pattern Module named avm/ptn/machine-learning-services/hub-dependencies, this module will create the following seven resources:

Key Vault.
Storage Account.
Log Analytics Workspace.
Application Insights instance.
Azure Container Registry (ACR).
Cognitive Service.
Search Service.

For details, please refer to azd:
https://github.com/Azure/azure-dev/blob/main/templates/common/infra/bicep/core/ai/hub-dependencies.bicep
CC: @jongio
Do you want to be the owner of this module?
No
Module Owner's GitHub Username (handle)
jongio
(Optional) Secondary Module Owner's GitHub Username (handle)
No response

@Menghua1, thank you for proposing this module and thank you for your patience on triaging it! Many of us on the AVM core team have been OOF in the last couple of weeks, but we're back now! 😊
As this is categorized as a pattern module, its approval will require a more thorough assessment. We'll reach out to @jongio internally for more context and details as this proposal may require some adjustments to fit AVM's pattern definition and intent. The AVM core team will get back to you soon. Thank you for your patience!

Hi @jongio,
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 @jongio,
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

[x] Module published.
[x] GitHub teams are available and assigned to their parents.
[x] CODEOWNERS file updated.
[x] Issue template file updated.

Thank you for your work, @Menghua1! The module index will be updated with this information.


Add dialyzer

I ran into this issue #15 on a project I've added swoosh gallery to.  All credit goes to @YasirAsar ... I ended up applying the same changes as he did and confirmed that resolves things.

Hello @vrcca,
Do you have any update about this PR?

Thank you @riebeekn!!! 💜 💜 💜 💜 💜


refactor: esl-panel/esl-panel-group remove deprecated for version 4.0.0

:tada: This PR is included in version 4.0.0-beta.3 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 4.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


OCR on sentences

Hey there
Thank you for uploading your model it is really useful for me to understand the concept of using CNN+LSTM architecture. I wanted to know if it is also possible to apply this model on IAM sentences instead of characters.Have you tried it your self?and if so how was the accuracy on the testset?

Hi,
there was a similar question on medium, I link to the answer:
https://medium.com/@harald_scheidl/hi-193e814f93c3
So, in short, the model provided with this repository is too small for complete text-lines (otherwise, CPU training would not be possible).
For the larger model described in the link above I measured the accuracy with CER* and WER* on the test-set and got 8.95% for CER and 25.01% for WER.
* Character Error Rate and Word Error Rate


MAC randomization for wifi card in router

done here https://github.com/towercomputers/toweros/commit/f6c6a662de5b363df1dc876d107ace16c4550204


Add Error objects, not strings, to compilation.warnings

Hello!
Library Affected:
<EMAIL_ADDRESS>I'm experiencing a situation, where the manifest, generated by the InjectManifest plugin doesn't include the main.js file (this is a main and a single entry point of my application).
I've tried to use the webpack-manifest-plugin and I can confirm that it's manifest correctly lists all the output files, including the main.js one.
I'm using latest Webpack 5.27.1.
Do you have an idea what could be causing this behavior? Thanks.

Well, the problem was with the maximumFileSizeToCacheInBytes option, which is enabled by default and applies even in development. Sadly, this behavior is not documented anywhere, even the default value for maximumFileSizeToCacheInBytes is not documented. I found it just by a lucky guess.
I would suggest to update the documentation to make this point much more clear. Also, it could be a good idea to disable this filter by default entirely. I think that developer should be the one to explicitly determine if this rule should apply. Sadly, this option can't be even disabled without specifying a big numeric value there.

I apologize for the frustration that this caused.
Our current JSDoc to HTML generation pipeline unfortunately omits our documented default values, so while this is considered our "source of truth", it's not visible like it should be:
https://github.com/GoogleChrome/workbox/blob/27080cccfbc360b121083bb47e20429997051a6f/packages/workbox-webpack-plugin/src/inject-manifest.js#L100-L103
(We have plans to switch to an alternative HTML generation process as part of a larger documentation migration.)
The one mitigating point is that exclusions of entries from the precache manifest should be reported back to the webpack compilation as runtime warnings, which should in turn be visible to developers:
https://github.com/GoogleChrome/workbox/blob/27080cccfbc360b121083bb47e20429997051a6f/packages/workbox-build/src/lib/maximum-size-transform.js#L19-L21
Is that warning what eventually led you to discover what was going on?

I also faced the exact same issue this week. I didn't get a warning while compiling, I only discovered that option because of this thread.

Thanks for letting us know. The intention is definitely for there to be a warning bubbled up that gets reported by webpack. Let me try to reproduce the issue to see if something's preventing that from happening.

Thanks for having a look! I'm using the following packages:
        "laravel-mix": "^6.0.0-beta.17",
        "laravel-mix-purgecss": "^4.1.0",
        "laravel-mix-workbox": "^0.1.4",
        "workbox-cacheable-response": "^6.1.2",
        "workbox-core": "^6.1.2",
        "workbox-expiration": "^6.1.2",
        "workbox-precaching": "^6.1.2",
        "workbox-recipes": "^6.1.2",
        "workbox-routing": "^6.1.2",
        "workbox-strategies": "^6.1.2",
        "workbox-webpack-plugin": "^6.1.2"

I tried to reproduce this with a basic my package.json:
"scripts": {
  "build": "webpack"
},
"devDependencies": {
  "webpack": "^5.27.2",
  "webpack-cli": "^4.5.0",
  "workbox-webpack-plugin": "^6.1.2"
}

and the webpack configuration:
module.exports = {
  entry: './test.js',
  mode: 'development',
  output: {
    path: path.resolve(__dirname, 'build'),
    filename: 'bundle.js',
  },
  plugins: [
    new InjectManifest({
      swSrc: './sw.js',
      maximumFileSizeToCacheInBytes: 1,
    }),
  ],
};

Running the webpack-cli to build it leads to a warning logged as expected:
> webpack

asset bundle.js 1.17 KiB [emitted] (name: main)
asset sw.js 1.15 KiB [compared for emit]
./test.js 22 bytes [built] [code generated]

LOG from InjectManifest
<i> The service worker at sw.js will precache
<i>         0 URLs, totaling 0 B.

WARNING in bundle.js is 1.2 kB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.

webpack 5.27.2 compiled with 1 warning in 91 ms

That's what I would expect to see, and indicates that the warnings and logs from workbox-webpack-plugin are properly reflected in the webpack compilation. I think it would give a developer enough to go on to figure out why an entry wasn't precached.
If you're using a wrapper like laravel-mix on top of webpack, perhaps that wrapper is not properly passing through warnings and log messages that originate from webpack plugins?

I agree that the warning would be enough to figure out what's going on. It must be coming from either mix or the plugin wrapper but I'm wondering why some warnings are showing up fine then. For example, this one is displayed without issue:

InjectManifest has been called multiple times, perhaps due to running webpack in --watch mode. The precache manifest generated after the first call may be inaccurate! Please see https://github.com/GoogleChrome/workbox/issues/1790 for more information.

Is that message using a different method to display the warning?

That specific warning comes from: https://github.com/GoogleChrome/workbox/blob/27080cccfbc360b121083bb47e20429997051a6f/packages/workbox-webpack-plugin/src/inject-manifest.js#L277-L285
The warning about the maximum file size, and any other warnings related to manifest entries, come from: https://github.com/GoogleChrome/workbox/blob/27080cccfbc360b121083bb47e20429997051a6f/packages/workbox-webpack-plugin/src/lib/get-manifest-entries-from-compilation.js#L193-L203
The main difference that I see is that we're adding Error objects to compilation.warnings in the first example, and in the second, the values added will be strings.
I can't easily reproduce the build environment you have set up, so do you want to try making the following change to your local copy of your workbox-webpack-plugin's lib/get-manifest-entries-from-compilation.js?
// Comment out the following line and add:
// compilation.warnings = compilation.warnings.concat(warnings || []);
compilation.warnings.push(...warnings.map((warning) => new Error(warning)));

That fix did make a difference, I can now see the warnings. Maybe it is related to how this package used by laravel-mix parses the errors and warnings? It looks like it hasn't been updated in a while.

That'd be great, thank you for your help and responding so quickly!

...and now I remember that we made that change to some other parts of the codebase recently to resolve #2674, but it looks like that one line of code still was using strings directly. Sorry about that.

Hello! Thank you for a quick and detailed response.
I don't believe I saw the warning. At least not after I've figured this out by myself. The problem with warnings is that Webpack can generate a lot of messages and most developers are getting blind to it's output. I still believe that default settings should be more conservative.

I still believe that default settings should be more conservative.

One way of looking at it, which has motivated the defaults that have been in place for five years or so now, is that accidentally forcing your users to precache, say, dozens of megabytes of image assets is not being conservative.
There's a balance we have to strike between confusing developers who are unclear on why something isn't precached (and hopefully the warning messages help here) and confusing developers who hear from angry users about how their deployed web app downloads much more data than they expected the first time they visit it.


haskellPackages.brotli{,brotli-streams}: unbreak

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
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 nixpkgs-review --run "nixpkgs-review wip"
[ ] 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
[ ] Fits CONTRIBUTING.md.

Looks good, these both compile for me.  Thanks

would be appreciated if we could regenerate hackage-packages.nix

would be appreciated if we could regenerate hackage-packages.nix

That happens once a day automatically on the haskell-updates branch.


typescript import

Hello,
I am trying to migrate an existing app using ionic2.
Import using relative path is working fine but I find it painfull to write:
import {fooPage} from '../../../pages/foo/foo';
import {fooComponent} from '../../../shared/component/foo/foo';
// import ../../../../foo
// ../../../../../foo
// ....

Would have been great to make the import using the absolute path from the project root:
import {fooPage} from 'app/pages/foo/foo';
import {fooComponent} from 'app/shared/component/foo/foo';

I'm not a webpack warrior and feel confuse about strip-sourcemap-loader and awesome-typescript-loader and the way the root is setup by default to be node_modules.
Do you have a solution for importing things properly without relative path?
By the way, it is quite impressive that you already have some material design component working as even the angular2 team doesn't have a lot in this field.
Keep up the good work!

I believe you can do this by adding an alias to app in your resolve configuration in webpack config:
resolve: {
    alias: {
      'app': path.resolve('app')
    }
}

Going to close this, but please let us know if you're still having issues.

Thank you!

@tlancina Is there a way to do this on ionic 2.0.0.beta.8?

@tlancina where should I add this: 'app': path.resolve('app')??
Could you provide more details?


[Bug] ProviderBuilder with Hyper and Https

Component
provider, pubsub
What version of Alloy are you on?
0.1.0
Operating System
Linux
Describe the bug
it seems that https does not work with the hyper feature at the moment. I see:
Err(Transport(Custom(hyper_util::client::legacy::Error(Connect, \"invalid URL, scheme is not http\"))))
when attempting to pass an https url to ProviderBuilder. This appears to be due to a nuisance with how hyper separates out the tls implementation by default.
My preference would be that alloy-rs enables a tls implementation for hyper by default to abstract this implementation detail, but would also be appreciative for some documentation on how to specify and enable the tls for the alloy-rs's hyper feature.

I also get this issue when using reqwest. Http urls work fine but errors out on using https

This has been enabled by default for some time, at least 0.2.0


[FEATURE]: Add brand icon/logo

Describe the solution you are looking for
This integration shows no icon in the integrations overview and broken icons in the devices list

Would be nice to add an icon/logo for it.
Adding an icon/logo can be done with a PR at https://github.com/home-assistant/brands
Is your feature request related to a problem? (optional)
Not really, just visually not great.
What type of installation are you running?
Home Assistant OS
How did you install plugwise-beta?
HACS
What kind of Plugwise device is having issues?
USB: Stick
What firmware version is your Plugwise product at?
n.a.
Your setup
n.a.
Additional context
I thought about making a PR myself, but not sure which icon/logo to use.

It's somewhat of something we knew would happen and hoped to avoid with timely matters; e.g. the idea was/is to have a plugwise brand with both Networked and USB 'below' it, just like for instance the Amazon brand with various AWS services. That way no rebranding would have been necessary. Given the fact that said progress is not as fluent as foreseen it might be good to duplicate the brand for USB so it shows again.
As for choices, I think just duplicating the logo would suffice (it's a matter of 'resolving' the integration name to a png file)

As this is specific to the legacy USB stick I suggest to use the legacy logo of the original windows "source" software too.

@mvdwetering @brefra I'd say have a go at it, instructions for adding them for custom integrations is readily available at https://github.com/home-assistant/brands or if the old plugwise_stick still apply just rename them accordingly to plugwise_usb-beta

The logo files have been updated by the associated PR above.


Parameter 7 of constructor in org.burningokr.service.security.UserRoleFromContextService required a bean of type 'org.burningokr.service.userhandling.UserService' that could not be found.

Describe the bug
I've tried BurningOKR using Docker through docker-compose but raise an issue
burning-okr-backend | Parameter 7 of constructor in org.burningokr.service.security.UserRoleFromContextService required a bean of type 'org.burningokr.service.userhandling.UserService' that could not be found.
burning-okr-backend |
burning-okr-backend |
burning-okr-backend | Action:
burning-okr-backend |
burning-okr-backend | Consider defining a bean of type 'org.burningokr.service.userhandling.UserService' in your configuration.
burning-okr-backend |
burning-okr-backend exited with code 1

To Reproduce
Steps to reproduce the behavior:

Install required environment
docker-compose  build
docker-compose up
stuck on burning-okr-backend

Expected behavior
all components of BurningOKR runs on docker
Desktop (please complete the following information):

Ubuntu 18.04.4 LTS (GNU/Linux 5.4.0-1065-aws x86_64)
Docker version 19.03.12, build 48a66213fe

i've found the SYSTEM_CONFIGURATION_AUTH_MODE setting to its sample value <local|azure>
i've changed to local and everything running smooth
thanks

Goot to hear, that everything is working now. Hope you enjoy the software


Vectorize AnalogSignal.time_index()

This change allows the AnalogSignal.time_index() method to accept arrays of times, not just a scalar. If a scalar time is provided, the method returns a scalar index as before; if an array of times is provided, the method now returns an array of indices.
This is particularly useful with SpikeTrains:
import neo
import quantities as pq

sig = neo.AnalogSignal(range(10)*pq.V, sampling_rate=1*pq.Hz)
st = neo.SpikeTrain([2, 4, 9]*pq.s, t_stop=10*pq.s)

sig.time_index(st)  # previously would have needed to use [sig.time_index(t) for t in st]

Hello @jpgill86! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file neo/test/coretest/test_analogsignal.py:

Line 747:53: E226 missing whitespace around arithmetic operator
Line 748:54: E226 missing whitespace around arithmetic operator
Line 749:54: E226 missing whitespace around arithmetic operator
Line 752:69: E226 missing whitespace around arithmetic operator
Line 753:57: E226 missing whitespace around arithmetic operator

Thanks for merging @apdavison!


[Feature Request] Add a possibility to disable hotkeys.

It would be nice if we had an option not just to add/remove hotkeys, but to temporarily (how long is up to the user) just disable those. This is useful to check whether it helps with something or does something you want or not, or test the when condition properly. Another useful case is when you want to have it in the future, but after removing it you won't be able to restore it the way it was done, as you'd need to remember all of Command, Keybinding and When. And at last, but, probably, it is worth to have another feature request - is to make the just added (so new) key bindings disabled, if they are in conflict with a pre-existing key binding. An example is the new key binding of the Vim extension, which just has introduced the Ctrl-P keybinding, and is in conflict with VSCode's Ctrl-P binding, which is to show the Go to File... menu. Remembering the pre-existing user keybindings and marking new as disabled by default if they are in conflict with the pre-existing ones, would not introduce a change in the user experience and will not introduce an unintended behaviour.
Currently, those can be disabled by introducing the 0 condition in the When expression.

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


MiniConvolver not copyable

MiniConvolver segfaults when copied in the FilterEffect ctor.
This is a reminder to figure out later why this is.

This issue is no longer relevant as the implementation of FilterEffect has changed.


WriteResults.originalDocument public API but not implemented

I used this method but turns out it is not implemented:
https://github.com/ReactiveMongo/ReactiveMongo/blob/f7da2d9901806883666f9645a27649595c8b24b1/driver/src/main/scala/api/commands/writeresult.scala#L28
DefaultWriteResult does not override it either so I always get same empty result

Hi, this legacy is kept (useless) for binary backward compat, but will probably be removed. The error details are available as code and errmsg. Best regards.

Please use the MailingList to ask question or for help, this tracker is for confirmed issue/actionable request.


Refactor JS path code and implement @type

This brings it much closer to the Go implementation, and eventually
implementing the @at annotation.

I'm working towards https://github.com/attic-labs/noms/issues/2989 but there needs to be a little bit more work until I can support it. Luckily raf coincidentally has a PR out that does this little work.

Where "little" is actually an enormously painful refactor.

Compare to https://github.com/attic-labs/noms/blob/master/go/types/path.go

adding @arv not sure if aa is back yet


Remove unused code from TokenLoader

Some events are not used, so removing them.
@polinankoleva  @dimitraz

@polinankoleva fixed

LGTM :) ready for merging


Add fix for SIM105

Hi @charliermarsh  I saw the new api for edits, I was waiting for something like this to automatically fix sim105. Is there a way to check if the edit works fine (like for checking the diff after playing it in the tests)?

@leiserfg - Our fixture tests aren't great for this right now but @MichaReiser is improving them (e.g., we'll be able to see actual diffs rather than JSON representations of the diagnostics as is the case now).
If it were me, I'd just do some manual testing via the CLI on a couple files (e.g., cargo run -p ruff_cli -- /path/to/file.py --select SIM105 --no-cache --fix).

If it were me, I'd just do some manual testing via the CLI on a couple files

I tried with:
try:
    a = 3
except (Exception1, Exception2, something.Exception3) as e:
    pass

def asdf():
    try:
        a = 3
    except Exception:
        pass

and it renders as
import contextlib
with contextlib.suppress(Exception1, Exception2, something.Exception3):
    a = 3

def asdf():
    with contextlib.suppress(Exception):
        a = 3

By the way, should not this rule match also when the body of the handler is Constant::Ellipsis?

The edition will not remove the extra indentation in the case of being in a nested block (as in the function), I can avoid it but it could potentially remove also trailing comments which I think is more dangerous, another run of black will fix it anyways.

This change takes care of the indentation issue without affecting the comments as comments can't be before the except.

Nice. I ran this over Bokeh, it worked great:
diff --git a/docs/bokeh/docserver.py b/docs/bokeh/docserver.py
index eafbdcaf9..d5d7e84c8 100644
--- a/docs/bokeh/docserver.py
+++ b/docs/bokeh/docserver.py
@@ -40,6 +40,7 @@ from tornado.ioloop import IOLoop
 from tornado.wsgi import WSGIContainer

 from bokeh.util.tornado import fixup_windows_event_loop_policy
+import contextlib

 IOLOOP = None
 HOST = "localhost"
@@ -91,10 +92,9 @@ if __name__ == "__main__":
     browser = threading.Thread(target=open_browser)
     browser.start()

-    try:
+    with contextlib.suppress(KeyboardInterrupt):
         input("Press <ENTER> to exit...\n")  # lgtm [py/use-of-input]
-    except KeyboardInterrupt:
-        pass
+

     IOLOOP.add_callback(IOLOOP.stop)  # type: ignore
     server.join()
diff --git a/src/bokeh/embed/bundle.py b/src/bokeh/embed/bundle.py
index 1c93fee36..6eebb8da3 100644
--- a/src/bokeh/embed/bundle.py
+++ b/src/bokeh/embed/bundle.py
@@ -49,6 +49,7 @@ from ..settings import settings
 from ..util.compiler import bundle_models
 from ..util.warnings import warn
 from .util import contains_tex_string, is_tex_string
+import contextlib

 if TYPE_CHECKING:
     from ..resources import Hashes
@@ -309,10 +310,9 @@ def _bundle_extensions(all_objs: set[Model], resources: Resources) -> list[Exten
         pkg: Pkg | None = None
         if exists(package_path):
             with open(package_path) as io:
-                try:
+                with contextlib.suppress(json.decoder.JSONDecodeError):
                     pkg = json.load(io)
-                except json.decoder.JSONDecodeError:
-                    pass
+

         artifact_path: str
         server_url: str
diff --git a/src/bokeh/io/export.py b/src/bokeh/io/export.py
index c72fb332f..6557f7534 100644
--- a/src/bokeh/io/export.py
+++ b/src/bokeh/io/export.py
@@ -23,7 +23,7 @@ log = logging.getLogger(__name__)
 # Standard library imports
 import io
 import os
-from contextlib import contextmanager
+from contextlib import contextmanager, suppress
 from os.path import abspath, expanduser, splitext
 from tempfile import mkstemp
 from typing import (
@@ -514,15 +514,13 @@ class _TempFile:
         if self._closed:
             return

-        try:
+        with suppress(OSError):
             os.close(self.fd)
-        except OSError:
-            pass

-        try:
+
+        with suppress(OSError):
             os.unlink(self.path)
-        except OSError:
-            pass
+

         self._closed = True

diff --git a/src/bokeh/models/util/structure.py b/src/bokeh/models/util/structure.py
index 622c23e11..cbfbeef4d 100644
--- a/src/bokeh/models/util/structure.py
+++ b/src/bokeh/models/util/structure.py
@@ -61,6 +61,7 @@ from bokeh.models import (
     TableColumn,
     TapTool,
 )
+import contextlib

 if TYPE_CHECKING:
     import pandas as pd
@@ -168,18 +169,15 @@ class _BokehStructureGraph:
             answer1: bool = False
             answer2: bool = False
             answer3: bool = False
-            try:
+            with contextlib.suppress(TypeError, UnsetValueError):
                 answer1 = s in getattr(H, y)
-            except (TypeError, UnsetValueError):
-                pass
-            try:
+
+            with contextlib.suppress(TypeError, UnsetValueError):
                 answer2 = s == getattr(H, y)
-            except (TypeError, UnsetValueError):
-                pass
-            try:
+
+            with contextlib.suppress(AttributeError, ValueError, UnsetValueError):
                 answer3 = s in getattr(H, y).values()
-            except (AttributeError, ValueError, UnsetValueError):
-                pass
+
             return answer1 | answer2 | answer3

         K = nx.DiGraph()
diff --git a/tests/support/plugins/file_server.py b/tests/support/plugins/file_server.py
index a0855a678..9f73cd23b 100644
--- a/tests/support/plugins/file_server.py
+++ b/tests/support/plugins/file_server.py
@@ -33,6 +33,7 @@ from urllib.request import URLopener

 # External imports
 import pytest
+import contextlib

 #-----------------------------------------------------------------------------
 # Globals and constants
@@ -108,11 +109,10 @@ class SimpleWebServer:
     def stop(self) -> None:
         """Stops the server."""
         self.stop_serving = True
-        try:
+        with contextlib.suppress(OSError):
             # This is to force stop the server loop
             URLopener().open(f"http://{self.host}:{self.port}")
-        except OSError:
-            pass
+
         log.info("Shutting down the webserver")
         self.thread.join()

diff --git a/tests/unit/bokeh/core/property/test_wrappers__property.py b/tests/unit/bokeh/core/property/test_wrappers__property.py
index cb428dd5f..678301ac2 100644
--- a/tests/unit/bokeh/core/property/test_wrappers__property.py
+++ b/tests/unit/bokeh/core/property/test_wrappers__property.py
@@ -51,6 +51,7 @@ from _util_property import _TestModel

 # Module under test
 import bokeh.core.property.wrappers as bcpw # isort:skip
+import contextlib

 #-----------------------------------------------------------------------------
 # Setup
@@ -418,15 +419,13 @@ def test_PropertyValueList_mutators(mock_notify: MagicMock) -> None:
     # py2 vs py2. The slice methods are only exist in py2. The tests above
     # exercise all the  cases, this just makes py3 report the non-py3 relevant
     # code as covered.
-    try:
+    with contextlib.suppress(Exception):
         pvl.__setslice__(1,2,3)
-    except Exception:
-        pass

-    try:
+
+    with contextlib.suppress(Exception):
         pvl.__delslice__(1,2)
-    except Exception:
-        pass
+

 @patch('bokeh.core.property.wrappers.PropertyValueContainer._notify_owners')
 def test_PropertyValueSet_mutators(mock_notify: MagicMock) -> None:
diff --git a/tests/unit/bokeh/embed/test_standalone.py b/tests/unit/bokeh/embed/test_standalone.py
index 0de6cb163..6f749dd47 100644
--- a/tests/unit/bokeh/embed/test_standalone.py
+++ b/tests/unit/bokeh/embed/test_standalone.py
@@ -43,6 +43,7 @@ from bokeh.themes import Theme

 # Module under test
 import bokeh.embed.standalone as bes # isort:skip
+import contextlib

 #-----------------------------------------------------------------------------
 # Setup
@@ -423,10 +424,9 @@ class Test_json_item:
         # added to a document. Ignoring that since we just want to make sure
         # ODF is called with the expected theme arg.
         theme = Theme(json={})
-        try:
+        with contextlib.suppress(ValueError):
             bes.json_item(test_plot, theme=theme)
-        except ValueError:
-            pass
+
         mock_OFD.assert_called_once_with([test_plot], apply_theme=theme)

diff --git a/tests/unit/bokeh/embed/test_util__embed.py b/tests/unit/bokeh/embed/test_util__embed.py
index 472bacfda..d43d1bf58 100644
--- a/tests/unit/bokeh/embed/test_util__embed.py
+++ b/tests/unit/bokeh/embed/test_util__embed.py
@@ -38,6 +38,7 @@ from bokeh.util.logconfig import basicConfig

 # Module under test
 import bokeh.embed.util as beu # isort:skip
+import contextlib

 #-----------------------------------------------------------------------------
 # Setup
@@ -591,10 +592,9 @@ class Test_standalone_docs_json:
         d.add_root(p2)
         # ignore error unpacking None mock result, just checking to see that
         # standalone_docs_json_and_render_items is called as expected
-        try:
+        with contextlib.suppress(ValueError):
             beu.standalone_docs_json([p1, p2])
-        except ValueError:
-            pass
+
         mock_sdjari.assert_called_once_with([p1, p2])

     def test_output(self) -> None:


Editing one file under two different case insensitive paths

VSCode Version: 1.41.0
OS Version: Windows_NT x64 10.0.18362

NOTE: Windows only because of file system case insensitivity.
Steps to Reproduce:

Open a folder that contains at least one sub folder with a file in it
Using the explorer panel, open the file from the sub folder in the editor
Outside of VSCode, rename the sub folder to a name that differs only by case
Using the explorer panel, attempt to open the file from the sub folder again
You now have two tabs in the editor for the same file

Expected behavior:

You only have one tab open for the file as if the folder rename didn't happen.

Side effects that make this more serious:

You can normally have two copies of a file open in different side by side views. But in this case VSCode doesn't seem to know that it's the same file.
If you happen to do this and have code formatting tools installed like gofmt it gets very bad.

When you "Save All" with edits in the file, weird things happen (always bad, not consistent on how bad/what)
I'm assuming that this is just a symptom after things have already gone bad and probably doesn't need to be addressed, but it's probably a good reason to fix the root cause.

Does this issue occur when all extensions are disabled?: Yes

Perhaps a duplicate of #12448

Perhaps a duplicate of #12448

I should have looked more, sorry. Had been searching based on my saving causing changes in the file and missed the rather large collection.
One thing I did notice when poking at it is that the explorer panel does update the directory name and seems to reload the same way as if you changed the name inside VSCode. The reload just didn't trigger the editor tabs to reload. Not sure if this means there's a potential for an isolated fix there that can be removed once the larger problem is addressed or not.
If it's all related to the URI.toString() from #12448 and there's no small scale fix, then thanks for your time looking into it.

@bpasero is probably best placed to decide whether to close this one as a dup.

I would say, this is a duplicate of https://github.com/microsoft/vscode/issues/30240 as well as https://github.com/microsoft/vscode/issues/12448. With https://github.com/microsoft/vscode/issues/30240, the file should simply reopen with the new casing and as such this issue would not show up in the first place.


Update activemq-broker, activemq-client, ... to 6.0.1

About this PR
📦 Updates

org.apache.activemq:activemq-broker
org.apache.activemq:activemq-client
org.apache.activemq:activemq-kahadb-store

from 5.18.3 to 6.0.1 ⚠
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.apache.activemq" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.apache.activemq" }
}]

labels: library-update, early-semver-major, semver-spec-major, commit-count:1

Superseded by #831.


Enable Qlora scripts on Intel GPUs

Motivation:

Thanks for the qlora repo, this PR is for adding intel gpu support for quantized inference in the qlora script.
There is an internal progress on B&B enabling for intel gpus which will make the support complete.

@artidoro  could you please review . Would appreciate your thoughts on this. Thanks

So it looks good to me, however, I cannot test the code as I don't have an Intel GPU. Could you let me know how you verified that it works?
@TimDettmers  do you have thoughts on adding this to the repo? It could be helpful to people using Intel GPUs and it seems relatively few changes.

@artidoro  @TimDettmers at Intel we are planning to integrate our kernel code for the quantization cu kernels . This is a work in progress internally and after validation I will flag a PR at b&b. The pythonic frontend (here) has relatively easier changes but the core of the task is in the kernel adaptation for our gpu devices  which we are integrating.

Sounds good! I am happy to merge this PR. Might be useful to add some documentation too.


fix: Set breaking changes regex

Fixes #22. Based on comment https://github.com/conventional-changelog/conventional-changelog/issues/648#issuecomment-704867077 however I have taken the regex from<EMAIL_ADDRESS>used by this package and applied the fix there.
The fix just allows recognition of the exclamation mark by updating headerPattern and then when to set it as breaking by updating breakingHeaderPattern.
I couldn't get the tests working so made a quick and dirty proof here: https://codesandbox.io/p/sandbox/prcc-8q3z28

Hi @alexangas thank you for contributing.
The workflow cannot clone repository and fails to run, it seems your fork is private. It is fine I can run test in my machine and approve.
Can you please run npm run prepare it will build dist file.

I rebased incorporating your latest changes and ran npm run prepare. Please check!


adds error message to terms and conditions input

📝 A short description of the changes

🔗 Link to the relevant story (or stories)

:shipit: Deployment implications

✅ Checklist

[ ] Features that cannot go live are behind a feature flag/env var or specify deploy date and open PR as draft
[ ] I have checked that commit messages make sense and explain the reasoning for each change
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have squashed any unnecessary or part-finished commits

🖼 Screenshots (if appropriate - no PII/Prod data):

@TheDancingClown do we still need this? if so, needs rebasing.

Where was this from?! No, it doesn't look like its needed


test/test_package missing from pypi tarball

The test/test_package directory is not included in the 1.10.1 tarball which causes the tests to fail:
======================================================================
FAIL: test_console_script_module (__main__.TestBashGlobal)
Test completing a console_script for a module.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test.py", line 1206, in test_console_script_module
    self._test_console_script()
  File "test/test.py", line 1197, in _test_console_script
    self.assertEqual(self.sh.run_command('echo $?'), '0\r\n', install_output)
AssertionError: DEPRECATION: A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
ERROR: Invalid requirement: '/tmp/portage/dev-python/argcomplete-1.10.1/work/argcomplete-1.10.1/test/test_package'
Hint: It looks like a path. File '/tmp/portage/dev-python/argcomplete-1.10.1/work/argcomplete-1.10.1/test/test_package' does not exist.

======================================================================
FAIL: test_console_script_module_wheel (__main__.TestBashGlobal)
Test completing a console_script for a module from a wheel.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test.py", line 1214, in test_console_script_module_wheel
    self._test_console_script(wheel=True)
  File "test/test.py", line 1197, in _test_console_script
    self.assertEqual(self.sh.run_command('echo $?'), '0\r\n', install_output)
AssertionError: DEPRECATION: A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
ERROR: Invalid requirement: '/tmp/portage/dev-python/argcomplete-1.10.1/work/argcomplete-1.10.1/test/test_package'
Hint: It looks like a path. File '/tmp/portage/dev-python/argcomplete-1.10.1/work/argcomplete-1.10.1/test/test_package' does not exist.

======================================================================
FAIL: test_console_script_package (__main__.TestBashGlobal)
Test completing a console_script for a package.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test.py", line 1210, in test_console_script_package
    self._test_console_script(package=True)
  File "test/test.py", line 1197, in _test_console_script
    self.assertEqual(self.sh.run_command('echo $?'), '0\r\n', install_output)
AssertionError: DEPRECATION: A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
ERROR: Invalid requirement: '/tmp/portage/dev-python/argcomplete-1.10.1/work/argcomplete-1.10.1/test/test_package'
Hint: It looks like a path. File '/tmp/portage/dev-python/argcomplete-1.10.1/work/argcomplete-1.10.1/test/test_package' does not exist.

======================================================================
FAIL: test_console_script_package_wheel (__main__.TestBashGlobal)
Test completing a console_script for a package from a wheel.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test.py", line 1218, in test_console_script_package_wheel
    self._test_console_script(package=True, wheel=True)
  File "test/test.py", line 1197, in _test_console_script
    self.assertEqual(self.sh.run_command('echo $?'), '0\r\n', install_output)
AssertionError: DEPRECATION: A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
ERROR: Invalid requirement: '/tmp/portage/dev-python/argcomplete-1.10.1/work/argcomplete-1.10.1/test/test_package'
Hint: It looks like a path. File '/tmp/portage/dev-python/argcomplete-1.10.1/work/argcomplete-1.10.1/test/test_package' does not exist.

Fixed in v1.10.2, thanks.