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

[Build System]: Frequent DocFx timeouts #6666

Closed
Aaronontheweb opened this issue Apr 24, 2023 · 0 comments · Fixed by #6738
Closed

[Build System]: Frequent DocFx timeouts #6666

Aaronontheweb opened this issue Apr 24, 2023 · 0 comments · Fixed by #6738

Comments

@Aaronontheweb
Copy link
Member

Version Information
Version of Akka.NET? latest dev branch

Describe the bug

Our DocFx build stage repeatedly times out and has frequently done so over the past several months:

[23-04-24 06:24:39.234]Warning:[MetadataCommand.ExtractMetadata]Timeout (1000ms) exceeded. Killing process git.
	1 Warning(s)
	0 Error(s)

It's this stage of our build pipeline:

akka.net/build.fsx

Lines 477 to 506 in fd4860b

Target "DocFx" (fun _ ->
// build the projects with samples
let docsTestsProject = "./src/core/Akka.Docs.Tests/Akka.Docs.Tests.csproj"
DotNetCli.Restore (fun p -> { p with Project = docsTestsProject })
DotNetCli.Build (fun p -> { p with Project = docsTestsProject; Configuration = configuration })
let docsTutorialsProject = "./src/core/Akka.Docs.Tutorials/Akka.Docs.Tutorials.csproj"
DotNetCli.Restore (fun p -> { p with Project = docsTutorialsProject })
DotNetCli.Build (fun p -> { p with Project = docsTutorialsProject; Configuration = configuration })
// install MSDN references
NugetInstall (fun p ->
{ p with
ExcludeVersion = true
Version = "0.1.0-alpha-1611021200"
OutputDirectory = currentDirectory @@ "tools" }) "msdn.4.5.2"
let docsPath = FullName "./docs"
let docFxPath = FullName(findToolInSubPath "docfx.exe" "tools/docfx.console/tools")
let args = StringBuilder()
|> append (docsPath @@ "docfx.json" )
|> append ("--warningsAsErrors")
|> toText
let result = ExecProcess(fun info ->
info.FileName <- docFxPath
info.WorkingDirectory <- (Path.GetDirectoryName (FullName docFxPath))
info.Arguments <- args) (System.TimeSpan.FromMinutes 45.0) (* Reasonably long-running task. *)
if result <> 0 then failwithf "DocFX failed. %s %s" docFxPath args
)

The treatWarningsAsErrors flag is what causes this to fail the build pipeline - we rely on that flag in order to make sure breakage doesn't happen inside the documentation website itself (i.e. broken links.)

Expected behavior

Unless there's a markdown / linking / code reference error, the website build successfully each and every time.

Actual behavior

Frequent, but inconsistent git timeouts during the DocFx build stage.

Additional context

This could be a function of how big the repository has become and we just need to expand the DocFx timeout for this stage - to something higher than 1s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant