Skip to content

Commit 4c7f7bd

Browse files
committed
Merge remote-tracking branch 'origin/main' into otelbot/spec-integration-v1.52.0-dev
2 parents 4df78d8 + c05b0ba commit 4c7f7bd

File tree

5 files changed

+951
-826
lines changed

5 files changed

+951
-826
lines changed

.textlintrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ rules:
132132
- '(?<=(^|\s))(?:\bdot|\.)net\b'
133133
- .NET
134134
- [ebpf, eBPF]
135+
- [epbf, eBPF]
135136
- ['http[ /]?2(?:\.0)?', HTTP/2]
136137
- [he(/| or )she, they]
137138
- [\(s\)he, they]

projects/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This folder contains SIG Comms projects related to OpenTelemetry documentation
2+
improvements. Each project file documents a specific initiative.
3+
4+
To create a new project file, use `_TEMPLATE.md` as a starting point. Copy the
5+
template and fill in the relevant sections with your project details.

projects/_TEMPLATE.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Project title
2+
3+
## Description
4+
5+
<!-- Provide a comprehensive description of the project, including its purpose, scope, and context. You may include example use cases, background information, or any other relevant details that help readers understand what the project is about. -->
6+
7+
### Current challenges
8+
9+
<!-- Describe the current challenges or problems that this project aims to address. Explain why this project is needed and what gaps it fills. -->
10+
11+
### Goals, objectives, and requirements
12+
13+
<!-- Clearly state the goals, objectives, and requirements of the project. Explain what the project intends to achieve and any specific requirements or constraints that need to be considered. -->
14+
15+
## Deliverables
16+
17+
<!-- List the deliverables for the project. You may organize them by timeframes (e.g., immediate term, middle term, long term) or by categories. Be specific about what will be produced or achieved. -->
18+
19+
## Staffing / Help Wanted
20+
21+
<!-- Provide information about the project team, including project leads, sponsoring members, and engineers. You may include a table with columns for alias, language, company/project, and time commitment. Also indicate if you're looking for more contributors. -->
22+
23+
## Meeting Times
24+
25+
<!-- Specify the meeting schedule for the project, including frequency, day of week, and time (with timezone). -->
26+
27+
### Meeting Links
28+
29+
<!-- Provide links to meeting resources such as calendar invites, meeting notes, or other relevant documentation. -->
30+
31+
## Discussion
32+
33+
<!-- List communication channels for project discussions, such as Slack channels, mailing lists, or other forums. -->
34+
35+
## Timeline
36+
37+
<!-- Provide a timeline or roadmap for the project, including key milestones and target dates. You may organize this as a list or in another format that clearly shows the project schedule. -->
38+
39+
## Labels
40+
41+
<!-- List any GitHub labels or tags that should be associated with this project. -->
42+
43+
## Linked Issues and PRs
44+
45+
<!-- Provide links to related GitHub issues and pull requests that are relevant to this project. Format as a list with descriptive text and links. -->
46+
47+
## Project Board
48+
49+
<!-- Provide a link to the project board or kanban board if one exists for tracking project progress. -->

scripts/content-modules/adjust-pages.pl

Lines changed: 87 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,37 +75,96 @@ ()
7575
print "---\n";
7676
}
7777

78+
sub getVersFromGitmodules($) {
79+
# Returns the pinned version of the submodule $specName from .gitmodules, or undef if not found.
80+
my ($specName) = @_;
81+
my $pinKey = "$specName-pin";
82+
83+
open(my $fh, '<', '.gitmodules') or return undef;
84+
my $vers;
85+
86+
while (my $line = <$fh>) {
87+
if ($line =~ /^\s*$pinKey\s*=\s*(.+)/) {
88+
$vers = $1;
89+
chomp($vers);
90+
$vers =~ s/^v//; # Remove leading v
91+
last;
92+
}
93+
}
94+
close($fh);
95+
return $vers;
96+
}
97+
7898
sub applyPatchOrPrintMsgIf($$$) {
7999
# Returns truthy if patch should be applied, otherwise prints message (once) as to why not.
100+
# The patch is applied if $submoduleVers starts with $targetVers.
80101

81102
my ($patchID, $specName, $targetVers) = @_;
82-
my $vers;
103+
my $vers = $versions{$specName};
104+
my $submoduleVers = getVersFromGitmodules($specName);
83105
my $key = $specName . $patchID;
84106

85-
return 0 if $patchMsgCount{$key};
86-
87-
if (($vers = $versions{$specName}) gt $targetVers) {
88-
print STDOUT "INFO: remove obsolete patch '$patchID' now that spec '$specName' is at v$vers > v$targetVers - $0\n";
89-
} elsif (($vers = $versFromSubmod{$specName}) gt $targetVers) {
90-
print STDOUT "INFO [$patchID]: skipping patch '$patchID' since spec '$specName' submodule is at v$vers > v$targetVers - $0\n";
107+
return 0 if $patchMsgCount{$key} && $patchMsgCount{$key} ne 'Apply the patch';
108+
109+
if ($submoduleVers && $submoduleVers =~ /^$targetVers/) {
110+
print STDOUT "INFO: $0: applying patch '$patchID' since spec '$specName' " .
111+
"submodule is at version '$submoduleVers', and it starts with the patch target '$targetVers'" .
112+
"\n" unless $patchMsgCount{$key};
113+
return $patchMsgCount{$key} = 'Apply the patch';
114+
} elsif ($vers ge $targetVers) {
115+
print STDOUT "INFO: $0: patch '$patchID' is probably obsolete now that " .
116+
"spec '$specName' is at version '$vers' >= '$targetVers' (patch target version); " .
117+
"if so, remove the patch\n";
91118
} else {
92-
return 'Apply the patch';
119+
print STDOUT "INFO: $0: skipping patch '$patchID' since spec '$specName' " .
120+
"submodule is at version '$vers' < '$targetVers' (patch target version); " .
121+
"and submodule version '$submoduleVers' doesn't start with the patch target '$targetVers'\n";
93122
}
94123
$patchMsgCount{$key}++;
95124
return 0;
96125
}
97126

127+
# =================================================================================
128+
# KEEP THE FOLLOWING AS A TEMPLATE; copy it and modify it as needed.
129+
# =================================================================================
130+
sub patchSpec_because_of_SemConv_DockerAPIVersions_AsTemplate() {
131+
return unless
132+
# Restrict the patch to the proper spec, and section or file:
133+
$ARGV =~ m|^tmp/semconv/docs/|
134+
&&
135+
# Call helper function that will cause the function to return early if the
136+
# patch should not be applied. The patch is applied if the submodule version
137+
# (from .gitmodules) starts with the target version (arg 3). The first
138+
# argument is a unique id that will be printed if the patch is outdated.
139+
# Otherwise, if the patch is still relevant we fall through to the body of
140+
# this patch function.
141+
#
142+
# Specify the target version as, e.g., '1.38.0', or to apply only to dev
143+
# versions, use '1.38.0-' with a trailing hyphen.
144+
applyPatchOrPrintMsgIf('2025-11-21-docker-api-versions', 'semconv', '1.38.0');
145+
146+
# Give infor about the patch:
147+
#
148+
# For the problematic links, see:
149+
# https://github.com/open-telemetry/semantic-conventions/issues/3103
150+
#
151+
# Replace older Docker API versions with the latest one like in:
152+
# https://github.com/open-telemetry/semantic-conventions/pull/3093
153+
154+
# This is the actual regex-based patch code:
155+
s{
156+
(https://docs.docker.com/reference/api/engine/version)/v1.(43|51)/(\#tag/)
157+
}{$1/v1.52/$3}gx;
158+
}
159+
98160
sub patchSpec_because_of_SemConv_DockerAPIVersions() {
99161
return unless
100162
# Restrict the patch to the proper spec, and section or file:
101163
$ARGV =~ m|^tmp/semconv/docs/|
102164
&&
103165
# Call helper function that will cause the function to return early if the
104-
# current version of the named spec (arg 2) is greater than the target
105-
# version (arg 3). The first argument is a unique id that will be printed if
106-
# the patch is outdated. Otherwise, if the patch is still relevant we fall
107-
# through to the body of this patch function.
108-
applyPatchOrPrintMsgIf('2025-11-21-docker-api-versions', 'semconv', '1.39.0-dev');
166+
# patch should not be applied. See patch template above for details.
167+
applyPatchOrPrintMsgIf('2025-11-21-docker-api-versions', 'semconv', '1.38.0');
109168

110169
# Give infor about the patch:
111170
#
@@ -121,6 +180,19 @@ ()
121180
}{$1/v1.52/$3}gx;
122181
}
123182

183+
sub patchSpec_because_of_SemConv_DatabaseRenamedToDb() {
184+
return unless
185+
# Restrict the patch to the proper spec, and section or file:
186+
# Note that here we replace links into semconv from the spec
187+
$ARGV =~ m|^tmp/otel/specification/|
188+
&& applyPatchOrPrintMsgIf('2025-11-26-database-section-renamed-to-db', 'semconv', '1.38.0-');
189+
190+
# Give infor about the patch, see:
191+
# https://github.com/open-telemetry/opentelemetry.io/pull/8311#issue-3577941378
192+
193+
s|(/semconv)/database(/database-)|$1/db$2|g;
194+
}
195+
124196
sub getVersFromSubmodule() {
125197
my %repoNames = qw(
126198
otlp opentelemetry-proto
@@ -244,6 +316,8 @@ ()
244316
)
245317
}{$otelSpecRepoUrl/tree/v$otelSpecVers/$2}gx;
246318

319+
patchSpec_because_of_SemConv_DatabaseRenamedToDb();
320+
247321
s|\.\./((?:examples/)?README\.md)|$otlpSpecRepoUrl/tree/v$otlpSpecVers/$1|g if $ARGV =~ /^tmp\/otlp/;
248322

249323
# Make website-local page references local:

0 commit comments

Comments
 (0)