Skip to content

Commit 2c8e9bc

Browse files
author
agoloman
committed
Revert "Bug 1991427 - Apply mozilla patches for opentelemetry-proto r=jari" for causing build bustages @casts.h.
This reverts commit dfb89a0. Revert "Bug 1991427 - Update opentelemetry-proto to new version v1.8.0 r=jari" This reverts commit 2bdb19e. Revert "Bug 1991427 - Switch otel-proto definitions to use `LITE_RUNTIME` r=jari" This reverts commit 01b021c. Revert "Bug 1991427 - Add support for `post-patch-actions` to `moz.yaml` files r=tjr" This reverts commit 9f238f9.
1 parent 8720d33 commit 2c8e9bc

File tree

24 files changed

+1391
-988
lines changed

24 files changed

+1391
-988
lines changed

python/mozbuild/mozbuild/vendor/docs/index.rst

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -64,37 +64,3 @@ In the presence of patches, two steps are needed:
6464

6565
In the absence of patches, a single step is needed, and no extra argument is
6666
required.
67-
68-
69-
Vendoring Actions
70-
=================
71-
72-
Vendoring actions in the ``moz.yaml`` file can be configured to run either before
73-
or after patches are applied using separate sections:
74-
75-
* Actions in ``update-actions`` run **before** patches are applied
76-
* Actions in ``post-patch-actions`` run **after** patches are applied
77-
78-
This separation is useful when you need to run scripts that depend on Mozilla-specific
79-
patches being applied first, such as:
80-
81-
* Code generation scripts that need patched configuration files
82-
* Build system updates that depend on patched build definitions
83-
* Processing steps that require Mozilla-specific modifications to be in place
84-
85-
Example:
86-
87-
.. code-block:: yaml
88-
89-
# Actions that run before patches are applied
90-
update-actions:
91-
- action: run-script
92-
script: '{yaml_dir}/pre_patch_script.sh'
93-
cwd: '{yaml_dir}'
94-
95-
# Actions that run after patches are applied
96-
post-patch-actions:
97-
- action: run-script
98-
script: '{yaml_dir}/post_patch_script.sh'
99-
cwd: '{yaml_dir}'
100-
args: ['{revision}']

python/mozbuild/mozbuild/vendor/docs/template.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ vendoring:
158158
# All three file/path parameters ("keep", "exclude", and "include") support
159159
# filenames, directory names, and globs/wildcards.
160160

161-
# Actions to take after updating but before applying patches. Applied in order.
161+
# Actions to take after updating. Applied in order.
162162
# The action subfield is required. It must be one of:
163163
# - copy-file
164164
# - move-file
@@ -231,15 +231,6 @@ vendoring:
231231
script: '{cwd}/generate_sources.sh'
232232
cwd: '{yaml_dir}'
233233

234-
# Actions to take after patches have been applied. Applied in order.
235-
# Uses the same action types as update-actions.
236-
# optional
237-
post-patch-actions:
238-
- action: run-script
239-
script: '{yaml_dir}/post_patch_script.py'
240-
cwd: '{yaml_dir}'
241-
args: ['{revision}']
242-
243234

244235
# Configuration for automatic updating system.
245236
# optional

python/mozbuild/mozbuild/vendor/moz_yaml.py

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -119,39 +119,6 @@ def load_moz_yaml(filename, verify=True, require_license_file=True):
119119

