-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
identity: delete obsolete test #28346
Conversation
Some learnings as I was digging into this: MSAL 2.x and Azure SDKTests are failing with:
Looking at MSAL's repo I found this issue by Matt, which was fixed in 2.x Trying to upgrade to MSAL 2.x causes a different error when running integration tests:
This also prevents us from upgrading communication-identity's MSAL version to 2.x So what's going on here (at least as far as I can tell)?
What can we do?
|
API change check API changes are not detected in this pull request. |
@maorleger setting aside the matter of how useful this test is, I think if you wanted to unblock testing from being stuck on the |
Would love to learn more, I know we've been moving to vitest in core but I was not aware we can bypass using the |
I would be inclined to rewriting this test in some other manner (mocking using another tool and being more efficient) that helps us pick the correct versioning and overcome the complications of cjs bundling, instead of deleting altogether. Reason - because this test actually helped us discover the bug in msal-node's implementation.
@maorleger Do you remember if upgrading the msal-node dependency in communication-identity helped us resolve the issue of 1.x getting pulled? |
Yea, totally valid! I am happy to close this PR and find an alternative, let's chat about it today. Maybe deleting this test only kicks the can down the road and what we should do is resolve the incompatibility, maybe by using vitest as Jeff suggested...
It would be good to know but won't help us now. If they had not been using it prior, we would have discovered the incompatibility when we upgraded to 2.x and handled it then but I think at this point communication-identity's dependency on MSAL 1.x is the only thing keeping all live tests from failing (see below). The unfortunate part is that it means we continue to test against MSAL 1.x whenever we use the
It did, it resulted in all live test runs failing due to Identity's inability to load MSAL 2.x in tests . @jeremymeng ran into this a few weeks ago #28206 which is how I ended up down the path of trying to understand why we don't even load / find 2.x and discover the bug with the esm package... |
Just to make things much easier to understand I isolated the incompatibility between MSAL 2.x and the esm package - you can see that in this minimal repro Might be I am missing something super obvious! |
Chatted with Karishma, going to close this PR and meet us halfway with skipping this test (not deleting) and adding an issue for me to dig into alternatives |
### Packages impacted by this PR @azure/identity ### Issues associated with this PR 28373 ### Describe the problem that is addressed by this PR A more conservative version #28346. I will document my learnings in this issue but the original PR also contains useful context to how we ended up here ### Checklists - [x] Added impacted package name to the issue description - [x] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x] Added a changelog (if necessary)
Packages impacted by this PR
@azure/identity
Issues associated with this PR
N/A - test issue
Describe the problem that is addressed by this PR
When we migrated to MSAL's implementation for Node's IBC in #26724 we discovered
a bug in MSAL's implementation causing an unhandled promise rejection
issue
While this was fixed in MSAL 2.x we are still running tests against MSAL 1.x due
to our ESM package's inability to respect the
exports
field which MSAL movedto in 2.x
Unfortunate, and results in our test continuing to crash Mocha. Further, now
that we no longer have our own in-house implementation, this test only tests
that MSAL can throw errors.
At this point, the test is both obsolete and harmful as it continues to cause
unhandled rejections - so I am deleting it.
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?
I thought about passing a custom loopbackClient to the test that patches this
behavior but that requires changing source code just to fix a test, more
obsolete code that will be unnecessary once we move to ESM and are unblocked
from running against MSAL's 2.x version
Are there test cases added in this PR? (If not, why?)
Provide a list of related PRs (if any)
AzureAD/microsoft-authentication-library-for-js#6449
#26724
Checklists