Skip to content

Commit 7efadd4

Browse files
authored
Merge branch 'main' into add-llmstxt-template
2 parents 9abc8cd + 7c32cc6 commit 7efadd4

File tree

126 files changed

+2515
-1260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+2515
-1260
lines changed

.github/updatecli/updatecli.d/versions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ sources:
5858
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
5959
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
6060
versionfilter:
61-
kind: regex
62-
pattern: "v9.(\\d*).(\\d*)$"
61+
kind: semver
62+
pattern: "^9.0.0"
6363

6464
latest-edot-dotnet-version:
6565
name: Get latest release version for the elastic-otel-dotnet
@@ -312,7 +312,7 @@ targets:
312312
kind: yaml
313313
spec:
314314
file: config/versions.yml
315-
key: versioning_systems.edot_collector.current
315+
key: $.versioning_systems.edot_collector.current
316316

317317
update-docs-docset-dotnet:
318318
name: 'Update config/versions.yml edot-dotnet {{ source "latest-edot-dotnet-version" }}'

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@
9797
</PackageVersion>
9898
<PackageVersion Include="xunit.v3" Version="2.0.2" />
9999
</ItemGroup>
100-
</Project>
100+
</Project>

aspire/AppHost.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ async Task BuildAspireHost(bool startElasticsearch, bool assumeCloned, bool skip
4040
var elasticsearchUrl = builder.AddParameter("DocumentationElasticUrl", secret: true);
4141
var elasticsearchApiKey = builder.AddParameter("DocumentationElasticApiKey", secret: true);
4242

43-
var cloneAll = builder.AddProject<Projects.docs_assembler>(AssemblerClone);
43+
var cloneAll = builder.AddProject<Projects.docs_builder>(AssemblerClone);
4444
string[] cloneArgs = assumeCloned ? ["--assume-cloned"] : [];
45-
cloneAll = cloneAll.WithArgs(["repo", "clone-all", .. globalArguments, .. cloneArgs]);
45+
cloneAll = cloneAll.WithArgs(["assembler", "clone", .. globalArguments, .. cloneArgs]);
4646

47-
var buildAll = builder.AddProject<Projects.docs_assembler>(AssemblerBuild)
48-
.WithArgs(["repo", "build-all", .. globalArguments])
47+
var buildAll = builder.AddProject<Projects.docs_builder>(AssemblerBuild)
48+
.WithArgs(["assembler", "build", .. globalArguments])
4949
.WaitForCompletion(cloneAll)
5050
.WithParentRelationship(cloneAll);
5151

@@ -74,8 +74,8 @@ async Task BuildAspireHost(bool startElasticsearch, bool assumeCloned, bool skip
7474
.WithEnvironment("DOCUMENTATION_ELASTIC_URL", elasticsearchUrl)
7575
.WithEnvironment("DOCUMENTATION_ELASTIC_APIKEY", elasticsearchApiKey);
7676

77-
var indexElasticsearch = builder.AddProject<Projects.docs_assembler>(ElasticsearchIndexerPlain)
78-
.WithArgs(["repo", "build-all", "--exporters", "elasticsearch", .. globalArguments])
77+
var indexElasticsearch = builder.AddProject<Projects.docs_builder>(ElasticsearchIndexerPlain)
78+
.WithArgs(["assembler", "build", "--exporters", "elasticsearch", .. globalArguments])
7979
.WithExplicitStart()
8080
.WaitForCompletion(cloneAll);
8181
indexElasticsearch = startElasticsearch
@@ -91,8 +91,8 @@ async Task BuildAspireHost(bool startElasticsearch, bool assumeCloned, bool skip
9191
.WithEnvironment("DOCUMENTATION_ELASTIC_APIKEY", elasticsearchApiKey)
9292
.WithParentRelationship(elasticsearchRemote);
9393

94-
var indexElasticsearchSemantic = builder.AddProject<Projects.docs_assembler>(ElasticsearchIndexerSemantic)
95-
.WithArgs(["repo", "build-all", "--exporters", "semantic", .. globalArguments])
94+
var indexElasticsearchSemantic = builder.AddProject<Projects.docs_builder>(ElasticsearchIndexerSemantic)
95+
.WithArgs(["assembler", "build", "--exporters", "semantic", .. globalArguments])
9696
.WithEnvironment("DOCUMENTATION_ELASTIC_URL", elasticsearchLocal.GetEndpoint("http"))
9797
.WithEnvironment(context => context.EnvironmentVariables["DOCUMENTATION_ELASTIC_PASSWORD"] = elasticsearchLocal.Resource.PasswordParameter)
9898
.WithExplicitStart()
@@ -114,7 +114,7 @@ async Task BuildAspireHost(bool startElasticsearch, bool assumeCloned, bool skip
114114
.WithEnvironment("LLM_GATEWAY_FUNCTION_URL", llmUrl)
115115
.WithEnvironment("LLM_GATEWAY_SERVICE_ACCOUNT_KEY_PATH", llmServiceAccountPath)
116116
.WithHttpEndpoint(port: 4000, isProxied: false)
117-
.WithArgs(["serve-static", .. globalArguments])
117+
.WithArgs(["assembler", "serve", .. globalArguments])
118118
.WithHttpHealthCheck("/", 200)
119119
.WaitForCompletion(buildAll)
120120
.WithParentRelationship(cloneAll);

config/versions.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ versioning_systems:
4747
current: 2.7.1
4848
apm_agent_java:
4949
base: 1.0
50-
current: 1.55.0
50+
current: 1.55.1
5151
apm_agent_node:
5252
base: 4.0
5353
current: 4.13.0
@@ -67,7 +67,7 @@ versioning_systems:
6767
# EDOTs
6868
edot_collector:
6969
base: 9.0
70-
current: 9.1.3
70+
current: 9.1.4
7171
edot_ios:
7272
base: 1.0
7373
current: 1.3.0
@@ -82,13 +82,16 @@ versioning_systems:
8282
current: 1.5.0
8383
edot_node:
8484
base: 1.0
85-
current: 1.3.0
85+
current: 1.4.0
8686
edot_php:
8787
base: 1.0
8888
current: 1.1.1
8989
edot_python:
9090
base: 1.0
91-
current: 1.7.0
91+
current: 1.8.0
9292
edot_cf_aws:
9393
base: 0.1
9494
current: 0.2.0
95+
edot_cf_azure:
96+
base: 0.1
97+
current: 0.6.0

docs-builder.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "diff-validate", "diff-valid
147147
actions\diff-validate\action.yml = actions\diff-validate\action.yml
148148
EndProjectSection
149149
EndProject
150+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "services", "services", "{7AACA67B-3C56-4C7C-9891-558589FC52DB}"
151+
EndProject
152+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Assembler", "src\services\Elastic.Documentation.Assembler\Elastic.Documentation.Assembler.csproj", "{094433A4-504F-4E12-959F-CCB1965C1C9A}"
153+
EndProject
154+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Services", "src\services\Elastic.Documentation.Services\Elastic.Documentation.Services.csproj", "{E6EA955D-D0A7-4749-9586-0F7256EF5C5E}"
155+
EndProject
156+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Links", "src\Elastic.Documentation.Links\Elastic.Documentation.Links.csproj", "{153FC4AD-F5B0-4100-990E-0987C86DBF01}"
157+
EndProject
158+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Isolated", "src\services\Elastic.Documentation.Isolated\Elastic.Documentation.Isolated.csproj", "{AABD3EF7-8C86-4981-B1D2-B1F786F33069}"
159+
EndProject
150160
Global
151161
GlobalSection(SolutionConfigurationPlatforms) = preSolution
152162
Debug|Any CPU = Debug|Any CPU
@@ -256,6 +266,22 @@ Global
256266
{C6A121C5-DEB1-4FCE-9140-AF144EA98EEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
257267
{C6A121C5-DEB1-4FCE-9140-AF144EA98EEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
258268
{C6A121C5-DEB1-4FCE-9140-AF144EA98EEE}.Release|Any CPU.Build.0 = Release|Any CPU
269+
{094433A4-504F-4E12-959F-CCB1965C1C9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
270+
{094433A4-504F-4E12-959F-CCB1965C1C9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
271+
{094433A4-504F-4E12-959F-CCB1965C1C9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
272+
{094433A4-504F-4E12-959F-CCB1965C1C9A}.Release|Any CPU.Build.0 = Release|Any CPU
273+
{E6EA955D-D0A7-4749-9586-0F7256EF5C5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
274+
{E6EA955D-D0A7-4749-9586-0F7256EF5C5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
275+
{E6EA955D-D0A7-4749-9586-0F7256EF5C5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
276+
{E6EA955D-D0A7-4749-9586-0F7256EF5C5E}.Release|Any CPU.Build.0 = Release|Any CPU
277+
{153FC4AD-F5B0-4100-990E-0987C86DBF01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
278+
{153FC4AD-F5B0-4100-990E-0987C86DBF01}.Debug|Any CPU.Build.0 = Debug|Any CPU
279+
{153FC4AD-F5B0-4100-990E-0987C86DBF01}.Release|Any CPU.ActiveCfg = Release|Any CPU
280+
{153FC4AD-F5B0-4100-990E-0987C86DBF01}.Release|Any CPU.Build.0 = Release|Any CPU
281+
{AABD3EF7-8C86-4981-B1D2-B1F786F33069}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
282+
{AABD3EF7-8C86-4981-B1D2-B1F786F33069}.Debug|Any CPU.Build.0 = Debug|Any CPU
283+
{AABD3EF7-8C86-4981-B1D2-B1F786F33069}.Release|Any CPU.ActiveCfg = Release|Any CPU
284+
{AABD3EF7-8C86-4981-B1D2-B1F786F33069}.Release|Any CPU.Build.0 = Release|Any CPU
259285
EndGlobalSection
260286
GlobalSection(NestedProjects) = preSolution
261287
{4D198E25-C211-41DC-9E84-B15E89BD7048} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
@@ -293,5 +319,10 @@ Global
293319
{AE3FC78E-167F-4B6E-88EC-84743EB748B7} = {B042CC78-5060-4091-B95A-79C71BA3908A}
294320
{C6A121C5-DEB1-4FCE-9140-AF144EA98EEE} = {B042CC78-5060-4091-B95A-79C71BA3908A}
295321
{E7C7A02B-9AB4-455A-9A64-3D326ED1A95A} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
322+
{7AACA67B-3C56-4C7C-9891-558589FC52DB} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
323+
{094433A4-504F-4E12-959F-CCB1965C1C9A} = {7AACA67B-3C56-4C7C-9891-558589FC52DB}
324+
{E6EA955D-D0A7-4749-9586-0F7256EF5C5E} = {7AACA67B-3C56-4C7C-9891-558589FC52DB}
325+
{153FC4AD-F5B0-4100-990E-0987C86DBF01} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
326+
{AABD3EF7-8C86-4981-B1D2-B1F786F33069} = {7AACA67B-3C56-4C7C-9891-558589FC52DB}
296327
EndGlobalSection
297328
EndGlobal

docs/_snippets/applies_to-key.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* `ecctl`: Applies to [Elastic cloud control](https://www.elastic.co/docs/reference/ecctl) (ECCTL).
2424
* `edot_android`: Applies to the [Elastic Distribution of OpenTelemetry Android](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/android/) (EDOT Android).
2525
* `edot_cf_aws`: Applies to the [Elastic Distribution of OpenTelemetry Cloud Forwarder](https://www.elastic.co/docs/reference/opentelemetry/edot-cloud-forwarder/) (EDOT Cloud Forwarder).
26+
* `edot_cf_azure`: Applies to the [Elastic Distribution of OpenTelemetry Cloud Forwarder](https://www.elastic.co/docs/reference/opentelemetry/edot-cloud-forwarder/) (EDOT Cloud Forwarder).
2627
* `edot_collector`: Applies to the [Elastic Distribution of OpenTelemetry Collector](https://www.elastic.co/docs/reference/opentelemetry/edot-collector/) (EDOT Collector).
2728
* `edot_dotnet`: Applies to the [Elastic Distribution of OpenTelemetry .NET](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/dotnet/) (EDOT .NET).
2829
* `edot_ios`: Applies to the [Elastic Distribution of OpenTelemetry iOS](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/ios/) (EDOT iOS).

docs/syntax/applies.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ applies_to:
223223
edot_php:
224224
edot_python:
225225
edot_cf_aws:
226+
edot_cf_azure:
226227
---
227228
```
228229
:::::

docs/syntax/version-variables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ This is dictated by the [`versions.yml`](https://github.com/elastic/docs-builder
104104
* `edot_php`
105105
* `edot_python`
106106
* `edot_cf_aws`
107+
* `edot_cf_azure`
107108
* `edot_collector`
108109

109110
The following are available but should not be used. These map to serverless projects and have a fixed high version number.

src/tooling/docs-assembler/Navigation/GlobalNavigationFile.cs renamed to src/Elastic.Documentation.Configuration/Navigation/GlobalNavigationFile.cs

Lines changed: 73 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,75 @@
22
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information
44

5+
using System.Collections.Frozen;
56
using System.Collections.Immutable;
67
using System.IO.Abstractions;
7-
using Elastic.Documentation;
8-
using Elastic.Documentation.Configuration;
98
using Elastic.Documentation.Configuration.Assembler;
9+
using Elastic.Documentation.Configuration.Builder;
1010
using Elastic.Documentation.Configuration.TableOfContents;
11+
using Elastic.Documentation.Diagnostics;
1112
using Elastic.Documentation.Navigation;
1213
using YamlDotNet.RepresentationModel;
1314

14-
namespace Documentation.Assembler.Navigation;
15+
namespace Elastic.Documentation.Configuration.Navigation;
16+
17+
public record NavigationTocMapping
18+
{
19+
public required Uri Source { get; init; }
20+
public required string SourcePathPrefix { get; init; }
21+
public required Uri TopLevelSource { get; init; }
22+
public required Uri ParentSource { get; init; }
23+
}
24+
25+
public record TocConfigurationMapping
26+
{
27+
public required NavigationTocMapping TopLevel { get; init; }
28+
public required ConfigurationFile RepositoryConfigurationFile { get; init; }
29+
public required TableOfContentsConfiguration TableOfContentsConfiguration { get; init; }
30+
}
1531

1632
public record GlobalNavigationFile : ITableOfContentsScope
1733
{
18-
private readonly AssembleContext _context;
19-
private readonly AssembleSources _assembleSources;
34+
//private readonly AssembleContext _context;
35+
private readonly IDiagnosticsCollector _collector;
36+
private readonly ConfigurationFileProvider _configurationFileProvider;
37+
private readonly AssemblyConfiguration _configuration;
38+
39+
private readonly FrozenDictionary<Uri, TocConfigurationMapping> _tocConfigurationMappings;
40+
//private readonly AssembleSources _assembleSources;
2041

2142
public IReadOnlyCollection<TocReference> TableOfContents { get; }
2243
public IReadOnlyCollection<TocReference> Phantoms { get; }
2344

2445
public IDirectoryInfo ScopeDirectory { get; }
2546

26-
public GlobalNavigationFile(AssembleContext context, AssembleSources assembleSources)
47+
public GlobalNavigationFile(
48+
IDiagnosticsCollector collector,
49+
ConfigurationFileProvider configurationFileProvider,
50+
AssemblyConfiguration configuration,
51+
FrozenDictionary<Uri, TocConfigurationMapping> tocConfigurationMappings
52+
)
2753
{
28-
_context = context;
29-
_assembleSources = assembleSources;
30-
NavigationFile = context.ConfigurationFileProvider.CreateNavigationFile(context.Configuration);
54+
//_context = context;
55+
_collector = collector;
56+
_configurationFileProvider = configurationFileProvider;
57+
_configuration = configuration;
58+
_tocConfigurationMappings = tocConfigurationMappings;
59+
NavigationFile = configurationFileProvider.CreateNavigationFile(configuration);
3160
TableOfContents = Deserialize("toc");
3261
Phantoms = Deserialize("phantoms");
3362
ScopeDirectory = NavigationFile.Directory!;
3463
}
3564

3665
private IFileInfo NavigationFile { get; }
3766

38-
public static bool ValidatePathPrefixes(AssembleContext context)
67+
public static bool ValidatePathPrefixes(
68+
IDiagnosticsCollector collector,
69+
ConfigurationFileProvider configurationFileProvider,
70+
AssemblyConfiguration configuration
71+
)
3972
{
40-
var fileProvider = context.ConfigurationFileProvider;
41-
var sourcePathPrefixes = GetAllPathPrefixes(context);
73+
var sourcePathPrefixes = GetAllPathPrefixes(collector, configurationFileProvider, configuration);
4274
var pathPrefixSet = new HashSet<string>();
4375
var valid = true;
4476
foreach (var pathPrefix in sourcePathPrefixes)
@@ -47,23 +79,36 @@ public static bool ValidatePathPrefixes(AssembleContext context)
4779
if (pathPrefixSet.Add(prefix))
4880
continue;
4981
var duplicateOf = sourcePathPrefixes.First(p => p.Host == pathPrefix.Host && p.AbsolutePath == pathPrefix.AbsolutePath);
50-
context.Collector.EmitError(fileProvider.NavigationFile, $"Duplicate path prefix: {pathPrefix} duplicate: {duplicateOf}");
82+
collector.EmitError(configurationFileProvider.NavigationFile, $"Duplicate path prefix: {pathPrefix} duplicate: {duplicateOf}");
5183
valid = false;
5284
}
5385
return valid;
5486
}
5587

5688

57-
public static ImmutableHashSet<Uri> GetAllPathPrefixes(AssembleContext context) =>
58-
GetSourceUris("toc", context);
59-
60-
public static ImmutableHashSet<Uri> GetPhantomPrefixes(AssembleContext context) =>
61-
GetSourceUris("phantoms", context);
62-
63-
private static ImmutableHashSet<Uri> GetSourceUris(string key, AssembleContext context)
89+
public static ImmutableHashSet<Uri> GetAllPathPrefixes(
90+
IDiagnosticsCollector collector,
91+
ConfigurationFileProvider configurationFileProvider,
92+
AssemblyConfiguration configuration
93+
) =>
94+
GetSourceUris("toc", collector, configurationFileProvider, configuration);
95+
96+
public static ImmutableHashSet<Uri> GetPhantomPrefixes(
97+
IDiagnosticsCollector collector,
98+
ConfigurationFileProvider configurationFileProvider,
99+
AssemblyConfiguration configuration
100+
) =>
101+
GetSourceUris("phantoms", collector, configurationFileProvider, configuration);
102+
103+
private static ImmutableHashSet<Uri> GetSourceUris(
104+
string key,
105+
IDiagnosticsCollector collector,
106+
ConfigurationFileProvider configurationFileProvider,
107+
AssemblyConfiguration configuration
108+
)
64109
{
65-
var navigationFile = context.ConfigurationFileProvider.CreateNavigationFile(context.Configuration);
66-
var reader = new YamlStreamReader(navigationFile, context.Collector);
110+
var navigationFile = configurationFileProvider.CreateNavigationFile(configuration);
111+
var reader = new YamlStreamReader(navigationFile, collector);
67112
var set = new HashSet<Uri>();
68113
foreach (var entry in reader.Read())
69114
{
@@ -145,15 +190,15 @@ static void ReadPathPrefixes(YamlStreamReader reader, KeyValuePair<YamlNode, Yam
145190
}
146191
}
147192
public void EmitWarning(string message) =>
148-
_context.Collector.EmitWarning(NavigationFile, message);
193+
_collector.EmitWarning(NavigationFile, message);
149194

150195
public void EmitError(string message) =>
151-
_context.Collector.EmitError(NavigationFile, message);
196+
_collector.EmitError(NavigationFile, message);
152197

153198
private IReadOnlyCollection<TocReference> Deserialize(string key)
154199
{
155-
var navigationFile = _context.ConfigurationFileProvider.CreateNavigationFile(_context.Configuration);
156-
var reader = new YamlStreamReader(navigationFile, _context.Collector);
200+
var navigationFile = _configurationFileProvider.CreateNavigationFile(_configuration);
201+
var reader = new YamlStreamReader(navigationFile, _collector);
157202
try
158203
{
159204
foreach (var entry in reader.Read())
@@ -232,7 +277,7 @@ private IReadOnlyCollection<TocReference> ReadChildren(string key, YamlStreamRea
232277
return null;
233278

234279

235-
if (!_assembleSources.TocConfigurationMapping.TryGetValue(sourceUri, out var mapping))
280+
if (!_tocConfigurationMappings.TryGetValue(sourceUri, out var mapping))
236281
{
237282
reader.EmitError($"Toc entry '{sourceUri}' is could not be located", tocEntry);
238283
return null;
@@ -270,7 +315,7 @@ private IReadOnlyCollection<TocReference> ReadChildren(string key, YamlStreamRea
270315
if (source is null)
271316
return pathPrefix;
272317

273-
source = source.EndsWith("://") ? source : source.TrimEnd('/') + "/";
318+
source = source.EndsWith("://", StringComparison.OrdinalIgnoreCase) ? source : source.TrimEnd('/') + "/";
274319
if (!Uri.TryCreate(source, UriKind.Absolute, out sourceUri))
275320
{
276321
reader.EmitError($"Source toc entry is not a valid uri: {source}", tocEntry);

0 commit comments

Comments
 (0)