120120
def _schema_1():
121121
"""Returns Voluptuous Schema object."""
122-
123-
actions_schema = All(
124-
VendoringActions(),
125-
[
126-
{
127-
Required("action"): In(
128-
[
129-
"copy-file",
130-
"move-file",
131-
"move-dir",
132-
"replace-in-file",
133-
"replace-in-file-regex",
134-
"run-script",
135-
"run-command",
136-
"delete-path",
137-
"vcs-add-remove-files",
138-
],
139-
msg="Invalid action specified in vendoring-actions",
140-
),
141-
"from": All(str, Length(min=1)),
142-
"to": All(str, Length(min=1)),
143-
"pattern": All(str, Length(min=1)),
144-
"with": All(str, Length(min=1)),
145-
"file": All(str, Length(min=1)),
146-
"script": All(str, Length(min=1)),
147-
"command": All(str, Length(min=1)),
148-
"args": All([All(str, Length(min=1))]),
149-
"cwd": All(str, Length(min=1)),
150-
"path": All(str, Length(min=1)),
151-
}
152-
],
153-
)
154-
155122
return Schema(
156123
{
157124
Required("schema"): "1",
@@ -234,8 +201,37 @@ def _schema_1():
234201
"individual-files-default-upstream": str,
235202
"individual-files-default-destination": All(str, Length(min=1)),
236203
"individual-files-list": Unique([str]),
237-
"update-actions": actions_schema,
238-
"post-patch-actions": actions_schema,
204+
"update-actions": All(
205+
UpdateActions(),
206+
[
207+
{
208+
Required("action"): In(
209+
[
210+
"copy-file",
211+
"move-file",
212+
"move-dir",
213+
"replace-in-file",
214+
"replace-in-file-regex",
215+
"run-script",
216+
"run-command",
217+
"delete-path",
218+
"vcs-add-remove-files",
219+
],
220+
msg="Invalid action specified in update-actions",
221+
),
222+
"from": All(str, Length(min=1)),
223+
"to": All(str, Length(min=1)),
224+
"pattern": All(str, Length(min=1)),
225+
"with": All(str, Length(min=1)),
226+
"file": All(str, Length(min=1)),
227+
"script": All(str, Length(min=1)),
228+
"command": All(str, Length(min=1)),
229+
"args": All([All(str, Length(min=1))]),
230+
"cwd": All(str, Length(min=1)),
231+
"path": All(str, Length(min=1)),
232+
}
233+
],
234+
),
239235
},
240236
}
241237
)
@@ -442,8 +438,8 @@ def _schema_1_transform(manifest):
442438
return manifest
443439

444440

445-
class VendoringActions:
446-
"""Voluptuous validator which verifies the vendoring actions(s) are valid."""
441+
class UpdateActions:
442+
"""Voluptuous validator which verifies the update actions(s) are valid."""
447443

448444
def __call__(self, values):
449445
for v in values:
@@ -501,7 +497,7 @@ def __call__(self, values):
501497
return values
502498

503499
def __repr__(self):
504-
return "VendoringActions"
500+
return "UpdateActions"
505501

506502

507503
class UpdatebotTasks:

python/mozbuild/mozbuild/vendor/vendor_manifest.py

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ def vendor(
137137
os.path.dirname(self.yaml_file),
138138
self.manifest["vendoring"]["vendor-directory"],
139139
)
140-
self.run_vendoring_actions(revision, "post-patch-actions")
141140
return
142141

143142
# ==========================================================
@@ -273,7 +272,7 @@ def process_regular_or_individual(
273272
self.logInfo({}, "Skipping fetching upstream source.")
274273

275274
self.logInfo({}, "Checking for update actions")
276-
self.run_vendoring_actions(new_revision, "update-actions")
275+
self.update_files(new_revision)
277276

278277
if self.patch_mode == "check":
279278
self.import_local_patches(
@@ -699,14 +698,14 @@ def spurious_check(self, revision, ignore_modified):
699698
"Version '{rev}' has changed {num} files.",
700699
)
701700

702-
def run_vendoring_actions(self, revision, actions_type="update-actions"):
703-
if actions_type not in self.manifest["vendoring"]:
701+
def update_files(self, revision):
702+
if "update-actions" not in self.manifest["vendoring"]:
704703
return
705704

706-
for action in self.manifest["vendoring"][actions_type]:
707-
if action["action"] == "copy-file":
708-
src = self.get_full_path(action["from"])
709-
dst = self.get_full_path(action["to"])
705+
for update in self.manifest["vendoring"]["update-actions"]:
706+
if update["action"] == "copy-file":
707+
src = self.get_full_path(update["from"])
708+
dst = self.get_full_path(update["to"])
710709

711710
self.logInfo(
712711
{"s": src, "d": dst}, "action: copy-file src: {s} dst: {d}"
@@ -716,24 +715,24 @@ def run_vendoring_actions(self, revision, actions_type="update-actions"):
716715
contents = f.read()
717716
with open(dst, "w") as f:
718717
f.write(contents)
719-
elif action["action"] == "vcs-add-remove-files":
720-
directory = self.get_full_path(action["path"])
718+
elif update["action"] == "vcs-add-remove-files":
719+
directory = self.get_full_path(update["path"])
721720

722721
self.logInfo({"d": directory}, "action: vcs-add-remove-files dir: {d}")
723722

724723
self.repository.add_remove_files(directory)
725-
elif action["action"] == "move-file":
726-
src = self.get_full_path(action["from"])
727-
dst = self.get_full_path(action["to"])
724+
elif update["action"] == "move-file":
725+
src = self.get_full_path(update["from"])
726+
dst = self.get_full_path(update["to"])
728727

729728
self.logInfo(
730729
{"s": src, "d": dst}, "action: move-file src: {s} dst: {d}"
731730
)
732731

733732
shutil.move(src, dst)
734-
elif action["action"] == "move-dir":
735-
src = self.get_full_path(action["from"])
736-
dst = self.get_full_path(action["to"])
733+
elif update["action"] == "move-dir":
734+
src = self.get_full_path(update["from"])
735+
dst = self.get_full_path(update["to"])
737736

738737
self.logInfo(
739738
{"src": src, "dst": dst}, "action: move-dir src: {src} dst: {dst}"
@@ -762,32 +761,32 @@ def copy_tree(src, dst):
762761
copy_tree(src, dst)
763762
shutil.rmtree(src)
764763

765-
elif action["action"] in ["replace-in-file", "replace-in-file-regex"]:
766-
file = self.get_full_path(action["file"])
764+
elif update["action"] in ["replace-in-file", "replace-in-file-regex"]:
765+
file = self.get_full_path(update["file"])
767766

768767
self.logInfo({"file": file}, "action: replace-in-file file: {file}")
769768

770-
replacement = action["with"].replace("{revision}", revision)
769+
replacement = update["with"].replace("{revision}", revision)
771770
_replace_in_file(
772771
file,
773-
action["pattern"],
772+
update["pattern"],
774773
replacement,
775-
regex=action["action"] == "replace-in-file-regex",
774+
regex=update["action"] == "replace-in-file-regex",
776775
)
777-
elif action["action"] == "delete-path":
778-
path = self.get_full_path(action["path"])
776+
elif update["action"] == "delete-path":
777+
path = self.get_full_path(update["path"])
779778
self.logInfo({"path": path}, "action: delete-path path: {path}")
780779
mozfile.remove(path)
781-
elif action["action"] in ["run-script", "run-command"]:
782-
if action["action"] == "run-script":
783-
command = self.get_full_path(action["script"], support_cwd=True)
780+
elif update["action"] in ["run-script", "run-command"]:
781+
if update["action"] == "run-script":
782+
command = self.get_full_path(update["script"], support_cwd=True)
784783
else:
785-
command = action["command"]
784+
command = update["command"]
786785

787-
run_dir = self.get_full_path(action["cwd"], support_cwd=True)
786+
run_dir = self.get_full_path(update["cwd"], support_cwd=True)
788787

789788
args = []
790-
for a in action.get("args", []):
789+
for a in update.get("args", []):
791790
if a == "{revision}":
792791
args.append(revision)
793792
elif any(
@@ -809,7 +808,7 @@ def copy_tree(src, dst):
809808
"command": command,
810809
"run_dir": run_dir,
811810
"args": args,
812-
"type": action["action"],
811+
"type": update["action"],
813812
},
814813
"action: {type} command: {command} working dir: {run_dir} args: {args}",
815814
)

third_party/opentelemetry-cpp/moz.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ DIRS += [
99
"sdk/src",
1010
]
1111

12+
1213
TEST_DIRS += ["exporters/memory"]
1314

1415
with Files("**"):

third_party/opentelemetry-cpp/third_party/opentelemetry-proto/CHANGELOG.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,6 @@
44

55
The full list of changes can be found in the compare view for the respective release at <https://github.com/open-telemetry/opentelemetry-proto/releases>.
66

7-
## 1.8.0 - 2025-09-02
8-
9-
### Changed
10-
11-
- profiles: drop gzip requirement. [#661](https://github.com/open-telemetry/opentelemetry-proto/pull/661)
12-
- profiles: avoid `optional` keyword usage. [#659](https://github.com/open-telemetry/opentelemetry-proto/pull/659)
13-
- profiles: make `profile_id` optional. [#665](https://github.com/open-telemetry/opentelemetry-proto/pull/665)
14-
- profiles: use single `Profile.sample_type` and clarify use of timestamps. [#649](https://github.com/open-telemetry/opentelemetry-proto/pull/649)
15-
- all: add notes about the attribute values restrictions. [#683](https://github.com/open-telemetry/opentelemetry-proto/pull/683)<br>
16-
⚠️ **IMPORTANT**: These restrictions can be dropped in a future minor release.
17-
- profiles: clarify usage of the zero value as the first element of tables in `ProfilesDictionary`. [#688](https://github.com/open-telemetry/opentelemetry-proto/pull/688), [#698](https://github.com/open-telemetry/opentelemetry-proto/pull/698)
18-
- profiles: unsigned `time_nanos` and `duration_nanos` in `Profile`. [#692](https://github.com/open-telemetry/opentelemetry-proto/pull/692)
19-
- profiles: improve attribute encoding in `ProfilesDictionary`. [#672](https://github.com/open-telemetry/opentelemetry-proto/pull/672)
20-
- profiles: simplify profile stack trace representation. [#708](https://github.com/open-telemetry/opentelemetry-proto/pull/708)
21-
22-
### Fixed
23-
24-
- examples: fix OTLP JSON Event example body. [#666](https://github.com/open-telemetry/opentelemetry-proto/pull/666)
25-
- docs: minor specification fixes around `UNAVAILABLE` and `RetryInfo`. [#669](https://github.com/open-telemetry/opentelemetry-proto/pull/669)
26-
27-
### Removed
28-
29-
- profiles: remove `default_sample_type`. [#679](https://github.com/open-telemetry/opentelemetry-proto/pull/679)
30-
- profiles: remove `has_*` debug info fields, they are moving to attributes. [#595](https://github.com/open-telemetry/opentelemetry-proto/pull/595)
31-
- profiles: remove `Location.is_folded`. [#690](https://github.com/open-telemetry/opentelemetry-proto/pull/690)
32-
337
## 1.7.0 - 2025-05-19
348

359
### Added

third_party/opentelemetry-cpp/third_party/opentelemetry-proto/README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,3 @@ Experiments which succeed, require a review before the field or the message is m
127127

128128
No guarantees are provided whatsoever about the stability of the code that
129129
is generated from the .proto files by any particular code generator.
130-
131-
## Maintainers
132-
133-
- [OpenTelemetry Technical Committee](https://github.com/open-telemetry/community/blob/main/community-members.md#technical-committee)
134-
135-
For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
136-
137-
## Approvers
138-
139-
- [OpenTelemetry Specification Sponsors](https://github.com/open-telemetry/community/blob/main/community-members.md#specifications-and-proto)
140-
141-
For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).

third_party/opentelemetry-cpp/third_party/opentelemetry-proto/moz.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ origin:
99
description: OpenTelemetry protocol (OTLP) specification and Protobuf definitions
1010
url: https://opentelemetry.io/docs/specs/otlp/
1111

12-
release: v1.8.0 (2025-09-02T11:03:39-04:00).
13-
revision: v1.8.0
12+
release: identifier
13+
revision: sha
1414

1515
license: Apache-2.0
1616
license-file: LICENSE
@@ -46,10 +46,7 @@ vendoring:
4646
- opentelemetry/proto/trace/v1/trace.pb.cc
4747
- opentelemetry/proto/trace/v1/trace.pb.h
4848

49-
patches:
50-
- patches/add-lite_runtime-optimization-to-protos.patch
51-
52-
post-patch-actions:
49+
update-actions:
5350
- action: run-script
5451
script: "{topsrcdir}/toolkit/components/protobuf/scripts/protoc_wrapper.py"
5552
cwd: "{topsrcdir}"

third_party/opentelemetry-cpp/third_party/opentelemetry-proto/opentelemetry.proto.resource.v1.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@ pub struct Resource {
66
/// Set of attributes that describe the resource.
77
/// Attribute keys MUST be unique (it is not allowed to have more than one
88
/// attribute with the same key).
9-
///
10-
/// The attribute values SHOULD NOT contain empty values.
11-
/// The attribute values SHOULD NOT contain bytes values.
12-
/// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
13-
/// double values.
14-
/// The attribute values SHOULD NOT contain kvlist values.
15-
/// The behavior of software that receives attributes containing such values can be unpredictable.
16-
/// These restrictions can change in a minor release.
17-
/// The restrictions take origin from the OpenTelemetry specification:
18-
/// <https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.>
199
#[prost(message, repeated, tag = "1")]
2010
pub attributes: ::prost::alloc::vec::Vec<super::super::common::v1::KeyValue>,
2111
/// dropped_attributes_count is the number of dropped attributes. If the value is 0, then

0 commit comments

Comments
 (0)