-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Run jaeger-es-index-cleaner and jaeger-es-rollover locally #5714
Conversation
Signed-off-by: mehul gautam <mehulsharma4786@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5714 +/- ##
==========================================
- Coverage 96.89% 96.87% -0.02%
==========================================
Files 334 334
Lines 16146 16146
==========================================
- Hits 15644 15642 -2
- Misses 333 334 +1
- Partials 169 170 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@yurishkuro have a look if this implementation looks good enough then after i will make similar changes for jaeger-es-rollover |
Signed-off-by: mehul gautam <mehulsharma4786@gamil.com>
Signed-off-by: mehul gautam <mehulsharma4786@gamil.com>
Signed-off-by: mehul gautam <mehulsharma4786@gamil.com>
scripts/es-integration-test.sh
Outdated
# Loop through each platform (separated by commas) | ||
for platform in $(echo "$platforms" | tr ',' ' '); do | ||
# Extract the architecture from the platform string | ||
arch=${platform##*/} # Remove everything before the last slash | ||
make "build-binaries-$arch" | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Loop through each platform (separated by commas) | |
for platform in $(echo "$platforms" | tr ',' ' '); do | |
# Extract the architecture from the platform string | |
arch=${platform##*/} # Remove everything before the last slash | |
make "build-binaries-$arch" | |
done | |
make "build-binaries-linux" |
Is that what you are trying to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but i let i be there since i wasn't sure if we have to test only on linux/amd64 i will make the changes
scripts/es-integration-test.sh
Outdated
make "build-binaries-$arch" | ||
done | ||
make create-baseimg | ||
#bash scripts/build-upload-a-docker-image.sh ${LOCAL_FLAG} -b -c jaeger-es-index-cleaner -d cmd/es-index-cleaner -p "${platforms}" -t release -l Y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we use this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well i tried it gives me a log message of Unable to find image
'localhost:5000/jaegertracing/jaeger-es-index-cleaner:local-test' locally
although it is able to pull the image locally and run fine but i wanted to ask you first about it
@@ -32,7 +32,7 @@ const ( | |||
samplingIndexName = "jaeger-sampling-2019-01-01" | |||
spanIndexName = "jaeger-span-2019-01-01" | |||
serviceIndexName = "jaeger-service-2019-01-01" | |||
indexCleanerImage = "jaegertracing/jaeger-es-index-cleaner:latest" | |||
indexCleanerImage = "jaegertracing/jaeger-es-index-cleaner:local-test" | |||
rolloverImage = "jaegertracing/jaeger-es-rollover:1.57.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The jaeger-es-index-cleaner is now pulling the local image, and there are no longer any log messages for this process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollover image is also pulled by published version instead of being built locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#5714 (comment)
so is the current implementation for es-index-cleaner is good enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will make appropriate changes
why is pkg/version/build_test.go deleted in this PR? |
scripts/es-integration-test.sh
Outdated
@@ -96,14 +96,32 @@ teardown_storage() { | |||
docker compose -f "${compose_file}" down | |||
} | |||
|
|||
build_local_img(){ | |||
make "build-binaries-linux" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to build ALL binaries, only the 2 specific ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want
make build-es-index-cleaner GOOS=linux
make build-es-rollover GOOS=linux
scripts/es-integration-test.sh
Outdated
@@ -96,14 +96,32 @@ teardown_storage() { | |||
docker compose -f "${compose_file}" down | |||
} | |||
|
|||
build_local_img(){ | |||
make "build-binaries-linux" | |||
make create-baseimg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make create-baseimg | |
make create-baseimg PLATFORMS=linux/$(go env GOARCH) |
scripts/es-integration-test.sh
Outdated
make "build-binaries-linux" | ||
make create-baseimg | ||
#build es-index-cleaner | ||
docker build \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked for me:
Build with a fake GITHUB_SHA/BRANCH=local-test
variables
GITHUB_SHA=local-test BRANCH=local-test bash scripts/build-upload-a-docker-image.sh -l -b -c jaeger-es-index-cleaner -d cmd/es-index-cleaner -t release -p linux/$(go env GOARCH)
Run as local-test
from local registry localhost:5000
docker run localhost:5000/jaegertracing/jaeger-es-index-cleaner:local-test
indexCleanerImage = "jaegertracing/jaeger-es-index-cleaner:local-test" | ||
rolloverImage = "jaegertracing/jaeger-es-rollover:local-test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indexCleanerImage = "jaegertracing/jaeger-es-index-cleaner:local-test" | |
rolloverImage = "jaegertracing/jaeger-es-rollover:local-test" | |
indexCleanerImage = "localhost:5000/jaegertracing/jaeger-es-index-cleaner:local-test" | |
rolloverImage = "localhost:5000/jaegertracing/jaeger-es-rollover:local-test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test