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

Update karma test configuration for track2 packages #13309

Merged
10 commits merged into from
Jan 22, 2021
Merged

Conversation

xirzec
Copy link
Member

@xirzec xirzec commented Jan 20, 2021

This PR removes our dependency on the unmaintained package "karma-remap-istanbul" and replaces it with a smaller karma plugin ("karma-sourcemap-loader") that allows karma-coverage to load source maps from the disk correctly.

I tested and confirmed that the generated coverage data has the correct source TS files.

@@ -26,7 +26,7 @@ module.exports = function(config) {
"karma-ie-launcher",
"karma-env-preprocessor",
"karma-coverage",
"karma-remap-istanbul",
"karma-sourcemap-loader",
Copy link
Member

Choose a reason for hiding this comment

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

Thanks, @xirzec, this is amazing!

I've been meaning to try karma-typescript instead, have you tried that too?

Copy link
Member Author

Choose a reason for hiding this comment

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

karma-typescript expects to read in TS files and do the compilation -- but since this is a browser bundle, we really want rollup to make the test js file for us with all the browser versions of modules. Not sure that we can do this with karma-typescript.

Copy link
Member

@HarshaNalluru HarshaNalluru Jan 20, 2021

Choose a reason for hiding this comment

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

Yes, it takes TS files. But, since we are not publishing the browser bundle anyway, what's the point of making a bundle for tests?

Is the idea that it would closely represent how the user may do the bundling?

Copy link
Member Author

Choose a reason for hiding this comment

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

The bundle makes sure our browser versions of files work as expected. And you can't really test without bundling in some form since we're not really using es module support in the browser yet.

@xirzec
Copy link
Member Author

xirzec commented Jan 20, 2021

bizarre test failures from CI: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Copy link
Member

@deyaaeldeen deyaaeldeen left a comment

Choose a reason for hiding this comment

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

TA changes look great, thanks!

Copy link
Member

@ljian3377 ljian3377 left a comment

Choose a reason for hiding this comment

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

Storage changes look great, thanks!

@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

@ghost
Copy link

ghost commented Jan 22, 2021

Hello @xirzec!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 40b027d into Azure:master Jan 22, 2021
@xirzec xirzec deleted the updateKarma2 branch January 22, 2021 21:38
ghost pushed a commit that referenced this pull request Jan 25, 2021
#13309 didn't catch this because core-crypto went in around the same time.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Configuration Azure.ApplicationModel.Configuration Azure.Core Azure.Identity Client This issue points to a problem in the data-plane of the library. Cognitive - Form Recognizer Cognitive - Metrics Advisor Cognitive - Text Analytics Communication Digital Twins EngSys This issue is impacting the engineering system. Event Grid Event Hubs KeyVault Search Service Bus Storage Storage Service (Queues, Blobs, Files) Tables
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants