Skip to content

Fix coverlet code coverage #1248

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

Merged
merged 1 commit into from
Jul 25, 2019
Merged

Fix coverlet code coverage #1248

merged 1 commit into from
Jul 25, 2019

Conversation

hughbe
Copy link
Contributor

@hughbe hughbe commented Jul 1, 2019

We need this for the fix in coverlet-coverage/coverlet#375 to be taken in
Also add another test project exclusion

@hughbe hughbe requested a review from a team as a code owner July 1, 2019 08:34
@hughbe
Copy link
Contributor Author

hughbe commented Jul 8, 2019

@sharwell hey - I'm looking to update coverlet but this causes some errors I can't repro locally

##[error].packages\coverlet.msbuild\2.6.2\build\coverlet.msbuild.targets(41,5): error : (NETCORE_ENGINEERING_TELEMETRY=Test) Could not convert string '{"Line":57,"Ordinal":0}' to dictionary key type 'Coverlet.Core.Instrumentation.BranchKey'. Create a TypeConverter to convert from the string to the key type object. Path 'Results[0].Documents['F:\workspace\_work\1\s\src\Common\src\Interop\Interop.HandleCollector.cs'].Branches.{"Line":57,"Ordinal":0}', line 1, position 21869.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at Coverlet.Core.CoveragePrepareResult.Deserialize(Stream serializedInstrumentState) in C:\Users\toni\Workspace\coverlet\src\coverlet.core\CoveragePrepareResult.cs:line 21
   at Coverlet.MSbuild.Tasks.CoverageResultTask.Execute() in C:\Users\toni\Workspace\coverlet\src\coverlet.msbuild.tasks\CoverageResultTask.cs:line 83

@hughbe
Copy link
Contributor Author

hughbe commented Jul 19, 2019

/cc @tonerdo is this on us or you :D happy to help and offer logs etc if you need

@zsd4yr
Copy link
Contributor

zsd4yr commented Jul 24, 2019

@sharwell might have some thoughts

@codecov
Copy link

codecov bot commented Jul 25, 2019

Codecov Report

Merging #1248 into master will decrease coverage by 14.73942%.
The diff coverage is n/a.

@@                 Coverage Diff                  @@
##              master       #1248          +/-   ##
====================================================
- Coverage   39.81152%   25.07211%   -14.73942%     
====================================================
  Files           1132         766         -366     
  Lines         336287      269044       -67243     
  Branches       39079       37972        -1107     
====================================================
- Hits          133881       67455       -66426     
+ Misses        197574      196855         -719     
+ Partials        4832        4734          -98
Flag Coverage Δ
#Debug 25.07211% <ø> (-14.73942%) ⬇️
#production 25.07211% <ø> (+0.00222%) ⬆️
#test 100% <ø> (+1.20606%) ⬆️

@hughbe
Copy link
Contributor Author

hughbe commented Jul 25, 2019

Great! We fixed it :)

@RussKie RussKie merged commit 875147a into dotnet:master Jul 25, 2019
@hughbe hughbe deleted the coverage-fix branch July 25, 2019 11:03
@ghost ghost locked as resolved and limited conversation to collaborators Feb 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants