Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

@azure/arm-machinelearningcompute: Argument of type 'DeviceTokenCredentials' is not assignable to parameter of type 'ServiceClientCredentials'. #13102

Closed
2 of 5 tasks
gucharbon opened this issue Jan 7, 2021 · 4 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning Compute Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@gucharbon
Copy link

gucharbon commented Jan 7, 2021

  • Package Name: @azure/arm-machinelearningcompute
  • Package Version: 1.1.0
  • Operating system: Ubuntu Focal (20.04)
  • nodejs
    • version: v14.15.1
  • typescript
    • version: 4.1.2
  • Is the bug related to documentation in

Describe the bug

When running the following code snippet:

const computeInstancesClient = new MachineLearningComputeManagementClient(creds, subscriptionId)

I get the following error:

Argument of type 'DeviceTokenCredentials' is not assignable to parameter of type 'ServiceClientCredentials'.

To Reproduce
Steps to reproduce the behavior:

  1. I uses the following dependencies in my package.json:
	"devDependencies": {
		"@types/vscode": "^1.52.0",
		"@types/glob": "^7.1.3",
		"@types/mocha": "^8.0.4",
		"@types/node": "^12.11.7",
		"eslint": "^7.15.0",
		"@typescript-eslint/eslint-plugin": "^4.9.0",
		"@typescript-eslint/parser": "^4.9.0",
		"glob": "^7.1.6",
		"mocha": "^8.1.3",
		"typescript": "^4.1.2",
		"vscode-test": "^1.4.1"
	},
	"dependencies": {
		"@azure/arm-machinelearningcompute": "^1.1.0",
		"@azure/arm-machinelearningservices": "^4.0.0",
		"@azure/ms-rest-nodeauth": "^3.0.6"
	}
DETAILS: Version mismatch between @azure/arm-machinelearningcompute and @azure/arm-machinelearningservices

I noticed that @azure/arm-machinelearningservices uses a more recent version of @azure/ms-rest-azure-js and @azure/ms-rest-js than @azure/arm-machinelearningcompute:

  • @azure/arm-machinelearningcompute:
{
    "@azure/ms-rest-azure-js": "^1.1.0",
    "@azure/ms-rest-js": "^1.1.0",
}
  • @azure/arm-machinelearningservices:
{
    "@azure/ms-rest-azure-js": "^2.0.1",
    "@azure/ms-rest-js": "^2.0.4",
}
  1. I create some credentials using @azure/ms-rest-nodeauth:
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";

const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
const creds = await msRestNodeAuth.interactiveLogin()
  1. I then try to create a machine learning compute management client:
const computeInstancesClient = new MachineLearningComputeManagementClient(creds, subscriptionId)

Additional context

BTW, a high severity issue is raised by NPM audit:

image

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 7, 2021
@gucharbon gucharbon changed the title Argument of type 'DeviceTokenCredentials' is not assignable to parameter of type 'ServiceClientCredentials'. @azure/arm-machinelearningcompute: Argument of type 'DeviceTokenCredentials' is not assignable to parameter of type 'ServiceClientCredentials'. Jan 7, 2021
@ramya-rao-a
Copy link
Contributor

Thanks for reporting @gucharbon

Regarding the npm audit issue, we will be releasing an update to the @azure/ms-rest-js package to update its dependency on axios

The actual error you are seeing should be fixed bu re-generating the @azure/arm-machinelearningcompute package using the latest v4 code generator. @qiaozha, Can you do the needful here?

@ramya-rao-a ramya-rao-a added Machine Learning Compute Mgmt This issue is related to a management-plane library. labels Jan 7, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 7, 2021
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Jan 7, 2021
@qiaozha
Copy link
Member

qiaozha commented Jan 8, 2021

@colawwj Could you help regenerate the package ? Thanks

@ramya-rao-a
Copy link
Contributor

Thanks @colawwj

@gucharbon Please use the latest version v2 of the @azure/arm-machinelearningcompute package where the reported problem is fixed

@gucharbon
Copy link
Author

@ramya-rao-a Thanks, just tested it and it works fine :)

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this issue Mar 12, 2021
Microsoft.api management 2021 01 01 preview (Azure#13377)

* Adds base for updating Microsoft.ApiManagement from version stable/2020-12-01 to version 2021-01-01-preview

* Updates readme

* Updates API version in new specs and examples

* Bring your Own IP support for vnet injection on API Management (Azure#13102)

* pip support for vnet injection

* fix example

* fix example

* New API and parameter properties added (Azure#13252)

* Changes for websocket entities (Azure#11912)

* add api type and protocol for 2021

* example

* modelAsString

* pretty check

* reference example

* rename file

* Fix enum mismatch

Co-authored-by: Samir Solanki <samirsolanki@outlook.com>

* free tls changes and updated examples (Azure#13347)

* free tls changes and updated examples

* renames

Co-authored-by: VitaliyKurokhtin <vitaliik@microsoft.com>
Co-authored-by: JJ <jijohn@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning Compute Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants