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

[core] core-lro depends on core-http #15880

Closed
maorleger opened this issue Jun 21, 2021 · 1 comment · Fixed by #15884
Closed

[core] core-lro depends on core-http #15880

maorleger opened this issue Jun 21, 2021 · 1 comment · Fixed by #15884
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.
Milestone

Comments

@maorleger
Copy link
Member

maorleger commented Jun 21, 2021

Discovered when moving Azure Key Vault to core V2. Looks like core-lro still takes a dependency on core-http

Error when building after removing core-http:

TypeError: Cannot read property 'prototype' of undefined
    at extend (/home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/xmlbuilder@11.0.1/node_modules/xmlbuilder/lib/XMLElement.js:4:195)
    at /home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/xmlbuilder@11.0.1/node_modules/xmlbuilder/lib/XMLElement.js:18:5
    at /home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/xmlbuilder@11.0.1/node_modules/xmlbuilder/lib/XMLElement.js:296:4
    at /home/mleger/workspace/worktrees/keyvault-admin-core-v2/common/temp/node_modules/.pnpm/xmlbuilder@11.0.1/node_modules/xmlbuilder/lib/XMLElement.js:298:4
    at createCommonjsModule (/home/mleger/workspace/worktrees/keyvault-admin-core-v2/sdk/keyvault/keyvault-admin/dist-test/index.node.js:68:35)
    at Object.<anonymous> (/home/mleger/workspace/worktrees/keyvault-admin-core-v2/sdk/keyvault/keyvault-admin/dist-test/index.node.js:29765:18)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)

Looking up who is asking for xmlbuilder:

keyvault-admin keyvault-admin-core-v2 % npm ls xmlbuilder
@azure/keyvault-admin@4.1.0-beta.1 /home/mleger/workspace/worktrees/keyvault-admin-core-v2/sdk/keyvault/keyvault-admin
└─┬ @azure/core-lro@1.0.6 -> /home/mleger/workspace/worktrees/keyvault-admin-core-v2/sdk/core/core-lro
  └─┬ @azure/core-http@1.2.7
    └─┬ xml2js@0.4.23
      └── UNMET DEPENDENCY xmlbuilder@~11.0.0

Finally, Looking at core-lro it includes core-http in dependencies.

Looking at the codebase it looks like none of the product code actually needs core-http, but it is used in tests.

Anyway, I think we should remove the core-http dependency from core-lro or at least move it to devDependencies?

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jun 21, 2021
@xirzec
Copy link
Member

xirzec commented Jun 21, 2021

If core-lro doesn't have a real runtime dependency on core-http it absolutely should not depend on it

@xirzec xirzec self-assigned this Jun 21, 2021
xirzec added a commit to xirzec/azure-sdk-for-js that referenced this issue Jun 21, 2021
@xirzec xirzec added Azure.Core Client This issue points to a problem in the data-plane of the library. labels Jun 21, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jun 21, 2021
@ramya-rao-a ramya-rao-a added this to the [2021] July milestone Jun 21, 2021
maorleger added a commit that referenced this issue Jun 23, 2021
## What

- Migrate @azure/keyvault-admin to core V2
- Migrate `KeyVaultBackupClient` and `KeyVaultAccessControlClient` to core CAE
- Bump our minimum `@azure/core-lro` version to 1.0.6

## Why

This PR proves out two important things: it demonstrates that core continuous access evaluation works for both container 
registry (already done) and Key Vault (this PR). It also demonstrates the migration path for Core V2 for Key Vault.

The change to core-lro addresses an issue where core-lro was incorrectly depending on core-http (#15880)  That has been fixed on 1.0.6 
and allows package owners to migrate to core-rest-pipeline and remove core-http without seeing build breaks.


Resolves #15522 
Resolves #14306
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this issue Sep 26, 2021
[Hub Generated] Review request for Microsoft.RecoveryServices to add version stable/2021-08-01 (Azure#15880)

* Adds base for updating Microsoft.RecoveryServices from version stable/2021-07-01 to version 2021-08-01

* Updates readme

* Updates API version in new specs and examples
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants