-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 Arcade subscriptions to not point at legacy repos #1823
Comments
Does it make sense to move all managed code into Libraries? |
I'm not sure if it does. The three libraries we have that build in installer are:
All three libraries are netstandard2.0 (or older for compat reasons) libraries. I don't know how well the libraries innerloop dev experience would be for building these and running their unit tests. Additionally, it does move them further away from their corresponding native code (for DependencyModel and HostModel) but since it's in the same repository, it's probably not a huge issue. @vitek-karas @dagood what do you think? |
I might be misunderstanding something, why can't we just change the target-repo in the subscription from corefx to runtime so that we take a dependency on ourselves in the BAR graph? |
That's what I was thinking of doing to fix this, but I wasn't sure if anyone had any qualms about subscribing to ourselves in the new repo since we still haven't set it up yet. What frequency do we want to that subscription to update? |
We use to have it once daily so it might make sense to do it that way. |
It is a bit fishy from a source-build perspective now that you mention it. It sounds like the self-dependency is only used to compile against, is that right? (Then source-build can provide them as reference-only packages built by e.g. a GenAPI workflow.) /cc @dseefeld |
Also there's the issue with live changes not taking affect immediately for consumers of these packages. I hit that with the IL.SDK in the past when I updated a property name in the targets file. Switching to live dependencies might be the better solution long term. |
And we already have issues for some of them, IL.SDK, is one of them. |
Right, I'm talking about the ones that @jkoritzinsky mentioned at last, ie runtime.native.System.IO.Ports. |
I have a desire to remove PlatformAbstractions altogether and combine it with However,
Note that we have other examples where the "managed code" lives in a different
The experience would be equivalent to every other library we build from |
The other problem with moving HostModel is the tests for it use the hosts built within installer and the test infrastructure in installer. The tests would have to be changed pretty significantly to work within the libraries test infra IMO. |
Sounds like a problem rather than a constraint. Do we actually like having tests that depend on full stack build? I bet we can still get pretty good (maybe better?) test coverage if those were written as unit tests. We can still benefit from functional tests that depend on host / installer, but that can probably stay with the installer. |
I think it's more of a constraint than a problem since the code in |
/cc @swaroop-sridhar who sort of owns the HostModel. I do agree with @jkoritzinsky that this is almost a requirement. We could test on a mock host binaries - which would be the "unit test" way of doing things, but that would not guard against live-build breaks where changes to the host binaries need to be reflected in the HostModel (and vice-versa). That said we could probably split the tests and run most of them on mocks in the libraries subset and have only a small number of end-2-end validation tests in the installer subset. Or even better - we should move the host product sources/build into the coreclr subset (a long standing discussion that this should be done) and then simply consume them from the libraries subset like the rest of the runtime. The tricky bit in that approach is the need for a fully functional dotnet install layout on disk, but I think coreclr tests have the ability to do that already. |
I would prefer that option over the others as it also helps with the composition of our testhost. |
I don’t think we can move the host binaries into the coreclr subset since they’ll also be used with mono, but I’m very much for moving them into their own “host” subset that we can build before libraries and then consume from the libraries subset. That would also enable moving the libraries tests to use the live hosts very easily. |
I would also like to call out that for libraries all configurations package testing we depend on @ericstj will work on: #2017 and after that we will explore the idea of consuming live bits, but for that we would need to make package testing depend on all the installer builds that produce the whole product. |
@jkoritzinsky and I just talked about it; I agree that it is a good idea to mode HostModel to libraries partition, and divide the tests between libraries and installer tests.
In this scheme, I think we'll not need a mock CoreCLR layer to facilitate testing. |
This does not make sense to me. Bundler is not a library and it is CoreCLR specific. The tests for it should not be in a library partition. |
I think the problem is that we are conflating inner loop testing and the final product testing. The final product testing should always work on the final build of the product (ie bits produced by installers). Now, the problem is how to make inner loop efficient - you do not want to go through building installers for each one line change. I believe that scalable way to make the inner loop testing work is:
This side-steps all the circular dependencies that we are otherwise going to deal with forever. BTW: This is how .NET Framework inner loop worked. The product construction of .NET Core is very similar to .NET Framework product construction, so we can borrow all other things that came with it. |
The .NET Core 3.0 bundler is not CoreCLR-specific. It lives completely at the hosting layer with its implementation in the apphost and Microsoft.NET.HostModel. The specific test that would need a mock is the test that the Microsoft.NET.HostModel bundle creation is compatible with the apphost bundle extraction, which runs the apphost to extract. We would need a simple hostfxr mock that no-ops and then we’d be able to validate that the bundling works. |
Ok, the .NET Core 3.0 bundler is not CoreCLR-specific. But I still believe that libraries are a wrong place for anything that has to do with it. Why do we need all these mocks? Can we build the whole product and run the test against that? |
Most of the mocks are in the hosting layer to help us enable more granular tests for the apphost, hostfxr, hostpolicy, coreclr interactions. We could probably reuse the libraries test harness to put together a fully functional bundle for an app, but it would add a lot of complexity in comparison to using a simple mock hostfxr that just returns “success” from its “run the application” entry point. I just checked the hosts source tree and we already build a mock hostfxr that does exactly what we want for usage in the host activation tests that we can reuse. |
Do I read correctly that you agree that the tests listed in #1823 (comment) should not live under libraries? I believe that the src/library/... should contain public API definitions, implementations (that are not runtime specific) and their tests. If there are pieces of libraries test infrastructure that we would like to reuse for other parts of the product, we should factor them out into a shared place (e.g. .\eng). |
I think the tests that test the code in Microsoft.NET.HostModel should live in the same subset as Microsoft.NET.HostModel. If Microsoft.NET.HostModel moves to the libraries subset, then as many of the tests of the code in Microsoft.NET.HostModel should move as well. The tests listed in #1823 (comment) are all tests of the Microsoft.NET.HostModel assembly. So by my logic, they should move along with Microsoft.NET.HostModel. The HostActivation.Tests test suite that directly tests the various native hosting components will either stay where it is (since it currently uses the final product-built shared framework layout) or move along with the hosts to the host partition (to make a tight innerloop for developing the hosting layer that doesn't require rebuilding the installers). |
I'm going to go ahead with the hardcoding of System.Text.Json to 4.7.0 for the hosting libraries since that fixes some of the other scenarios (including dotnet/sdk#3884 that prompted me to open this issue). |
As such I don't think it belongs to libraries (based on the definition what goes there by @jkotas). Logically it belongs to the same place where host lives (currently installer, maybe elsewhere in the future). Note that it's a component which Mono will also need (if they're going to use the same hosting layer as CoreCLR, then the SDK will need HostModel even for Mono targets). As to why we're using mocks in the host tests:
|
This issue has come up again with #35006. Both So, basically we need to unify the |
This issue has come up again in #41041. Since HostModel is referencing an old System.Text.Json - it was using an API that has been marked as Obsolete in 5.0. But we didn't know since it was still using a Preview4 version. We should really take a look at this library and its dependencies and decide on a long-term plan for it. What we are doing today isn't working very well. Note that PlatformAbstractions and DependencyModel have been resolved and have found their permanent home (PlatformAbstractions was discontinued and DependencyModel is under src/libraries). The only remaining library to fix is cc @ericstj |
cc @agocke |
This came up again in dotnet/sdk#14574. Because of the different assembly version of dependencies of HostModel (checked in, 5.0 RC) and DependencyModel (live 6.0) there's a mismatch. @jkoritzinsky @agocke is this issue only tracking HostModel re-homing? If so, can we change the title (and ideally fix in 6.0 😺) |
This issue also tracks using live built hosts for the libraries test host instead of consuming them via packages. |
Apparently someone added a subscription to point to ourselves, i.e. #46137. Verified via DARC:
Curious why it was enabled now and isn't set to Batchable: True? cc @dotnet/runtime-infrastructure |
I added this one because we were using some old dependencies here. we have setup up dependency flow but it required a manual trigger. we could update the frequency to weekly though. we can set Batchable to true |
+1 on setting to weekly and batchable. |
Closing this as we now have the subscriptions set up to subscribe to ourselves instead of the legacy repos. |
We have a number of Arcade subscriptions that currently point at legacy repositories (dotnet/coreclr, dotnet/corefx, dotnet/core-setup) for various tools used in the repository or NuGet packages.
Here are the various subscriptions we have:
The third category in particular is blocking dotnet/sdk#3884
cc: @dotnet/runtime-infrastructure
The text was updated successfully, but these errors were encountered: