-
Notifications
You must be signed in to change notification settings - Fork 43
Revert "feat(assembler): on-demand assembler serve with live reload and improved frontend DX" #3437
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,11 +16,9 @@ public class DocSetConfigurationCrossLinkFetcher( | |
| ConfigurationFile configuration, | ||
| ILinkIndexReader? linkIndexProvider = null, | ||
| ILinkIndexReader? codexLinkIndexReader = null) | ||
| : CrossLinkFetcher(logFactory, linkIndexProvider ?? Aws3LinkIndexReader.CreateAnonymous(), ownsReader: linkIndexProvider is null) | ||
| : CrossLinkFetcher(logFactory, linkIndexProvider ?? Aws3LinkIndexReader.CreateAnonymous()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reuse a single public link-index reader. Line 19 and Line 34 each call 🔧 One way to keep a single reader public class DocSetConfigurationCrossLinkFetcher(
ILoggerFactory logFactory,
ConfigurationFile configuration,
ILinkIndexReader? linkIndexProvider = null,
ILinkIndexReader? codexLinkIndexReader = null)
- : CrossLinkFetcher(logFactory, linkIndexProvider ?? Aws3LinkIndexReader.CreateAnonymous())
+ : CrossLinkFetcher(logFactory, linkIndexProvider ??= Aws3LinkIndexReader.CreateAnonymous())
{
+ private readonly ILinkIndexReader _publicReader = linkIndexProvider;
private readonly ILogger _logger = logFactory.CreateLogger(nameof(DocSetConfigurationCrossLinkFetcher));
private readonly ILinkIndexReader? _codexReader = codexLinkIndexReader;
@@
- var publicReader = linkIndexProvider ?? Aws3LinkIndexReader.CreateAnonymous();
+ var publicReader = _publicReader;Also applies to: 34-35 🤖 Prompt for AI Agents |
||
| { | ||
| private readonly ILogger _logger = logFactory.CreateLogger(nameof(DocSetConfigurationCrossLinkFetcher)); | ||
| // _codexReader is injected by the caller who retains ownership and is responsible for disposal. | ||
| // ReloadableGeneratorState, the primary caller, disposes it directly in its own Dispose(). | ||
| private readonly ILinkIndexReader? _codexReader = codexLinkIndexReader; | ||
|
|
||
| public override async Task<FetchedCrossLinks> FetchCrossLinks(Cancel ctx) | ||
|
|
@@ -33,7 +31,7 @@ public override async Task<FetchedCrossLinks> FetchCrossLinks(Cancel ctx) | |
| var codexRepositories = new HashSet<string>(); | ||
| var declaredRepositories = new HashSet<string>(); | ||
|
|
||
| var publicReader = LinkIndexProvider; | ||
| var publicReader = linkIndexProvider ?? Aws3LinkIndexReader.CreateAnonymous(); | ||
| var useDualRegistry = configuration.Registry != DocSetRegistry.Public && _codexReader is not null; | ||
|
|
||
| // Fetch each registry once up front so per-repository lookups don't trigger N S3 round-trips. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 167
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 2558
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 605
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 668
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 984
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 4181
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 9552
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 367
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 39105
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 8200
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 7006
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 378
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 1863
🏁 Script executed:
Repository: elastic/docs-builder
Length of output: 12591
Do not dispose the injected
ILoggerFactoryinCrossLinkFetcherCrossLinkFetcherimplementsIDisposableand callslogFactory.Dispose()inDispose()(around lines 207-210), butILoggerFactoryis injected and not owned by this class—disposing it can break logging for other components sharing the same factory. Remove the baseDispose()/IDisposable(or at least stop disposinglogFactory).🔧 Minimal fix
🤖 Prompt for AI Agents