-
Notifications
You must be signed in to change notification settings - Fork 497
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
Make ArchiveTrace button auto-configurable #1944
Make ArchiveTrace button auto-configurable #1944
Conversation
8d947e7
to
501157e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
📢 Thoughts on this report? Let us know! |
## Which problem is this PR solving? - backend part of #4874 ## Description of the changes The button to archive a trace is now configured based on the state of the QueryService in addition to the UI configuration. It is now possible to request features from the QueryService to inject them into the UI. Related UI change jaegertracing/jaeger-ui#1944 ## How was this change tested? All corresponding tests have been updated. ## Checklist - [X] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [X] I have signed all commits - [X] I have added unit tests for the new functionality - [X] I have run lint and test steps successfully --------- Signed-off-by: Antonin Barthelemy <[email protected]> --------- Signed-off-by: Barthelemy Antonin <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>
14cb59b
to
7f269a6
Compare
I see the issue. This commit yurishkuro/jaeger@9f0e622 modifies the placeholder for the UI to look similar to the index.html in this UI PR. With that change if you run <title>Test Page</title>
| <!--
| This comment emulates the corresponding content in jaeger-ui/packages/jaeger-ui/index.html
| which contains placeholders that are replaced on load by the query service in order to customize
| the UI configuration.
|
| // JAEGER_CONFIG_JS
|
| JAEGER_CONFIG = DEFAULT_CONFIG;
|
| JAEGER_COMPATIBILITIES = DEFAULT_COMPATIBILITIES;
|
| JAEGER_VERSION = {"gitCommit":"","gitVersion":"","buildDate":""};
| --> Note that verison was replaced, but capabilities were not. It's because your regex pattern in the Go code is using different names than in the UI index.html Suggestion:
|
7f269a6
to
184438f
Compare
I think the best approach would be to separate the query service from the UI and have them communicate through an API. Currently, I don't see a way to ensure consistency between the backend and the UI without creating a house of cards. |
184438f
to
75e41d3
Compare
I trapped myself with the variable naming....
I will open a pull request for this change. |
75e41d3
to
a93c014
Compare
056a576
to
2bef1d9
Compare
let capabilities; | ||
let getJaegerStorageCapabilities; |
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 do these need to be made global within the tests instead of being local vars inside beforeEach function? Only embedded
is used in some tests.
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.
Alternatively, we should use capabilities in all the expected fields because when I read the tests, it is technically possible for it to be overridden by a field in embedded.
ex: 'gives precedence to non-objects in embedded'
I have implemented the suggestions you had made. |
2bef1d9
to
a924197
Compare
a924197
to
86c8cb3
Compare
- Resolves #4874 The button to archive a trace is now configured based on the state of the QueryService in addition to the UI configuration. All corresponding tests have been updated. - [X] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [X] I have signed all commits - [X] I have added unit tests for the new functionality - [X] I have run lint and test steps successfully --------- Signed-off-by: Barthelemy Antonin <[email protected]>
86c8cb3
to
676c671
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!
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
The button to archive a trace is now configured based on the state of
the QueryService in addition to the UI configuration.
All corresponding tests have been updated.
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
Signed-off-by: Barthelemy Antonin [email protected]