Adds dependencies test#17
Merged
codefromthecrypt merged 2 commits intomasterfrom Feb 21, 2024
Merged
Conversation
This adds a dependencies test, which will need further refactoring to support storage types that require dependency-aggregation. However, this works and keeps the first pass small. Signed-off-by: Adrian Cole <[email protected]>
| - > | ||
| while ! wget -q --spider http://{{ include "zipkin.fullname" . }}:8081/health;do sleep 1; done && | ||
| for i in 1 2 3;do wget -q --spider http://{{ include "zipkin.fullname" . }}:8081; done | ||
| - name: get-dependencies |
Member
Author
There was a problem hiding this comment.
The follow-up is.. we'll need a conditional here to invoke the dependencies cron job synchronously, when elasticsearch.
Signed-off-by: Adrian Cole <[email protected]>
| # Make sure zipkin registered in Eureka at startup | ||
| args: [ 'wget -q --spider http://{{ include "zipkin.fullname" . }}:8761/eureka/v2/apps/ZIPKIN' ] | ||
| {{- end }} | ||
| {{ if .Values.global.testDependencies }} |
Member
Author
There was a problem hiding this comment.
used a global here as cycling through a list of objects to pick if "frontend" is there, is quite complicated in helm. maps are easier than lists
| echo '[{"parent":"frontend","child":"backend","callCount":3}]' > want.json && | ||
| sleep 3 && | ||
| wget -qO have.json --header "b3: 0" http://{{ include "zipkin.fullname" . }}:{{ .Values.service.port }}/api/v2/dependencies?endTs=$(( $(date +%s) * 1000 )) && | ||
| diff -b want.json have.json |
Member
Author
There was a problem hiding this comment.
yes I code go ;)
anuraaga
approved these changes
Feb 21, 2024
| echo '[{"parent":"frontend","child":"backend","callCount":3}]' > want.json && | ||
| sleep 3 && | ||
| wget -qO have.json --header "b3: 0" http://{{ include "zipkin.fullname" . }}:{{ .Values.service.port }}/api/v2/dependencies?endTs=$(( $(date +%s) * 1000 )) && | ||
| diff -b want.json have.json |
There was a problem hiding this comment.
Suggested change
| diff -b want.json have.json | |
| diff -b want.json got.json |
Just kidding
Member
Author
There was a problem hiding this comment.
haha true.. I'm not that go ;)
Member
Author
|
thanks for the look @anuraaga! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a dependencies test, which will need further refactoring to support storage types that require dependency-aggregation. However, this works and keeps the first pass small.