Skip to content

Commit d333221

Browse files
authored
Merge branch 'main' into feature/search-enhancements-again
2 parents e4e01b9 + 99f92e5 commit d333221

File tree

10 files changed

+60
-12
lines changed

10 files changed

+60
-12
lines changed

config/assembler.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ environments:
3030
uri: http://localhost:4000
3131
content_source: current
3232
path_prefix: docs
33+
feature_flags:
34+
SEARCH_OR_ASK_AI: true
3335

3436
shared_configuration:
3537
stack: &stack
@@ -76,7 +78,7 @@ references:
7678
apm-aws-lambda:
7779
apm-k8s-attacher:
7880
ecs:
79-
current: 9.0 # releases do not always align with the Stack version
81+
current: 9.1 # releases do not always align with the Stack version
8082
next: main
8183
ecs-dotnet:
8284
ecs-logging-go-logrus:

config/versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ versioning_systems:
33
# Updates for Stack versions are manual
44
stack: &stack
55
base: 9.0
6-
current: 9.1.1
6+
current: 9.1.2
77

88
# Using an unlikely high version
99
# So that our logic that would display "planned" doesn't trigger

src/Elastic.Documentation.Site/Layout/_Footer.cshtml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@
2727
© @(DateTime.Today.Year) Elasticsearch B.V. All Rights Reserved.
2828
</p>
2929
</div>
30-
<p class="mt-4">
31-
Elasticsearch is a trademark of Elasticsearch B.V., registered in the U.S. and in other countries. Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.
32-
</p>
30+
<div class="mt-4">
31+
<p>
32+
This content is available in different formats for convenience only. All original licensing terms apply.
33+
</p>
34+
<p class="mt-4">
35+
Elasticsearch is a trademark of Elasticsearch B.V., registered in the U.S. and in other countries. Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.
36+
</p>
37+
</div>
3338
</div>
3439
</div>
3540
</footer>
18.7 KB
Loading

src/Elastic.Markdown/Layout/_LandingPage.cshtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
}
3535
</div>
3636
<div class="flex justify-center items-center">
37-
<img src="@Model.Static("web-documentation-hero-illustration.svg")" alt="" width="400">
37+
<a href="https://www.elastic.co/events/elasticon" target="_blank">
38+
<img src="@Model.Static("elasticon-2025-docs-page-banner-v3.png")" alt="Register now for ElasticON" width="1200">
39+
</a>
3840
</div>
3941
</div>
4042
</section>

src/tooling/docs-builder/Cli/DiffCommands.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ public async Task<int> ValidateRedirects([Argument] string? path = null, Cancel
4545
var sourceFile = buildContext.ConfigurationPath;
4646
var redirectFileName = sourceFile.Name.StartsWith('_') ? "_redirects.yml" : "redirects.yml";
4747
var redirectFileInfo = sourceFile.FileSystem.FileInfo.New(Path.Combine(sourceFile.Directory!.FullName, redirectFileName));
48+
if (!redirectFileInfo.Exists)
49+
{
50+
await collector.StopAsync(ctx);
51+
return 0;
52+
}
4853

4954
var redirectFileParser = new RedirectFile(redirectFileInfo, buildContext);
5055
var redirects = redirectFileParser.Redirects;

src/tooling/docs-builder/Http/DocumentationWebHost.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ private void SetUpRoutes()
144144
_ = _webApplication.MapGet("/api/{**slug}", (string slug, ReloadableGeneratorState holder, Cancel ctx) =>
145145
ServeApiFile(holder, slug, ctx));
146146

147-
148147
var apiV1 = _webApplication.MapGroup("/docs/_api/v1");
149148
apiV1.MapElasticDocsApiEndpoints();
150149

src/tooling/docs-builder/Http/StaticWebHost.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
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 Elastic.Documentation.Api.Infrastructure;
56
using Elastic.Documentation.Configuration;
67
using Elastic.Documentation.ServiceDefaults;
7-
using Elastic.Documentation.Tooling;
88
using Microsoft.AspNetCore.Builder;
99
using Microsoft.AspNetCore.Hosting;
1010
using Microsoft.AspNetCore.Http;
@@ -28,6 +28,8 @@ public StaticWebHost(int port)
2828

2929
_ = builder.AddDocumentationServiceDefaults();
3030

31+
builder.Services.AddElasticDocsApiUsecases("dev");
32+
3133
_ = builder.Logging
3234
.AddFilter("Microsoft.AspNetCore.Hosting.Diagnostics", LogLevel.Error)
3335
.AddFilter("Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware", LogLevel.Error)
@@ -51,6 +53,10 @@ private void SetUpRoutes()
5153
_ = WebApplication.MapGet("/", (Cancel _) => Results.Redirect("docs"));
5254

5355
_ = WebApplication.MapGet("{**slug}", ServeDocumentationFile);
56+
57+
var apiV1 = WebApplication.MapGroup("/docs/_api/v1");
58+
apiV1.MapElasticDocsApiEndpoints();
59+
5460
}
5561

