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/communication-identity Azure Core 2.0 Migration #20375

Merged
merged 45 commits into from
Mar 17, 2022
Merged

@azure/communication-identity Azure Core 2.0 Migration #20375

merged 45 commits into from
Mar 17, 2022

Conversation

petrsvihlik
Copy link
Contributor

@petrsvihlik petrsvihlik commented Feb 15, 2022

Packages impacted by this PR

  • @azure/communication-identity

Issues associated with this PR

Describe the problem that is addressed by this PR

  1. Migrated to @azure/core-rest-pipeline and @azure/core-client
  2. Migrated to the test "@azure-tools/test-recorder": "^2.0.0"

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

Are there test cases added in this PR?

  • No new test cases, the existing ones suffice

Provide a list of related PRs (if any)

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator? NO
  • Added a changelog (if necessary)

Notes

@ghost ghost added the Communication label Feb 15, 2022
@azure-sdk

This comment was marked as outdated.

@azure-sdk

This comment was marked as outdated.

@petrsvihlik petrsvihlik changed the title @azure/communication-identity Core2 Migration @azure/communication-identity Azure Core 2.0 Migration Feb 15, 2022
@petrsvihlik
Copy link
Contributor Author

petrsvihlik commented Feb 15, 2022

@ramya-rao-a @LuChen-Microsoft Hi, do you have any idea what could be going on wrong in the browser pipeline? https://dev.azure.com/azure-sdk/public/_build/results?buildId=1368388&view=logs&j=22df7240-50e3-5f2e-b6e8-23dba21dcf6d&t=82938c17-2b16-5a29-ee40-8ae518dbe97d

or could you suggest someone really knowledgeable about the Azure Core 2.0 migration who could help me out?

@ramya-rao-a
Copy link
Contributor

@sarangan12 Can you please help here?

@petrsvihlik
Copy link
Contributor Author

@sarangan12 a related PR suffers from the same issue: #19043

@check-enforcer
Copy link

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run js - [service] - ci

@sarangan12
Copy link
Member

@petrsvihlik I have started looking into this issue. Let me start debugging this and update this issue soon.

@sarangan12
Copy link
Member

@petrsvihlik I have looked into the code base. Here are some of the observations. (Please correct me if I am wrong).

  1. You are trying to move the package @azure/communication-identity from core V1 to core V2.
  2. But the @azure/communication-identity is dependent on @azure/communication-common package.
  3. In your PR, you have removed the dependency of @azure/core-http in communication-identity package. But, the underlying base package of communication-common is still relying on @azure/core-http.
  4. Also, I am specifically seeing this dependency being used in the browser specific tests in the communication-identity package which might be the root cause of this PR failure.

Could you please resolve the dependency issues with communications-common package and migrate it before communications-identity? Please let me know. Thanks

@petrsvihlik
Copy link
Contributor Author

Thank you for your suggestions @sarangan12!

Just so you know, we have another PR open for the migration of the communication-common library - #20337. And we used that PR as a starting point for this PR. This PR serves for verifying that the changes we make in the communication-common will work fine in the dependent libraries.

Now to your observations:

  1. In your PR, you have removed the dependency of @azure/core-http in communication-identity package. But, the underlying base package of communication-common is still relying on @azure/core-http.

Yes, we wanted to keep the backward compatibility and include both versions of the policy (V1 & V2) but it seems it's not needed in this case according to the architects

Could you please resolve the dependency issues with communications-common package and migrate it before communications-identity? Please let me know. Thanks

Yes, I'll update the other PR and remove the dependency on @azure/core-http.

Thanks again!

@petrsvihlik
Copy link
Contributor Author

@jeremymeng @joheredi hi, could some of you please take a quick look and confirm that the changes are ok? thank you!

Copy link
Member

@joheredi joheredi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for migrating to the new recorder as well!

@petrsvihlik petrsvihlik enabled auto-merge (squash) March 17, 2022 07:50
@petrsvihlik
Copy link
Contributor Author

/check-enforcer reset

@petrsvihlik
Copy link
Contributor Author

/azp run js - communication - ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@petrsvihlik petrsvihlik merged commit 25bc423 into Azure:main Mar 17, 2022
WeiJun428 pushed a commit to WeiJun428/azure-sdk-for-js that referenced this pull request Mar 20, 2022
* Removed the dependency on @azure/core-http

* Updated to Azure Communication Common v2

* Migrated to the new test recorder

* Re-recorded tests

* Excluded headers from comparison

* Removed redundant sanitizers

* Ensured consistent package name

* Removed outdated comments

* Added a changelog entry

Co-authored-by: Jose Manuel Heredia Hidalgo <[email protected]>
WeiJun428 pushed a commit to WeiJun428/azure-sdk-for-js that referenced this pull request Mar 20, 2022
* Removed the dependency on @azure/core-http

* Updated to Azure Communication Common v2

* Migrated to the new test recorder

* Re-recorded tests

* Excluded headers from comparison

* Removed redundant sanitizers

* Ensured consistent package name

* Removed outdated comments

* Added a changelog entry

Co-authored-by: Jose Manuel Heredia Hidalgo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants