-
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
Create sampling templates when creating sampling store #5349
Create sampling templates when creating sampling store #5349
Conversation
1f2d4c6
to
4e8c627
Compare
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!
The full scope of this ticket includes:
- adding tests to validate this change
- changing existing integration test that manually creates the mapping to not do that and instead rely on this new built-in behavior
Question: what happens if the mapping already exists?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5349 +/- ##
==========================================
- Coverage 95.21% 95.19% -0.03%
==========================================
Files 343 343
Lines 16782 16785 +3
==========================================
- Hits 15979 15978 -1
- Misses 605 608 +3
- Partials 198 199 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
d9150b1
to
5c5c5b5
Compare
@yurishkuro Apologies for the delayed response. I've refactored the integration test to utilize the CreateSamplingStore method instead of manual creation. When mapping was already created and SamplingStore is created again via CreateSamplingStore, this could result the existing indexes or entire indexes becoming unsearchable depending on the compatibility between existing and new index template. I think there are several strategies.
|
for some reason this test consistently fails in your branch, while always succeeds in main:
|
why is that? doesn't CreateSamplingStore create different index templates? It should not be affecting span templates. |
It appears that the template ID is hardcoded as jaeger-sampling. Am I interpreting this correctly? |
seeing this failure
|
@Pushkarm029 this is the PR I was referring to. |
@JaeguKim could you please rebase? |
b483056
to
a388e20
Compare
@yurishkuro I rebased! |
07324e2
to
253dc56
Compare
@@ -299,6 +299,7 @@ func (s *StorageIntegration) testFindTraces(t *testing.T) { | |||
} | |||
expectedTracesPerTestCase = append(expectedTracesPerTestCase, expected) | |||
} | |||
time.Sleep(time.Second) |
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.
@yurishkuro I attempted to address the test failure occurring with ES7 by incorporating t.Parallel() to ensure the test keeps retrying until 100 seconds have elapsed. Despite this effort, the test continued to fail. While I understand that relying on time.Sleep is not ideal, I don't know other alternative solutions for now.
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.
Sleep alone is not a reliable mechanism to deal with concurrency, retries are. We already have sleep inside waitForCondition
, which is used by findTracesByQuery
called in this test. Why doesn't that work?
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.
It turns out that the retry condition in waitForCondition
was incorrect. The retry condition should match not only the trace count but also the span count. I addressed this issue in commit 8c8f2e3. I'm curious why the test only fails intermittently when using other ES versions.
Signed-off-by: JaegooKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
inline CreateTemplates function,improve naming Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Wrap error with message, improve naming Signed-off-by: JaeguKim <[email protected]>
Pass flags to factory Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Refactor code Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
…n integration test Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
…ing es7. Signed-off-by: JaeguKim <[email protected]>
Signed-off-by: JaeguKim <[email protected]>
8c8f2e3
to
b48c349
Compare
Thanks! |
I think we still get this error. Because |
yeah, we should add this to integration test |
…#5349) ## Which problem is this PR solving? - Resolves jaegertracing#5333 ## Description of the changes - Create sampling templates when creating sampling store since doing so is intended. ## How was this change tested? - CI ## 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`: `yarn lint` and `yarn test` --------- Signed-off-by: JaeguKim <[email protected]> Signed-off-by: Vamshi Maskuri <[email protected]>
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