5662
private async Task<IResult> ServeDocumentationFile(string slug, Cancel _)

tests-integration/Elastic.Assembler.IntegrationTests/AssembleFixture.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public async ValueTask InitializeAsync()
3434
_ = builder.Services.AddElasticDocumentationLogging(LogLevel.Information);
3535
_ = builder.Services.AddLogging(c => c.AddXUnit());
3636
_ = builder.Services.AddLogging(c => c.AddInMemory());
37+
// TODO expose this as secrets for now not needed integration tests
38+
_ = builder.AddParameter("LlmGatewayUrl", "");
39+
_ = builder.AddParameter("LlmGatewayServiceAccountPath", "");
3740
DistributedApplication = await builder.BuildAsync();
3841
InMemoryLogger = DistributedApplication.Services.GetService<InMemoryLogger>()!;
3942
await DistributedApplication.StartAsync();

tests-integration/Elastic.Documentation.Aspire/AppHost.cs

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,39 @@
1919

2020
var builder = DistributedApplication.CreateBuilder(args);
2121

22+
// Add a secret parameter named "secret"
23+
var llmUrl = builder.AddParameter("LlmGatewayUrl", secret: true);
24+
var llmServiceAccountPath = builder.AddParameter("LlmGatewayServiceAccountPath", secret: true);
25+
2226
var cloneAll = builder.AddProject<Projects.docs_assembler>("DocsAssemblerCloneAll").WithArgs(["repo", "clone-all", .. globalArguments]);
2327

2428
var buildAll = builder.AddProject<Projects.docs_assembler>("DocsAssemblerBuildAll").WithArgs(["repo", "build-all", .. globalArguments])
2529
.WaitForCompletion(cloneAll);
2630

27-
var elasticsearch = builder.AddElasticsearch("elasticsearch");
31+
var elasticsearch = builder.AddElasticsearch("elasticsearch")
32+
.WithEnvironment("LICENSE", "trial");
2833

2934
var api = builder.AddProject<Projects.Elastic_Documentation_Api_Lambda>("ApiLambda").WithArgs(globalArguments)
35+
.WithEnvironment("ENVIRONMENT", "dev")
36+
.WithEnvironment("LLM_GATEWAY_FUNCTION_URL", llmUrl)
37+
.WithEnvironment("LLM_GATEWAY_SERVICE_ACCOUNT_KEY_PATH", llmServiceAccountPath)
3038
.WaitFor(elasticsearch)
3139
.WithReference(elasticsearch);
3240

3341
var indexElasticsearch = builder.AddProject<Projects.docs_assembler>("DocsAssemblerElasticsearch")
34-
.WithArgs(["repo", "build-all", "--exporters", "html,elasticsearch", .. globalArguments])
42+
.WithArgs(["repo", "build-all", "--exporters", "elasticsearch", .. globalArguments])
43+
.WithEnvironment("DOCUMENTATION_ELASTIC_URL", elasticsearch.GetEndpoint("http"))
44+
.WithEnvironment(context =>
45+
{
46+
context.EnvironmentVariables["DOCUMENTATION_ELASTIC_PASSWORD"] = elasticsearch.Resource.PasswordParameter;
47+
})
48+
.WithReference(elasticsearch)
49+
.WithExplicitStart()
50+
.WaitFor(elasticsearch)
51+
.WaitForCompletion(cloneAll);
52+
53+
var indexElasticsearchSemantic = builder.AddProject<Projects.docs_assembler>("DocsAssemblerElasticsearchSemantic")
54+
.WithArgs(["repo", "build-all", "--exporters", "semantic", .. globalArguments])
3555
.WithEnvironment("DOCUMENTATION_ELASTIC_URL", elasticsearch.GetEndpoint("http"))
3656
.WithEnvironment(context =>
3757
{
@@ -44,11 +64,17 @@
4464

4565
var serveStatic = builder.AddProject<Projects.docs_builder>("DocsBuilderServeStatic")
4666
.WithReference(elasticsearch)
67+
.WithEnvironment("LLM_GATEWAY_FUNCTION_URL", llmUrl)
68+
.WithEnvironment("LLM_GATEWAY_SERVICE_ACCOUNT_KEY_PATH", llmServiceAccountPath)
69+
.WithEnvironment("DOCUMENTATION_ELASTIC_URL", elasticsearch.GetEndpoint("http"))
70+
.WithEnvironment(context =>
71+
{
72+
context.EnvironmentVariables["DOCUMENTATION_ELASTIC_PASSWORD"] = elasticsearch.Resource.PasswordParameter;
73+
})
4774
.WithHttpEndpoint(port: 4000, isProxied: false)
4875
.WithArgs(["serve-static", .. globalArguments])
4976
.WithHttpHealthCheck("/", 200)
77+
.WaitFor(elasticsearch)
5078
.WaitForCompletion(buildAll);
5179

52-
53-
5480
builder.Build().Run();

0 commit comments

Comments
 (0)