Skip to content

Commit ca8bc40

Browse files
committed
Merge branch 'main' into crosslinks-in-toc-take-three
2 parents 081d4c4 + 674cc87 commit ca8bc40

File tree

167 files changed

+3335
-1682
lines changed

Some content is hidden

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

167 files changed

+3335
-1682
lines changed

.github/actions/aws-auth/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ runs:
3737
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
3838
f.write(f"result=arn:aws:iam::{os.environ["AWS_ACCOUNT_ID"]}:role/{prefix}{hash}")
3939
- name: Configure AWS Credentials
40-
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
40+
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
4141
with:
4242
role-to-assume: ${{ steps.role_arn.outputs.result }}
4343
aws-region: ${{ inputs.aws_region }}

.github/workflows/deploy-api-lambda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: |
4040
zip -j "${ZIP_FILE}" ./bootstrap
4141
42-
- uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
42+
- uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
4343
with:
4444
role-to-assume: arn:aws:iam::197730964718:role/elastic-docs-v3-api-deployer-edge
4545
aws-region: us-east-1

.github/workflows/preview-build.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ jobs:
117117
outputs:
118118
any_modified: ${{ steps.check-files.outputs.any_modified }}
119119
all_changed_files: ${{ steps.check-files.outputs.all_changed_files }}
120+
added_files: ${{ steps.check-modified-file-detail.outputs.added_files }}
121+
modified_files: ${{ steps.check-modified-file-detail.outputs.modified_files }}
122+
deleted_files: ${{ steps.check-modified-file-detail.outputs.deleted_files }}
123+
renamed_files: ${{ steps.check-modified-file-detail.outputs.renamed_files }}
120124
steps:
121125
- name: Checkout
122126
if: contains(fromJSON('["push", "merge_group", "workflow_dispatch"]'), github.event_name)
@@ -135,6 +139,61 @@ jobs:
135139
.github/**
136140
README.md
137141
142+
- name: Get modified file detail
143+
if: contains(fromJSON('["merge_group", "pull_request", "pull_request_target"]'), github.event_name)
144+
id: check-modified-file-detail
145+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
146+
env:
147+
PATH_PATTERN: "${{ inputs.path-pattern != '' && inputs.path-pattern || '**' }}"
148+
IGNORE_PATTERNS: |
149+
${{ inputs.path-pattern-ignore }}
150+
.github/**
151+
README.md
152+
with:
153+
script: |
154+
const pathPattern = process.env.PATH_PATTERN;
155+
const ignorePatterns = process.env.IGNORE_PATTERNS;
156+
const ignoreGlobber = await glob.create(ignorePatterns);
157+
const ignoredPaths = new Set(await ignoreGlobber.glob());
158+
159+
const { owner, repo } = context.repo;
160+
const pull_number = context.payload.pull_request.number;
161+
162+
const allFiles = await github.paginate(github.rest.pulls.listFiles, {
163+
owner,
164+
repo,
165+
pull_number,
166+
});
167+
168+
const filteredFiles = allFiles.filter(file => !ignoredPaths.has(file.filename));
169+
170+
const added = [];
171+
const modified = [];
172+
const deleted = [];
173+
const renamed = [];
174+
175+
for (const file of filteredFiles) {
176+
switch (file.status) {
177+
case 'added':
178+
added.push(file.filename);
179+
break;
180+
case 'modified':
181+
modified.push(file.filename);
182+
break;
183+
case 'removed':
184+
deleted.push(file.filename);
185+
break;
186+
case 'renamed':
187+
renamed.push(`${file.previous_filename}:${file.filename}`);
188+
break;
189+
}
190+
}
191+
192+
core.setOutput('added_files', added.join(' '));
193+
core.setOutput('modified_files', modified.join(' '));
194+
core.setOutput('deleted_files', deleted.join(' '));
195+
core.setOutput('renamed_files', renamed.join(' '));
196+
138197
build:
139198
if: github.event.repository.fork == false # Skip running the job on the fork itself (It still runs on PRs on the upstream from forks)
140199
runs-on: ubuntu-latest
@@ -149,6 +208,10 @@ jobs:
149208
env:
150209
GITHUB_PR_REF_NAME: ${{ github.event.pull_request.head.ref }}
151210
MATCH: ${{ needs.match.outputs.content-source-match }}
211+
ADDED_FILES: ${{ needs.check.outputs.added_files }}
212+
MODIFIED_FILES: ${{ needs.check.outputs.modified_files }}
213+
DELETED_FILES: ${{ needs.check.outputs.deleted_files }}
214+
RENAMED_FILES: ${{ needs.check.outputs.renamed_files }}
152215
needs:
153216
- check
154217
- match
@@ -234,6 +297,35 @@ jobs:
234297
&& steps.deployment.outputs.result
235298
uses: elastic/docs-builder/.github/actions/bootstrap@main
236299

300+
- name: 'Validate redirect rules'
301+
if: >
302+
env.MATCH == 'true'
303+
&& github.repository == 'elastic/docs-builder'
304+
&& (
305+
steps.deployment.outputs.result
306+
|| (
307+
needs.check.outputs.any_modified == 'true'
308+
&& github.event_name == 'merge_group'
309+
)
310+
)
311+
run: |
312+
dotnet run --project src/tooling/docs-builder -- diff validate
313+
314+
- name: 'Validate redirect rules'
315+
if: >
316+
env.MATCH == 'true'
317+
&& (
318+
github.repository != 'elastic/docs-builder'
319+
&& (
320+
steps.deployment.outputs.result
321+
|| (
322+
needs.check.outputs.any_modified == 'true'
323+
&& github.event_name == 'merge_group'
324+
)
325+
)
326+
)
327+
uses: elastic/docs-builder/actions/diff-validate@main
328+
237329
# we run our artifact directly, please use the prebuild
238330
# elastic/docs-builder@main GitHub Action for all other repositories!
239331
- name: Build documentation

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
run: |
100100
zip -j "${ZIP_FILE}" ./bootstrap
101101
102-
- uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
102+
- uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
103103
with:
104104
role-to-assume: arn:aws:iam::197730964718:role/elastic-docs-v3-link-index-updater-deployer
105105
aws-region: us-east-2

actions/diff-validate/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Validate Redirect Rules'
2+
description: 'Validates consistency of the documentation changes in relation to redirect rules'
3+
4+
runs:
5+
using: 'docker'
6+
image: "docker://ghcr.io/elastic/docs-builder:edge"
7+
args:
8+
- "diff"
9+
- "validate"

actions/update-link-index/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ runs:
4242
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
4343
f.write(f"result=arn:aws:iam::{aws_account_id}:role/{prefix}{hash}")
4444
- name: Configure AWS Credentials
45-
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
45+
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
4646
with:
4747
role-to-assume: ${{ steps.role_arn.outputs.result }}
4848
aws-region: us-east-1

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/legacy-url-mappings.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ mappings:
1111
en/apm/agent/dotnet/: [ '1.32.0', '1.8' ]
1212
en/apm/agent/go/: [ '2.7.1', '1.x', '0.5' ]
1313
en/apm/agent/java/: ['1.54.0', '0.7', '0.6']
14-
en/apm/agent/nodejs/: [ '4.0+', '3.x', '2.x', '1.x' ]
15-
en/apm/agent/php/: []
16-
en/apm/agent/python/: [ '6.23.0', '5.x', '4.x', '3.x', '2.x', '1.x' ]
17-
en/apm/agent/ruby/: [ '4.7.3', '3.x', '2.x', '1.x' ]
14+
en/apm/agent/nodejs/: [ '4.x', '3.x', '2.x', '1.x' ]
15+
en/apm/agent/php/: [ '1.15.1', '1.x' ]
16+
en/apm/agent/python/: [ '6.24.0', '5.x', '4.x', '3.x', '2.x', '1.x' ]
17+
en/apm/agent/ruby/: [ '4.8.0', '3.x', '2.x', '1.x' ]
1818
en/apm/agent/rum-js/: [ '5.17.0', '4.x', '3.x', '2.x', '1.x', '0.x' ]
1919
en/apm/agent/swift/: [ '1.2.1', '0.x' ]
2020
en/apm/attacher/: [ '1.1.3' ]
@@ -41,7 +41,7 @@ mappings:
4141
en/ecs-logging/go-logrus/: [ '1.0.0' ]
4242
en/ecs-logging/go-zap/: [ '1.0.3' ]
4343
en/ecs-logging/go-zerolog/: [ '0.2.0' ]
44-
en/ecs-logging/java/: [ '1.7.0','0.x' ]
44+
en/ecs-logging/java/: [ '1.7.0', '0.x' ]
4545
en/ecs-logging/nodejs/: [ '1.5.3' ]
4646
en/ecs-logging/overview/: []
4747
en/ecs-logging/php/: [ '2.0.0' ]

config/versions.yml

Lines changed: 3 additions & 3 deletions
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.0
6+
current: 9.1.2
77

88
# Using an unlikely high version
99
# So that our logic that would display "planned" doesn't trigger
@@ -56,7 +56,7 @@ versioning_systems:
5656
current: 1.15.1
5757
apm_agent_python:
5858
base: 6.0
59-
current: 6.23.0
59+
current: 6.24.0
6060
apm_agent_ruby:
6161
base: 4.0
6262
current: 4.8.0
@@ -67,7 +67,7 @@ versioning_systems:
6767
# EDOTs
6868
edot_collector:
6969
base: 9.0
70-
current: 9.1.0
70+
current: 9.1.2
7171
edot_ios:
7272
base: 1.0
7373
current: 1.2.1

docs-builder.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Api.I
141141
EndProject
142142
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Api.Lambda", "src\api\Elastic.Documentation.Api.Lambda\Elastic.Documentation.Api.Lambda.csproj", "{C6A121C5-DEB1-4FCE-9140-AF144EA98EEE}"
143143
EndProject
144+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "diff-validate", "diff-validate", "{E7C7A02B-9AB4-455A-9A64-3D326ED1A95A}"
145+
ProjectSection(SolutionItems) = preProject
146+
actions\diff-validate\action.yml = actions\diff-validate\action.yml
147+
EndProjectSection
148+
EndProject
144149
Global
145150
GlobalSection(SolutionConfigurationPlatforms) = preSolution
146151
Debug|Any CPU = Debug|Any CPU
@@ -287,5 +292,6 @@ Global
287292
{F30B90AD-1A01-4A6F-9699-809FA6875B22} = {B042CC78-5060-4091-B95A-79C71BA3908A}
288293
{AE3FC78E-167F-4B6E-88EC-84743EB748B7} = {B042CC78-5060-4091-B95A-79C71BA3908A}
289294
{C6A121C5-DEB1-4FCE-9140-AF144EA98EEE} = {B042CC78-5060-4091-B95A-79C71BA3908A}
295+
{E7C7A02B-9AB4-455A-9A64-3D326ED1A95A} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
290296
EndGlobalSection
291297
EndGlobal

0 commit comments

Comments
 (0)