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 Dependencies #1378

Merged
merged 18 commits into from
Oct 15, 2020
Merged

Update Dependencies #1378

merged 18 commits into from
Oct 15, 2020

Conversation

JimBobSquarePants
Copy link
Member

@JimBobSquarePants JimBobSquarePants commented Oct 12, 2020

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Updating all possible dependencies to their latest versions.

There is a known issue #1380 with the reference BMP encoder on Ubuntu that I have applied a workaround for now by skipping on Ubuntu CI. This affects our coverage report but is tested on all other platforms.

Fixed.

I have a single outstanding upgrade of Microsoft.Net.Compilers.Toolset required but there's an issue that either needs fixing upstream for that or we can use the ActiveIssueAttribute to skip the affected tests on NET 4.7.2

Thoughts please on that.

I've disabled the codec tests using ActiveIssueAttribute and removed unnecessary implementations of the executor for the BokehBlur tests.

Looks like the executor issue now fails on Ubuntu also. 😞
https://github.com/SixLabors/ImageSharp/pull/1378/checks?check_run_id=1256202313#step:6:351

@codecov
Copy link

codecov bot commented Oct 13, 2020

Codecov Report

Merging #1378 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1378   +/-   ##
=======================================
  Coverage   82.85%   82.85%           
=======================================
  Files         690      690           
  Lines       31074    31074           
  Branches     3512     3512           
=======================================
  Hits        25747    25747           
  Misses       4605     4605           
  Partials      722      722           
Flag Coverage Δ
#unittests 82.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70d636d...314e9f6. Read the comment docs.

@JimBobSquarePants JimBobSquarePants changed the title WIP Update Dependencies Update Dependencies Oct 13, 2020
@JimBobSquarePants JimBobSquarePants requested a review from a team October 13, 2020 23:46
@@ -129,10 +129,10 @@ public async Task DecodeAsnc_DegenerateMemoryRequest_ShouldTranslateTo_ImageForm
[Theory]
[InlineData(TestImages.Jpeg.Baseline.Jpeg420Small, 0)]
[InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 1)]
[InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 10)]
[InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 15)]
Copy link
Member Author

Choose a reason for hiding this comment

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

Test was flaky on NET Core 2.1, this seemed to make it less so.

@JimBobSquarePants JimBobSquarePants marked this pull request as ready for review October 13, 2020 23:48
@JimBobSquarePants JimBobSquarePants mentioned this pull request Oct 14, 2020
4 tasks
@@ -170,7 +170,10 @@ private static void PrepareRemoteExecutor()
}

string testProjectConfigPath = TestAssemblyFile.FullName + ".config";
File.Copy(testProjectConfigPath, remoteExecutorConfigPath);
if (File.Exists(testProjectConfigPath))
Copy link
Member Author

Choose a reason for hiding this comment

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

This file only exists if there are binding redirects.

Copy link
Member

@antonfirsov antonfirsov left a comment

Choose a reason for hiding this comment

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

A few concerns/questions.

<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Update="Moq" Version="4.14.5" />
<PackageReference Update="Microsoft.DotNet.RemoteExecutor" Version="6.0.0-beta.20513.1" />
<PackageReference Update="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.20513.1" />
Copy link
Member

@antonfirsov antonfirsov Oct 14, 2020

Choose a reason for hiding this comment

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

Are we adding this only because of ActiveIssueAttribute?

Copy link
Member

@antonfirsov antonfirsov Oct 14, 2020

Choose a reason for hiding this comment

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

Ahh, I see it's not a trivial feature because of the optional TargetFrameworkMonikers parameter. Cool 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it's pretty nifty. Some cool other attributes available also.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not actually needed now but keeping it as it's far too useful!

where TPixel : unmanaged, IPixel<TPixel>
{
// dotnet xunit doesn't respect filter.
if (TestEnvironment.IsFramework)
Copy link
Member

@antonfirsov antonfirsov Oct 14, 2020

Choose a reason for hiding this comment

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

We are keeping dotnet xunit around only to do the x86 test run, which eventually happens only on Framework for some reason. Would be important to get the 32bit coverage across all platforms with dotnet test, where dotnet(.exe) has to come from a 32 bit SDK, see xunit/xunit#1123 (comment)

Is this something we can easily get with build-and-test.yml?

Copy link
Member Author

@JimBobSquarePants JimBobSquarePants Oct 15, 2020

Choose a reason for hiding this comment

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

I don't know. Originally I wanted to do it via setup-dotnet but choosing the platform architecture there is not supported and no-one seems interested in the feature

actions/setup-dotnet#72

Copy link
Member Author

Choose a reason for hiding this comment

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

static void RunTest(string providerDump, string nonContiguousBuffersStr)
{
TestImageProvider<TPixel> provider = BasicSerializer.Deserialize<TestImageProvider<TPixel>>(providerDump);

provider.LimitAllocatorBufferCapacity().InPixelsSqrt(100);

using Image<TPixel> image = provider.GetImage(GifDecoder);
image.DebugSave(provider);
image.DebugSave(provider, nonContiguousBuffersStr);
Copy link
Member

Choose a reason for hiding this comment

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

good catch

@@ -44,7 +62,7 @@ static void RunTest(string providerDump, string nonContiguousBuffersStr)
RemoteExecutor.Invoke(
RunTest,
providerDump,
enforceDiscontiguousBuffers ? "Disco" : string.Empty)
"Disco")
Copy link
Member

Choose a reason for hiding this comment

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

We no longer need the parameter I guess.

RemoteExecutor
.Invoke(RunTest, BasicSerializer.Serialize(provider), BasicSerializer.Serialize(value))
.Dispose();
provider.RunValidatingProcessorTest(
Copy link
Member

@antonfirsov antonfirsov Oct 14, 2020

Choose a reason for hiding this comment

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

This, and below tests were remote executed to reduce memory pressure, and the chance of OOM-s, especially on x86. BokehBlur is very memory intensive.

Copy link
Member Author

Choose a reason for hiding this comment

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

They seem to be ok now. As I recall it uses less memory than it did originally. Haven't seen any failures in the last few test runs due to this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Definitely rock solid. Multiple test runs with zero issues.

Copy link
Member

Choose a reason for hiding this comment

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

Ok for now then, but if we'll see OOM-s after introducing new 32bit targets, this is a good place to get back.

Note that we were getting OOM-s not because of a specific test but rather because of reaching a critical mass of memory intentse-tests. I also pushed some Jpeg tests out-process together with the Bokeh ones back in the past. The price is execution time OFC. Testing image-processing is hard :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Preach!

Could have saved myself days of issues if i'd just thought of this first.
@JimBobSquarePants JimBobSquarePants requested review from a team and antonfirsov October 15, 2020 11:36
Copy link
Collaborator

@brianpopow brianpopow left a comment

Choose a reason for hiding this comment

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

LGTM

@JimBobSquarePants
Copy link
Member Author

@antonfirsov I'm gonna merge this as I'm happy with the result and have cleaned up anything questionable.

@JimBobSquarePants JimBobSquarePants merged commit 4e61d87 into master Oct 15, 2020
@JimBobSquarePants JimBobSquarePants deleted the js/update-dependencies branch October 15, 2020 20:20
JimBobSquarePants added a commit that referenced this pull request Mar 13, 2021
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.

3 participants