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

[darc/maestro++] Darc should be buildable from source #2578

Open
dagood opened this issue Sep 7, 2018 · 17 comments
Open

[darc/maestro++] Darc should be buildable from source #2578

dagood opened this issue Sep 7, 2018 · 17 comments

Comments

@dagood
Copy link
Member

dagood commented Sep 7, 2018

I noticed issues about using Octokit #2580 and VSTS C# libs #2579 in Darc. This sounds like a great idea, but I want to make sure it's implemented in a way that leaves Darc able to build from source.

If Octokit and VSTS APIs can build from source, ok, but it would be preferable not to build them at all. The builds take time, and the capabilities won't be used in source-build.

/cc @alexperovich @jcagme


I haven't looked into every one, but these are unknowns when it comes to source-build:

An easy way I see to do this is to split code that needs to use these dependencies into separate csproj's, condition the dependency, and condition some small part of the code to link in (or not) web client capability. (Microsoft.DotNet.Maestro.Client is an example of something that's already split off!) The property ExcludeFromSourceBuild is used to skip a project during source-build.

I can imagine something fancier being done, where there's a real extensibility point on Darc. The user could choose to download some extra packages (or something) to enable web client capabilities.

@alexperovich
Copy link
Member

I agree. Does darc even need to be buildable from source? What darc functionality would be used in the source-build scenario?

@dagood
Copy link
Member Author

dagood commented Sep 7, 2018

source-build will use darc for dotnet/arcade#427 "Create a product source build layout from a repo sha" but even if that's done "before" the build from source, I'm pretty sure we'll be using darc to flow dependencies between repos.
/cc @mmitche

@jcagme
Copy link
Contributor

jcagme commented Oct 25, 2018

@dagood I know you mentioned that you'll try building Arcade from source in the following two weeks, I assume this includes darc. Would you consider any potential issues in the process to be preview (12/14) blockers?

@dagood
Copy link
Member Author

dagood commented Oct 25, 2018

Doing a "proper" build from source (no prebuilts) isn't a blocker for 3.0 preview, so no.

That said, the sooner we can build Darc from source rather than downloading it, the better, to avoid building up debt that ends up delaying the delivery of a fully source-built .NET Core. (And yeah, Darc is part of the required toolset, so it's included.) When I try building Arcade from source I'm planning to file issues to get this on the radar.

@dagood
Copy link
Member Author

dagood commented Oct 26, 2018

With Darc in particular, I don't see any source-buildability issues yet beyond the dependency stuff I already mentioned in the issue description, so I just added some more info and more detail on the design suggestion.

@markwilkie
Copy link
Member

@dagood - do you feel this requirement is fulfilled yet? If not, what do you see is missing?

@dagood
Copy link
Member Author

dagood commented Dec 6, 2018

AFAIK none of the work discussed in this thread has been done.

This was discussed in a email thread ~11/29 "Source-buildability of Darc's local capabilities" with @ChadNedzlek, @mmitche, and @jcagme, so the stuff to do is still known.

@markwilkie
Copy link
Member

@mmitche - what's needed for Preview II?

@dagood
Copy link
Member Author

dagood commented Dec 6, 2018

From the source-build perspective, this is not needed for preview 2. We'll need it to be able to deliver source-build on new distros without prebuilts, which I don't think is tied to any specific 3.0.0 milestones.

@ChadNedzlek
Copy link
Member

Is "darc" necessary to do anything more than fetching the correct commits/source blobs? Presumably that could be run on something other than the target computer (since it's not actually "the build"... it's just getting the source code), then that thing that's created would be either shipped off to distros like RedHat or built on the target computer... but at that point nothing in darc would be necessary. If there is no prebuilt stuff, darc won't be able to run anyway, so it doesn't help in that scenario either (since it requires a full functioning dotnet core to run).

Darc is a pretty intense mess of dependencies and pulling it apart is going to be painful and awkward and difficult to maintain. I'm hoping we can find a more sustainable solution that doesn't drag the web service into some dependency cycle.

@dagood
Copy link
Member Author

dagood commented Dec 7, 2018

Is "darc" necessary to do anything more than fetching the correct commits/source blobs?

Yes, when I mentioned "I'm pretty sure we'll be using darc to flow dependencies between repos." I'm referring to this:

  • Darc is meant to be the only way developers and other tools like Maestro++ interact and alter version/dependency files as well as bootstrapping files and scripts in arcade participating repos.
  • Darc's operations range from altering version/dependency files to creating PRs in specified repos.

Currently we use the Repo API (specifically Package Version Props) to do this, and from the above it sounds like using Package Version Props won't be supported. (And we might still need Darc for a standard way to flow zips through?)

Presumably that could be run on something other than the target computer (since it's not actually "the build"... it's just getting the source code), then that thing that's created would be either shipped off to distros like RedHat or built on the target computer... but at that point nothing in darc would be necessary.

That's correct, to me the reliance on Microsoft-prebuilt bits to do the trivial-seeming thing of gathering the source makes community maintenance less sustainable, but I don't have justification for this put together right now.

If there is no prebuilt stuff, darc won't be able to run anyway, so it doesn't help in that scenario either (since it requires a full functioning dotnet core to run).

This isn't the case: the N-1 SDK and Runtime aren't prebuilts. When there is no N-1, first-time bootstrapping has specific exceptions, but we can only use stuff we can build, not e.g. Octokit and Azure packages. If we can bring those into source-build, sweet, but that seems like a lot more maintenance cost than cutting them out of the build.

If you're interested, EngineeringPlanLinuxDistroRepos.md should clarify the requirements and N-1/bootstrap process. (It looks like it hasn't been updated for the switch from 2.1 => master yet.)

