Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): script to align workspace on new semconv package version #4937

Merged
merged 5 commits into from
Aug 21, 2024

Conversation

trentm
Copy link
Contributor

@trentm trentm commented Aug 21, 2024

This is to be used as part of the semconv release process.

Refs: #4904

This is to be used as part of the semconv release process.

Refs: open-telemetry#4904
@trentm trentm self-assigned this Aug 21, 2024
@trentm trentm requested review from a team, pichlermarc and JamieDanielson August 21, 2024 15:58
@trentm
Copy link
Contributor Author

trentm commented Aug 21, 2024

@JamieDanielson ./scripts/align-semconv-deps.js will do the thing. Where should this fit into the various package.json scripts for the semconv release process?

Example running it in a checkout of #4936:

Updating semconv dep in 20 workspace dirs:
 $ cd packages/opentelemetry-core && npm install --save-exact @opentelemetry/[email protected]
 $ cd packages/opentelemetry-exporter-jaeger && npm install --save-exact @opentelemetry/[email protected]
 $ cd packages/opentelemetry-exporter-zipkin && npm install --save-exact @opentelemetry/[email protected]
 $ cd packages/opentelemetry-resources && npm install --save-exact @opentelemetry/[email protected]
 $ cd packages/opentelemetry-sdk-trace-base && npm install --save-exact @opentelemetry/[email protected]
 $ cd packages/opentelemetry-sdk-trace-node && npm install --save-exact @opentelemetry/[email protected]
 $ cd packages/opentelemetry-sdk-trace-web && npm install --save-exact @opentelemetry/[email protected]
 $ cd packages/opentelemetry-shim-opentracing && npm install --save-exact @opentelemetry/[email protected]
 $ cd experimental/packages/opentelemetry-exporter-prometheus && npm install --save-exact @opentelemetry/[email protected]
 $ cd experimental/packages/opentelemetry-instrumentation-fetch && npm install --save-exact @opentelemetry/[email protected]
 $ cd experimental/packages/opentelemetry-instrumentation-grpc && npm install --save-exact @opentelemetry/[email protected]
 $ cd experimental/packages/opentelemetry-instrumentation-http && npm install --save-exact @opentelemetry/[email protected]
 $ cd experimental/packages/opentelemetry-instrumentation-xml-http-request && npm install --save-exact @opentelemetry/[email protected]
 $ cd experimental/packages/opentelemetry-sdk-node && npm install --save-exact @opentelemetry/[email protected]
 $ cd experimental/examples/opencensus-shim && npm install --save-exact @opentelemetry/[email protected]
 $ cd examples/otlp-exporter-node && npm install --save-exact @opentelemetry/[email protected]
 $ cd examples/opentelemetry-web && npm install --save-exact @opentelemetry/[email protected]
 $ cd examples/http && npm install --save-exact @opentelemetry/[email protected]
 $ cd examples/https && npm install --save-exact @opentelemetry/[email protected]
 $ cd examples/esm-http-ts && npm install --save-exact @opentelemetry/[email protected]

@JamieDanielson
Copy link
Member

JamieDanielson commented Aug 21, 2024

Where should this fit into the various package.json scripts for the semconv release process?

I believe these will go into the prepare_release:semconv:ver scripts in the root package.json:

-    "prepare_release:semconv:patch": "npm run _check:no_changes && npm run _backup:package-json && npm run _lerna:remove_everything_except_semconv && npm run _lerna:version_patch && npm run _restore:package-json && npm run _changelog:prepare_semconv",
-    "prepare_release:semconv:minor": "npm run _check:no_changes && npm run _backup:package-json && npm run _lerna:remove_everything_except_semconv && npm run _lerna:version_minor && npm run _restore:package-json && npm run _changelog:prepare_semconv",
+    "prepare_release:semconv:patch": "npm run _check:no_changes && npm run _backup:package-json && npm run _lerna:remove_everything_except_semconv && npm run _lerna:version_patch && lerna run align-semconv-deps && npm run _restore:package-json && npm run _changelog:prepare_semconv",
+    "prepare_release:semconv:minor": "npm run _check:no_changes && npm run _backup:package-json && npm run _lerna:remove_everything_except_semconv && npm run _lerna:version_minor && lerna run align-semconv-deps && npm run _restore:package-json && npm run _changelog:prepare_semconv",

and then every package.json, below the align-api-deps script:

-    "align-api-deps": "node ../../scripts/align-api-deps.js"
+    "align-api-deps": "node ../../scripts/align-api-deps.js",
+    "align-semconv-deps": "node ../../scripts/align-semconv-deps.js"

EDIT: Re-reading this more closely, I had this wrong. Ignore the previous above comment for now 😅

@trentm
Copy link
Contributor Author

trentm commented Aug 21, 2024

REviewer note, the package-lock was slightly unsync'd. Here is the clean update to package-lock:

diff --git a/package-lock.json b/package-lock.json
index 03d754ec0..6e75249ed 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2045,6 +2045,9 @@
       "dependencies": {
         "@opentelemetry/api-logs": "0.52.1",
         "@opentelemetry/core": "1.25.1",
+        "@opentelemetry/exporter-logs-otlp-grpc": "0.52.1",
+        "@opentelemetry/exporter-logs-otlp-http": "0.52.1",
+        "@opentelemetry/exporter-logs-otlp-proto": "0.52.1",
         "@opentelemetry/exporter-trace-otlp-grpc": "0.52.1",
         "@opentelemetry/exporter-trace-otlp-http": "0.52.1",
         "@opentelemetry/exporter-trace-otlp-proto": "0.52.1",
@@ -36903,6 +36906,9 @@
         "@opentelemetry/context-async-hooks": "1.25.1",
         "@opentelemetry/core": "1.25.1",
         "@opentelemetry/exporter-jaeger": "1.25.1",
+        "@opentelemetry/exporter-logs-otlp-grpc": "0.52.1",
+        "@opentelemetry/exporter-logs-otlp-http": "0.52.1",
+        "@opentelemetry/exporter-logs-otlp-proto": "0.52.1",
         "@opentelemetry/exporter-trace-otlp-grpc": "0.52.1",
         "@opentelemetry/exporter-trace-otlp-http": "0.52.1",
         "@opentelemetry/exporter-trace-otlp-proto": "0.52.1",

Copy link
Member

@JamieDanielson JamieDanielson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@trentm trentm added this pull request to the merge queue Aug 21, 2024
Merged via the queue into open-telemetry:main with commit 7aff06d Aug 21, 2024
19 checks passed
@trentm trentm deleted the tm-align-semconv-deps branch August 21, 2024 17:44
Zirak pushed a commit to Zirak/opentelemetry-js that referenced this pull request Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants