-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test]: Check for jaeger-idl version mismatch (#6753)
## Which problem is this PR solving? - Resolves #6743 ## Description of the changes - Create a bash script for getting semantic versions of go.mod dependency and git submodule - Update CI ## How was this change tested? - ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: Aryan Goyal <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>
- Loading branch information
1 parent
c202218
commit ab25385
Showing
4 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule idl
updated
31 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (c) 2025 The Jaeger Authors. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set -euo pipefail | ||
|
||
dependency="github.com/jaegertracing/jaeger-idl" | ||
|
||
get_gomod_version() { | ||
gomod_dep=$(grep $dependency <go.mod) | ||
if [ ! "$gomod_dep" ]; then | ||
printf "Error: jaeger-idl dependency not found in go mod\n" >&2 | ||
exit 1 | ||
fi | ||
gomod_version=$(echo "$gomod_dep" | awk '{print $2}') | ||
echo "$gomod_version" | ||
} | ||
|
||
get_submodule_version() { | ||
cd idl | ||
commit_version=$(git rev-parse HEAD) | ||
semver=$(git describe --tags --exact-match "$commit_version") | ||
if [ ! "$semver" ]; then | ||
printf "Error: failed getting version from submodule\n" >&2 | ||
exit 1 | ||
fi | ||
echo "$semver" | ||
} | ||
|
||
gomod_semver=$(get_gomod_version) || exit 1 | ||
submod_semver=$(get_submodule_version) || exit 1 | ||
if [[ "$gomod_semver" != "$submod_semver" ]]; then | ||
printf "Error: jaeger-idl version mismatch: go.mod %s != submodule %s\n" "$gomod_semver" "$submod_semver" >&2 | ||
exit 1 | ||
fi | ||
echo "jaeger-idl version match: OK" |