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

Async methods excluded from coverage after updating to 2.8.1 #794

Closed
Malivil opened this issue Apr 6, 2020 · 32 comments
Closed

Async methods excluded from coverage after updating to 2.8.1 #794

Malivil opened this issue Apr 6, 2020 · 32 comments
Labels
as-designed Expected behaviour tenet-coverage Issue related to possible incorrect coverage

Comments

@Malivil
Copy link

Malivil commented Apr 6, 2020

Using coverage format "OpenCover" and the coverlet.msbuild package
In version 2.8.0 an async method in my Web API class shows no coverage (because I haven't written tests yet):
BeforeCoverage

In version 2.8.1, the same method is just excluded from coverage entirely:
AfterCoverage

The coverage.opencover.xml shows a complete missing section for the method:
Diff

I do not have a minimal reproduction example but if needed I can probably make one.
May be related to 528956b

@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Apr 6, 2020

Do you have ExcludeFromCodeCoverage attribute somewhere?
Do you see missing coverage only for this method in source or for all method of same class?

I do not have a minimal reproduction example but if needed I can probably make one.

Would be great!It's hard without repro.

cc: @matteoerigozzi

@MarcoRossignoli MarcoRossignoli added needs more info More details are needed tenet-coverage Issue related to possible incorrect coverage labels Apr 6, 2020
@Malivil
Copy link
Author

Malivil commented Apr 6, 2020

This class does not have ExcludeFromCodeCoverage
Only the two methods marked async are not showing coverage.

I will try to make a simple reproduction project. I'll comment here with the repo when it's complete.

@MarcoRossignoli
Copy link
Collaborator

Ok thanks a lot!

@Malivil
Copy link
Author

Malivil commented Apr 6, 2020

Here's a repro with the minimum example: https://github.com/Malivil/CoverletAsyncRepro
If you run the .bat file within the .Tests project it will generate a report in the TestResults folder

Changing the version of the coverlet.msbuild in the .Tests csproj to 2.8.0 and then re-running the .bat will show the function as uncovered as it should.

@MarcoRossignoli
Copy link
Collaborator

Great, stay on 2.8.0 for now I'll come back asap.

@MarcoRossignoli MarcoRossignoli added bug Something isn't working and removed needs more info More details are needed labels Apr 6, 2020
@bgoymer-unilink
Copy link

bgoymer-unilink commented Apr 7, 2020

Hi there,

I've also noticed this issue recently, it appears to be something to do with the /p:ExcludeByAttribute=CompilerGeneratedAttribute argument, as removing this will cause the coverage to be successfully reported. Thanks for the tip of going back to 2.8.0 as that also solves the issue for now.

@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Apr 7, 2020

@Malivil can you confirm that removing /p:ExcludeByAttribute=CompilerGeneratedAttribute solve(disappear, but it's clearly a bug) issue?

@bgoymer-unilink
Copy link

@MarcoRossignoli I feel that I need to clarify; athough removing the argument appears to solve this issue, it will cause all our auto-implemented properties in our DTOs to record no coverage without being explictly tested, which we did not have to do prior to 2.8.1.

@MarcoRossignoli
Copy link
Collaborator

@bengoymer yes I mean this is a bug but if we know that is related to that parameter we can fix more fast.

@bgoymer-unilink
Copy link

@MarcoRossignoli perfect, thank you.

@MarcoRossignoli
Copy link
Collaborator

@bengoymer can you try to remove that param and filter out DTO using source file filtering(if DTO are in separate files)?
https://github.com/tonerdo/coverlet/blob/master/Documentation/MSBuildIntegration.md#source-files

@bgoymer-unilink
Copy link

@MarcoRossignoli yes, just done that. If I filter out the DTOs using the source file filtering, and remove ExcludeByAttribute the coverage of the async functions is as I'd expect.

@Malivil
Copy link
Author

Malivil commented Apr 7, 2020

@MarcoRossignoli Removing that exclude does fix this issue. The reason I had that was mostly to exclude generated property Getters and Setters.

@MarcoRossignoli
Copy link
Collaborator

@Malivil sorry I wasn't clear, this is only to confirm that the issue disappear if you remove that attribute for those async method, it won't fix the issue it's to have a double confirmation on where issue could be.

@Malivil
Copy link
Author

Malivil commented Apr 7, 2020

@MarcoRossignoli I understand. I was just adding clarity as to why I had it there in the first place =)

I guess I should have used a different word than "fix"

@MarcoRossignoli
Copy link
Collaborator

So if you remove that attribute you see async methods uncovered yet?

@Malivil
Copy link
Author

Malivil commented Apr 7, 2020

Yes, removing the attribute exclude shows the async methods as being uncovered, that's what I meant when I said it "[fixed] the issue". Sorry for not being clear =)

@viceice
Copy link
Contributor

viceice commented Apr 9, 2020

Seeing this too, workaround:

<!-- <ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute> -->
<ExcludeByAttribute>Obsolete</ExcludeByAttribute>

@MarcoRossignoli
Copy link
Collaborator

@Malivil can you try the workaround(temporary) and tell me if it works?

@Malivil
Copy link
Author

Malivil commented Apr 9, 2020

Where does that go? In the test .csproj?

@viceice
Copy link
Contributor

viceice commented Apr 9, 2020

@Malivil It depends on your usage. We use the collector, so we add this to the runsettings file.

@Malivil
Copy link
Author

Malivil commented Apr 9, 2020

We use the msbuild integration as shown in the test repo: https://github.com/Malivil/CoverletAsyncRepro

@viceice
Copy link
Contributor

viceice commented Apr 9, 2020

@Malivil
Copy link
Author

Malivil commented Apr 9, 2020

That's what I thought.

@MarcoRossignoli: This workaround behaves the same as the command-line change which I think is expected.

@MarcoRossignoli
Copy link
Collaborator

This workaround behaves the same as the command-line change which I think is expected.

Not clear what you mean, /p:ExcludeByAttribute=Obsolete for msbuild

@Malivil
Copy link
Author

Malivil commented Apr 9, 2020

This workaround behaves the same as the command-line change which I think is expected.

Not clear what you mean, /p:ExcludeByAttribute=Obsolete for msbuild

Using that switch behaves the same as if I don't use ExcludeByAttribute at all. I don't have anything annotated with Obsolete so it has no affect.

@MarcoRossignoli
Copy link
Collaborator

Using that switch behaves the same as if I don't use ExcludeByAttribute at all. I don't have anything annotated with Obsolete so it has no affect.

Yes the test was only to understand if we're excluding something generated by compiler and also with Obsolete and maybe the result could be a bit different. But ok thanks for help on investigation.

@Malivil
Copy link
Author

Malivil commented Apr 9, 2020

If I use Obsolete, GeneratedCodeAttribute, or a combination of both it does not exclude the async method. If I add CompilerGeneratedAttribute back in to either the switch or the test .csproj then it does exclude the async method again. So it seems to be narrowed to CompilerGeneratedAttribute specifically.

@MarcoRossignoli
Copy link
Collaborator

So it seems to be narrowed to CompilerGeneratedAttribute specifically.

Yep, my hope was find a temporary workaround with no version downgrade, but seem not possible at the moment.

@MarcoRossignoli MarcoRossignoli added as-designed Expected behaviour and removed bug Something isn't working labels Apr 10, 2020
@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Apr 10, 2020

@Malivil we did some check, actually the behaviour is correct, we fixed a bug where CompilerGeneratedAttribute wasn't honored, so now correct behaviour is to exclude class with that attribute and in your case every async state machine(autogenerated class by roslyn compiler for async methods) has got that attribute.
You cannot use that filter to remove autoprops from instrumentation anymore and it's correct.
A solution for now is to use ExcludeByFile filter and remove al DTOs source files.

We should add support for skip autoprops #328

@Malivil
Copy link
Author

Malivil commented Apr 10, 2020

I cannot exclude the every file that has properties in it. Looks like I'll need to remove that exclude and have my coverage drop until #328 is complete

@MarcoRossignoli
Copy link
Collaborator

Understood, for now feel free to close this issue, I'll move that issue up in queue.

@Malivil Malivil closed this as completed Apr 10, 2020
heaths added a commit to Azure/azure-sdk-for-net that referenced this issue Nov 17, 2020
heaths added a commit to Azure/azure-sdk-for-net that referenced this issue Nov 25, 2020
heaths added a commit to Azure/azure-sdk-for-net that referenced this issue Nov 25, 2020
* Use VSTest integration for Coverlet

Fixes #15231. Relates to #14427.

* Do not ignore CompilerGeneratedAttribute

See coverlet-coverage/coverlet#794 (comment)

* Enable code coverage for PRs

* Publish code coverage even for failed tests

* Enable code coverage reports

Resolves #14427 by limiting reports to a single service directory (CIs) or per test project (dev environments). For CIs, full coverage reports of everything build will be uploaded. For dev environments, a summary HTML file will be output to test projects' TestResults directories.

* Fix filefilters path for CI

* Use absolute path for filefilters

Same as dev support; reportgenerator documentation is not clear on when absolute or relative paths are required.

* Use absolute path for reports

* Update report directory to limit globbing

* Disable code coverage of track 2 mgmt

Opened #17090 to track re-enabling once improved.

* Generate report before uploading test results

The exact same commands are working locally using the same versions of ReportGenerator, sans running the test publishing executable. There's also extra coverage files showing up that I'm wondering if it's responsible.

* Temporarily upload all code coverage artifacts

* Split between props and targets again

At one point, this mostly worked. Going back to how I was split between props and targets before to see if that makes a difference.

* Collect more information

* Always define CoverletGetPathMap

@clairernovotny recommended important some changes. These are working locally when simulating a CI, so 🤞.

* Resolve PR feedback

Fix extra (temporary) logging as well.

* Use different variable to detect CI

ContinuousIntegrationBuild wasn't defined for test projects.

* Replace curly braces with Of in file names

Fixes #17164

* Removing extra logging

* Renames files with curly braces

Fixes #17164

* Resolve PR feedback

* Do not reformat HTML coverage report
markcowl pushed a commit to Azure/azure-sdk-for-net that referenced this issue Dec 7, 2020
* Use pre steps to determine whether to record live tests (#17063)

* Use pre steps to determine record

* Add TestMode setting

* Simplify live test post steps to use TestMode for recording condition

* Swtich back to smoke-test before doc publishing error gets fixed. (#17091)

Co-authored-by: Sima Zhu <sizhu@microsoft.com>

* Azure Monitor Exporter - Update readme (#17094)

* Update readme

* Update sdk/monitor/Microsoft.OpenTelemetry.Exporter.AzureMonitor/README.md

Co-authored-by: Reiley Yang <reyang@microsoft.com>

Co-authored-by: Reiley Yang <reyang@microsoft.com>

* Minor tweak in queue equals check (#17104)

* [Event Hubs Client] Docs Enhancements (#17085)

The focus of these changes is to correct a bug in the samples and to
introduce an SDK-level overview, covering each of the libraries.

* Sync eng/common directory with azure-sdk-tools for PR 1219 (#17108)

* Move entire docgeneration into common tools

* Move docindex to common

* Added the package replacement logic

* Fixed on parameters

* Fixed param

* Change function to dash

* Added regex on function

* Added display name.

* Update eng/common/docgeneration/Generate-DocIndex.ps1

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* Deal with js

* Add no new line args

* revert some test changes

* Need to default to the double quotes for JS regex

* Update Generate-DocIndex.ps1

* Added the appTitle

* type

Co-authored-by: Sima Zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* [live tests] Minor fixes for SupportedClouds and Location overrides/defaults (#17039)

* Default to true when live test platform does not have SupportedClouds override

* Fall back to empty location default for live tests

* simplify null checks

* Support for Identity in Patch for Microsoft.RecoveryServices/Vaults (#17016)

* Adding Identity support for Patch Vault

* Adding Release notes for the changes

* Resolving the breaking changes by adding identity

* Merge Feature/formrecognizer2.1 into master (#17121)

* [FR] Update to 2.1-preview.2 with generation and recordings (#16462)

* generation and recordings

* missing tests

* PR feedback

* enable test

* export-api

* [FR] Add invoices functionality (#16522)

* add invoices

* pr feedback

* export api

* Update sdk/formrecognizer/Azure.AI.FormRecognizer/src/RecognizeInvoicesOperation.cs

Co-authored-by: Krista Pratico <krpratic@microsoft.com>

Co-authored-by: Krista Pratico <krpratic@microsoft.com>

* [FR] Add documentation for invoices (#16659)

* documentation

* PR feedback

* generation plus small fixes (#16787)

* [FR] Expose code generated properties (#16841)

* selection mark state order:

* appearance

* bounding box

* content-type bmp

* pages

* update to 2.1-preview.2

* language (#16889)

* added more test for copy feature (#16892)

* enable receipt and bc (#17004)

* remove bc workaround (#17025)

* disable receipts, enable AAD, move to canada (#17119)

Co-authored-by: Krista Pratico <krpratic@microsoft.com>

* add changelog for a new nuget minor version bump (#17131)

* Add EnablePartitioning to QueueProperties ctor; rename GetRawMessage (#17101)

* Add EnablePartitioning to QueueProperties ctor; rename GetRawMessage

* Revert test change

* Port ATOM fix

* fix

* PR fb

* Fix rest doc links for app config samples (#17127)

* [Identity] Merging feature/identity/140 back to master (#17083)

* {Identity] Prototype TokenCache option to enable sharing cache across credentials and executions

* prototype updates

* adding client side user authentication samples

* adding persistent token cache options

* fix compilation issues

* adding token cache samples

* fix header

* reword

* updating API spec

* temporary fix for AzureStack eng bits

* workaround for MSA account

* ignore failure test cases temporarily

* update api sig

* update version

* update change log

* update version

* fix changelog

* fix msal cache

* update msal version

* removing AuthenticationTokenRecord workaround

* adding configuration to SharedTokenCacheCredential

* upgrading msal

* update snippet

* [Identity] prepare for 1.4.0-beta.1 release (#16021)

* Updating changelog for 1.4.0-beta.1 release

* updating MSAL dependency

* Increment package version after release of Azure.Identity (#16028)

* make AuthenticationRecord public

* making APIs public that got switched to internal in merge

* adressing PR feedback

* add tests for new STCC options

Co-authored-by: Erich(Renyong) Wang <eriwan@microsoft.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>

* [Event Hubs Client] Fix Live Test Hangs (#17132)

The focus of these changes is to triage the test hangs in the live suite
that seem to be related to the snippet smoke tests.   This should unblock
test runs while I continue to troubleshoot and locate the root cause.

* Increment version for servicebus releases (#17134)

Increment package version after release of Microsoft.Azure.ServiceBus

* fix links (#17139)

* [Synapse][Spark] - Fix null reference exception due to some nullable properties (#17112)

Co-authored-by: Dongwei Wang <dongwwa@microsoft.com>

* [Synapse] - update version for Spark SDK (#17146)

Co-authored-by: Dongwei Wang <dongwwa@microsoft.com>

* Increment version for synapse releases (#17147)

Increment package version after release of Azure.Analytics.Synapse.Spark

* Integrate InheritDoc into the build (#17123)

# Summary
Adds a reference to [InheritDoc](https://www.nuget.org/packages/SauceControl.InheritDoc/) to replace all `/// <inheritdoc/>` comments with the actual comment content in the documentation xml produced by the build.

This is a development-only dependency; it will not be deployed with or referenced by the libraries.

Note this produces a lot of warnings for `<inheritdoc />` comments that need to be further refined with a `cref="somBaseType"` attribute. Some examples of this are included in this PR.

Example for `Azure.Security.KeyVault.Administration.xml`:

**Before**
```xml
<member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.Id">
    <inheritdoc/>
</member>
<member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.Value">
    <inheritdoc/>
</member>
<member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.HasCompleted">
    <inheritdoc/>
</member>
<member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.HasValue">
    <inheritdoc/>
</member>
<member name="M:Azure.Security.KeyVault.Administration.RestoreOperation.GetRawResponse">
    <inheritdoc/>
</member>
```

**After**
```xml
<member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.Id">
    <summary>
    Gets an ID representing the operation that can be used to poll for
    the status of the long-running operation.
    </summary>
</member>
<member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.Value">
    <summary>
    Final result of the long-running operation.
    </summary><remarks>
    This property can be accessed only after the operation completes successfully (HasValue is true).
    </remarks>
</member>
<member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.HasCompleted">
    <summary>
    Returns true if the long-running operation completed.
    </summary>
</member>
<member name="P:Azure.Security.KeyVault.Administration.RestoreOperation.HasValue">
    <summary>
    Returns true if the long-running operation completed successfully and has produced final result (accessible by Value property).
    </summary>
</member>
<member name="M:Azure.Security.KeyVault.Administration.RestoreOperation.GetRawResponse">
    <summary>
    The last HTTP response received from the server.
    </summary><remarks>
    The last response returned from the server during the lifecycle of this instance.
    An instance of Operation<typeparamref name="T" /> sends requests to a server in UpdateStatusAsync, UpdateStatus, and other methods.
    Responses from these requests can be accessed using GetRawResponse.
    </remarks>
</member>
```

* Add NET 5.0 testing (#16947)

* TSI: Add default values for ARM parameters (#17133)

* [FR] Updates before release (#17152)

* pre-release checklist changes

* update sample in readme

* GA release (#17151)

* Fix CONTRIBUTING.md .NET 5 SDK link (#17161)

* Increment version for formrecognizer releases (#17165)

Increment package version after release of Azure.AI.FormRecognizer

* Increment version for core releases (#17162)

Increment package version after release of Azure.Core.Amqp

* Sync eng/common directory with azure-sdk-tools for PR 1226 (#17128)

* Fixed the docindex.yml and rename the files

* Reset the mutated changes

* Force checkout as the changes have already copied out

* Minor changes for parameters

* Update Generate-DocIndex.ps1

* Update Generate-DocIndex.ps1

* Update Generate-DocIndex.ps1

* Added function to common

* Update Generate-DocIndex.ps1

Co-authored-by: Sima Zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>

* Update FxCop analyzers (#17157)

* Skip .NET 5 installation on Windows (#17167)

The default image should now have the .NET 5 available.

* Prepare for release (#17166)

* Prepare for release

* remove version from csproj

* remove preview from changelog

* remove project ref (#17171)

* [Synapse] - Generate SDK based on the latest Swagger spec (#17070)

* [Synapse] - Generate SDK based on the latest Swagger spec

* Update release notes

Co-authored-by: Dongwei Wang <dongwwa@microsoft.com>

* [DataFactory] Set computeType, coreCount to object type to allow expressions (#16804)

* [DataFactory] Set computeType, coreCount to object type to allow expressions

* Add a test

* Change PartitionOption to object to allow expression

* Add test cases

* Fixed the bug of the wrong parameter (#17169)

Co-authored-by: Sima Zhu <sizhu@microsoft.com>

* Increment version for servicebus releases (#17172)

Increment package version after release of Azure.Messaging.ServiceBus

* Enable EventHubs WebJobs extension live tests (#17029)

Goals:
1. Get E2E live tests running so we can start iterating while having some level of validation

* Azure Monitor Exporter: LogExporter (#17117)

* saving wip

* tests

* wip

* log details

* mark classes internal while WIP

* tests

* disable Task.Delay

* cleanup

* cleanup

* cleanup

* fix datetime

* include condition; if not default

* todo

* [FR] Undo customized internal enum (#17182)

Fixes: #13867

Codegen now creates enums as internal too, so our customization is no longer needed

* Add sync HttpClient support (#13722)

Fixes: #13476

A lot of nullability fixed because of building against assemblies with annotations.

* [FR] Enable validation for DataTableCell.Text not null in invoices  (#17187)

Bug in the Invoices endpoint where `Text` was not returned has been fixed and deployed to prod regions, so enabling the validation for it again.

Fixes: #16514

* Miberezi (#16978)

* fixing client libraries of private store

* adding missed file

* Fixing the SKD per the latest swagger files changes (fixing S360 issues)

* updating the SDK after swagger fixes

Azure/azure-rest-api-specs#11787

* [Communication] - PhoneNumberAdministrationClient - adding live tests (#16962)

* Update storage generator to suppress FxCop issues (#17181)

* [HMACAuthenticationPolicyTest] added new not null check for authValue (#17178)

* Enable code coverage (#17067)

* Use VSTest integration for Coverlet

Fixes #15231. Relates to #14427.

* Do not ignore CompilerGeneratedAttribute

See coverlet-coverage/coverlet#794 (comment)

* Enable code coverage for PRs

* Publish code coverage even for failed tests

* Enable code coverage reports

Resolves #14427 by limiting reports to a single service directory (CIs) or per test project (dev environments). For CIs, full coverage reports of everything build will be uploaded. For dev environments, a summary HTML file will be output to test projects' TestResults directories.

* Fix filefilters path for CI

* Use absolute path for filefilters

Same as dev support; reportgenerator documentation is not clear on when absolute or relative paths are required.

* Use absolute path for reports

* Update report directory to limit globbing

* Disable code coverage of track 2 mgmt

Opened #17090 to track re-enabling once improved.

* Generate report before uploading test results

The exact same commands are working locally using the same versions of ReportGenerator, sans running the test publishing executable. There's also extra coverage files showing up that I'm wondering if it's responsible.

* Temporarily upload all code coverage artifacts

* Split between props and targets again

At one point, this mostly worked. Going back to how I was split between props and targets before to see if that makes a difference.

* Collect more information

* Always define CoverletGetPathMap

@clairernovotny recommended important some changes. These are working locally when simulating a CI, so 🤞.

* Resolve PR feedback

Fix extra (temporary) logging as well.

* Use different variable to detect CI

ContinuousIntegrationBuild wasn't defined for test projects.

* Replace curly braces with Of in file names

Fixes #17164

* Removing extra logging

* Renames files with curly braces

Fixes #17164

* Resolve PR feedback

* Do not reformat HTML coverage report

* fix live test issue (#17200)

* Install dotnet when running smoke tests (#17208)

* ADT: add info about object serializer override (#17199)

* Add blurb about dist tracing (#17059)

- Addresses #16238
- Update LineCounter sample app to show usage of Event Grid
- Update LineCounter README to include a screenshot of Azure Monitor
- Update Distributed Tracing section in Diagnostics readme to link to LineCounter.
- Also add in DI extension methods.

* Fix EventGrid Readme issue (#17209)

* Fix EventGrid Readme issue

* Update README.md

* do not check if there any aquired numbers. Will cover this check in the sample tests (#17212)

* log azurite stderr. (#17230)

* [CODEOWNERS] Add chamons to synapse (#17238)

* Fix doc comment for CertificatePolicy.Default (#17231)

* Temporarily disable live test weekly allow-all filter (#17236)

* ConvertPrebuiltOutputToRecognizedForms moved to ClientCommon (#17185)

* Properly create secondary endpoint Uri for Azurite endpoints (#17246)

fixes #17215

* [FR] Add AAD tests for every endpoint (#17191)

* add tests for every endpoint

* remove playback

* custom forms with and withouth labels for aad

* Use BlobsCheckpointStore in scale monitor (#17241)

* Update Redis Enterprise to match Updated Swagger (#17214)

* Add support for Redis Enterprise.

* Add SessionRecords from successful tests.

* Add redisenterprise pipeline.

* Updated SDK to match updated Swagger.

* [Event Hubs Client] Live Test Fixes (#17261)

The focus of these changes is to fix a couple of race conditions causing
some tests to be flaky and to adjust the scope creation approach used for
snippet test.  The global setup/cleanup was causing occasional long delays
that appeared to be hangs during nightly runs.

* [Communication] - PhoneNumberClient - Adding samples for phone number administration (#16935)

* inroduce phone number addministration tests

* Samples are created

* Improve sanitization in tests

* Improve sanitization in tests

* Update test records

* Ignore phone numbers live test for not playback if INCLUDE_PHONENUMBER_LIVE_TESTS env var is not True

* Update readme

* Update readme

* samples wording update

* rename test

* addressing tests code formatting

* addressing tests code formatting

* add assertion to sample test

* add release phone number method for single number

* add release phone number method for single number - update api

* address PR comments (sample wording and renames)

* update sample wording and some variable names

* Send metadata header on IMDS probe request. (#15875)

* Call imds instance endpoint instead of token endpoint to probe for imds, extend timeout

* Update msi token tests to distinguish between which imds endpoint is being called

* Fix comment and visibility in test

* Change per stpetrov

* re-trigger checks

* Add metadata header to probe request

* CloudNative.CloudEvents bridge library (#17234)

* CloudNative.CloudEvents bridge library

* PR fb

* Fix NUnit casing

* Export API

* Add Mohit to Search owners list (#17275)

* Remove abstraction layers from EventHubs WebJobs extensions (#17271)

There are some layers in EventHubs WebJobs extensions that were the artifact of Track 2 refactoring. Remove them to simplify the code a bit.

Major changes:
* Merge `Processor` and `EventProcessorHost`
* Merge `ProcessorPartitionContext` and `Partition`, rename to `EventProcessorHostPartition`
* Remove ICheckpointer

* Fix to be able to CanGenerateSas and GenerateSas from storage clients generated by GetClient (#17232)

* Support moniker specific output folders (#17295)

* updating CI config with moniker specific readme/service output

* Update to latest AMQP package version (#17290)

* Do not generate reports with no coverage (#17293)

Fixes #17286

* Delete redundant files and point to common scripts (#17292)

* Added support for AccountInfo.IsHierarchicalNamespaceEnabled (#17285)

* Fix template path for tests.yml (#17198)

* Add a default value for environmentName (#17309)

* Resources SDK version 2020-10  (#17163)

* Generated SDK and re-recorded tests

* rerecord remaining tests

* Updated version and release notes

* regenerate from Swagger. Fixed possible breaking change

* ClientCertificateAzureServiceTokenProvider dispose of certificate obj… (#17266)

…ects

Properly dispose the X509Certificate2 objects after use to prevent temporary private key files to filling up the disk.
Unless properly dispoed, they fill up the space between garbage collections and stay permanently in case of process kills.

* Add token credential auth support (#17308)

* [synapse] Trim resource name to 15 char limit in provisioning (#17310)

- Fixes #17237

* Sync eng/common directory with azure-sdk-tools for PR 1233 (#17314)

* reformatted parameter arguments to both update-docs scripts. added parameter requirements and renamed CIRepository to DocRepoLocation which is a lot clearer. Added additional CIConfig parameter to update-docs-metadata to support specific write locations per moniker.

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>

* [Communication] - PhoneNumberAdministrationClient - fix next page (#17283)

Fix communication admin Pageable results issue not pulling next page

* Update AutoRest C# version (#17319)

* [EventGrid] Small README.md updates (#17313)

Endpoint is a URI, let's make the construction explicit in our samples
instead of just a plain string so customers starting from these samples
don't hit a type error right away.

* [Storage] Increase network timeout in tests. (#17323)

Sometimes tests experience slow transfer rate which makes tests pushing larger payloads flaky.
This is attempt to give them more time to complete transfer and see if this resolves that problem.

* [EventGrid] Add a cross reference to the docs (#17336)

From our user studies we've seen cases where folks correctly find
`EventGridSharedAccessSignitureCredential` but don't figure out how to
construct one.

We already have pointers on some of the constructors for
`EventGridPublisherClient` that take `EventGridSharedAccessSignature`'s
but we can also add a reference on the type itself.

* Various renaming for x-language consistency (#17320)

* Various renaming for x-language consistency

* Enable multiple blank lines StyleCop rules (#17318)

* Enable track 2 mgmt projects by default (#17324)

Resolves #17090 - at least for re-enabling mgmt-plane. Still needs coverage improvement but that's being handled separately.

* Sdk automation script (#17193)

SDK automation script

* Fix sync batch method coverage (#17343)

* fix sync batch method coverage

* re-enable InheritDoc (#17259)

* re-enable inheritdoc and fix non-generated comment warnings

* Clean up docs (#17342)

* add AAD and improve polling for playback (#17296)

* [TA] No locale in links and add functionalities to package descriptions (#17312)

* remove local from links and modify package description

* Make pageable results internal (#17348)

* [TA] Update service version and some cleanup (#17347)

* update service version

* run export

* [Storage] Bump network timeout, add progress logging. (#17350)

- Bump network timeout to 400s to see if it's enough for worst case agent-network-storage account combo
- add progress logging to flaky tests to see if it hangs.

* STG 75 (#17242)

* [FR] Update docstrings (#17345)

* first rounds:

* improve docstring and cleanup some code

* PR feedback

* [Event Hubs Client] Credential Refresh Buffer Tweak (#17330)

The focus of these changes is to add more buffer when computing the
time when a credential should be renwed.  We've recently begun to see
the occasional credential expiration infrequently during nightly runs.

These tweaks will allow for a greater period clock skew by eagerly refreshing
the token 10 minutes before the client belives it expires.  The minimum interval
for refreshing has also been reduced in order to guard against short lived
credentials.

* [Event Hubs Client] Enable Idempotent Producer Tests (#17316)

The focus of these changes is to enable the Live tests for the Idempotent
Producer feature now that the service team has confirmed that it has rolled
out to all Azure clouds in our test matrix.

* [Data Lake Performance] Test Scenarios for T2 (#17307)

The focus of these changes is to create the initial set of performance
test scenarios for the v12.x (track two) Data Lake client library.

* Replaced hardcoded true/false with TrueString/FalseString (#17359)

* [Event Hubs Client] Sample ReadMe Updates (#17315)

The focus of these changes is to fix the instructions for adding packages
since there are references to API changes from the beta in the sample code.

* enable AAD in test resources (#17351)

* Make storage mock clients able to generate sas (#17349)

* Prepare storage for release (#17382)

* Create Azure.Security.Attestation Track 2 Preview SDK  (#17159)

* Created Initialcut at GA API version

* Checkpoint

* Checkpoint

* Implemented most of the core attestation service APIs.

* Implemented V1 of all of MAA API Surface

* Converted TPM request and response to ReadOnlyMemory

* Another round of API review feedback

* Updated readme.md and changelog.md a small bit; corrected a couple of API review feedback items

* Somehow nunit got added to the test dependencies; removed it

* Added snippets to readme.md

* Fixed typo in tests.yml; Fleshed out readme.md a bit

* Use ClientSecretCredentials not DefaultProviderCredentials for tests

* Two test classes were still flagged as being live

* Ran Export-API.ps1

* Updated root cl for autorest

* Updated session records

* Added new SDK to ci.yml

* Fixed several static analysis errors

* Use TestEnvironment.Credential for credentials

* Try a different way of generating the key

* Updated session records

* Updated session records with policy document that does not contain CRLF characters

* Pull request feedback changes

* Updated changelog

* More Pull Request feedback

* Added assert that the number of signing certificates is at least 1

* Use Argument.AssertNotNullOrEmpty instead of Argument.IsInRange for array check

* [Storage] Live tests - Wait for RBAC replication. (#17385)

It may take up to 5 minutes for RBAC (AAD) role assignments to replicate. This makes live tests flaky.
The short term solution is to add "sleep" after test resources provisioning.

Long term solution to be found here #17384

* [Synapse] Update swagger

- Bump to eea7c0141c0b7ad9f66f8ba06560b549c6b3b014

* Add legacy checkpoint reading support to EventHubs (#17335)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: Sima Zhu <sizhu@microsoft.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
Co-authored-by: Reiley Yang <reyang@microsoft.com>
Co-authored-by: Vijaya Gopal Yarramneni <viyarr@microsoft.com>
Co-authored-by: Jesse Squire <jsquire@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Co-authored-by: asmaskar <58723769+asmaskar@users.noreply.github.com>
Co-authored-by: Mariana Rios Flores <mariari@microsoft.com>
Co-authored-by: Krista Pratico <krpratic@microsoft.com>
Co-authored-by: DorothySun216 <55454966+DorothySun216@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Co-authored-by: Scott Schaab <sschaab@microsoft.com>
Co-authored-by: Erich(Renyong) Wang <eriwan@microsoft.com>
Co-authored-by: Dongwei Wang <bean0idear@163.com>
Co-authored-by: Dongwei Wang <dongwwa@microsoft.com>
Co-authored-by: Christopher Scott <chriss@microsoft.com>
Co-authored-by: Pavel Krymets <pavel@krymets.com>
Co-authored-by: Basel Rustum <barustum@microsoft.com>
Co-authored-by: Chris Hamons <chris.hamons@xamarin.com>
Co-authored-by: Timothy Mothra <tilee@microsoft.com>
Co-authored-by: MiriBerezin <73054714+MiriBerezin@users.noreply.github.com>
Co-authored-by: pavelprystinka <30868871+pavelprystinka@users.noreply.github.com>
Co-authored-by: JoshuaLai <9044372+JoshuaLai@users.noreply.github.com>
Co-authored-by: Heath Stewart <heaths@microsoft.com>
Co-authored-by: David R. Williamson <drwill@microsoft.com>
Co-authored-by: Tianyun Gao (MSFT) <65581162+Tianyun-G@users.noreply.github.com>
Co-authored-by: Kamil Sobol <61715331+kasobol-msft@users.noreply.github.com>
Co-authored-by: andrew <69653137+greenms@users.noreply.github.com>
Co-authored-by: Isaac Sarek Banner <70341725+isaacbanner@users.noreply.github.com>
Co-authored-by: Amanda Nguyen <48961492+amnguye@users.noreply.github.com>
Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com>
Co-authored-by: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com>
Co-authored-by: Gokul Premraj <gopremra@microsoft.com>
Co-authored-by: Dan Nicolescu <dan.nicolescu@microsoft.com>
Co-authored-by: Matt Ellis <matell@microsoft.com>
Co-authored-by: ShivangiReja <45216704+ShivangiReja@users.noreply.github.com>
Co-authored-by: Alexander Batishchev <abatishchev@gmail.com>
Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>
annelo-msft pushed a commit to annelo-msft/azure-sdk-for-net that referenced this issue Feb 17, 2021
* Use VSTest integration for Coverlet

Fixes Azure#15231. Relates to Azure#14427.

* Do not ignore CompilerGeneratedAttribute

See coverlet-coverage/coverlet#794 (comment)

* Enable code coverage for PRs

* Publish code coverage even for failed tests

* Enable code coverage reports

Resolves Azure#14427 by limiting reports to a single service directory (CIs) or per test project (dev environments). For CIs, full coverage reports of everything build will be uploaded. For dev environments, a summary HTML file will be output to test projects' TestResults directories.

* Fix filefilters path for CI

* Use absolute path for filefilters

Same as dev support; reportgenerator documentation is not clear on when absolute or relative paths are required.

* Use absolute path for reports

* Update report directory to limit globbing

* Disable code coverage of track 2 mgmt

Opened Azure#17090 to track re-enabling once improved.

* Generate report before uploading test results

The exact same commands are working locally using the same versions of ReportGenerator, sans running the test publishing executable. There's also extra coverage files showing up that I'm wondering if it's responsible.

* Temporarily upload all code coverage artifacts

* Split between props and targets again

At one point, this mostly worked. Going back to how I was split between props and targets before to see if that makes a difference.

* Collect more information

* Always define CoverletGetPathMap

@clairernovotny recommended important some changes. These are working locally when simulating a CI, so 🤞.

* Resolve PR feedback

Fix extra (temporary) logging as well.

* Use different variable to detect CI

ContinuousIntegrationBuild wasn't defined for test projects.

* Replace curly braces with Of in file names

Fixes Azure#17164

* Removing extra logging

* Renames files with curly braces

Fixes Azure#17164

* Resolve PR feedback

* Do not reformat HTML coverage report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
as-designed Expected behaviour tenet-coverage Issue related to possible incorrect coverage
Projects
None yet
Development

No branches or pull requests

4 participants