Darc is a pretty intense mess of dependencies and pulling it apart is going to be painful and awkward and difficult to maintain. I'm hoping we can find a more sustainable solution that doesn't drag the web service into some dependency cycle.

From what I've seen so far, I think the concerns are a bit overstated, but I think it's reasonable to wait for me to give it a try or something. Keep in mind that we aren't asking for this for preview2 or RTM.

@mmitche
Copy link
Member

mmitche commented Jan 11, 2019

@dagood I don't think this is required for preview 2, right?

@dagood
Copy link
Member Author

dagood commented Jan 11, 2019

Correct, not needed for preview2.

@mmitche mmitche changed the title [Darc] Darc should be buildable from source [darc/maestro++] Darc should be buildable from source Jul 30, 2019
@riarenas
Copy link
Member

riarenas commented Sep 1, 2020

@dagood is this required for .net 5 rtm?

@dagood
Copy link
Member Author

dagood commented Sep 2, 2020

is this required for .net 5 rtm?

Nope.

(I think we (source-build) should actually consider extracting the subset of darc clone functionality we actually need and put it in a dotnet/arcade build task, which would end up resolving this. More info at dotnet/source-build#1571.)

@riarenas
Copy link
Member

riarenas commented Sep 2, 2020

Thanks @dagood. The idea seems interesting. Let me know what you decide to see if we can close this or if we should re-examine for future releases.

@dagood
Copy link
Member Author

dagood commented Sep 2, 2020

Is "darc" necessary to do anything more than fetching the correct commits/source blobs?

Yes, when I mentioned "I'm pretty sure we'll be using darc to flow dependencies between repos." I'm referring to this:

  • Darc is meant to be the only way developers and other tools like Maestro++ interact and alter version/dependency files as well as bootstrapping files and scripts in arcade participating repos.
  • Darc's operations range from altering version/dependency files to creating PRs in specified repos.

Currently we use the Repo API (specifically Package Version Props) to do this, and from the above it sounds like using Package Version Props won't be supported. (And we might still need Darc for a standard way to flow zips through?)

I noticed this when reading this thread back and I think I should give an update. It turns out that this didn't happen: we kept on using Package Version Props, and that infra has been maintained. We only use darc clone when creating a source tarball, not when building it, so building darc from source is not strictly necessary to build .NET from source without prebuilts. But I think this is an ugly technicality. Having to use a proprietary tool to create a usable source tarball from a Git tag isn't in the spirit of building from source, IMO.

Let me know what you decide to see if we can close this or if we should re-examine for future releases.

I think we can close it when we no longer depend on the prebuilt darc, whether that's via a build task or the original plan. I think it's worth keeping it open until then to keep track of this.

@dkurepa dkurepa transferred this issue from dotnet/arcade Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants