Skip to content

Commit 2260929

Browse files
authored
Use archive URL for weaver registry (open-telemetry#6235)
Resolve open-telemetry#6230 Instead of requiring a local copy of the semantic-conventions repository be checked out, rely on versioned archive URLs from Github. I have verified locally this generates the expected version based on idiosyncrasies of the tagged semantic convention versions.
1 parent 27aaa7a commit 2260929

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ SEMCONVPKG ?= "semconv/"
276276
.PHONY: semconv-generate
277277
semconv-generate: $(SEMCONVKIT)
278278
[ "$(TAG)" ] || ( echo "TAG unset: missing opentelemetry semantic-conventions tag"; exit 1 )
279-
[ "$(SEMCONV_REPO)" ] || ( echo "SEMCONV_REPO unset: missing path to opentelemetry semantic-conventions repo"; exit 1 )
280279
# Ensure the target directory for source code is available.
281280
mkdir -p $(PWD)/$(SEMCONVPKG)/${TAG}
282281
# Note: We mount a home directory for downloading/storing the semconv repository.
@@ -285,12 +284,11 @@ semconv-generate: $(SEMCONVKIT)
285284
docker run --rm \
286285
-u $(DOCKER_USER) \
287286
--env HOME=/tmp/weaver \
288-
--mount 'type=bind,source=$(SEMCONV_REPO),target=/source,readonly' \
289287
--mount 'type=bind,source=$(PWD)/semconv,target=/home/weaver/templates/registry/go,readonly' \
290288
--mount 'type=bind,source=$(PWD)/semconv/${TAG},target=/home/weaver/target' \
291289
--mount 'type=bind,source=$(HOME)/.weaver,target=/tmp/weaver/.weaver' \
292290
$(WEAVER_IMAGE) registry generate \
293-
--registry=/source/model \
291+
--registry=https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/$(TAG).zip[model] \
294292
--templates=/home/weaver/templates \
295293
--param tag=$(TAG) \
296294
go \

RELEASING.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
New versions of the [OpenTelemetry Semantic Conventions] mean new versions of the `semconv` package need to be generated.
66
The `semconv-generate` make target is used for this.
77

8-
1. Checkout a local copy of the [OpenTelemetry Semantic Conventions] to the desired release tag.
8+
1. Set the `TAG` environment variable to the semantic convention tag you want to generate.
99
2. Run the `make semconv-generate ...` target from this repository.
1010

1111
For example,
1212

1313
```sh
14-
export TAG="v1.21.0" # Change to the release version you are generating.
15-
export OTEL_SEMCONV_REPO="/absolute/path/to/opentelemetry/semantic-conventions"
16-
make semconv-generate # Uses the exported TAG and OTEL_SEMCONV_REPO.
14+
export TAG="v1.30.0" # Change to the release version you are generating.
15+
make semconv-generate # Uses the exported TAG.
1716
```
1817

1918
This should create a new sub-package of [`semconv`](./semconv).

0 commit comments

Comments
 (0)