-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Infra] Create endpoint to verify if there is data #189470
[Infra] Create endpoint to verify if there is data #189470
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
bcdcc36
to
b4d2a7d
Compare
b4d2a7d
to
be1770b
Compare
/ci |
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
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.
LGTM
.expect(expectedHttpStatusCode); | ||
}; | ||
|
||
before(() => patchRequest({ name: 'default', metricAlias: 'metrics-*,metricbeat-*' })); |
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've seen much code in our repo that does this syntax, dropping the async / await.
Is there no worry of a timing 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.
it returns a promise, jest should recognize it as an async operation a treat it accordingly
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.
Indeed, thanks for sharing your perspective.
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.
One question, can you tell me which Jest config this test is apart of?
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.
LGTM Code review only.
I'm still confused why we are required as code owners when it is set to:
/x-pack/test/api_integration/apis/infra @elastic/obs-ux-infra_services-team
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.
Just one nit.
closes 189247
Summary
Create an endpoint to return whether there is data for modules passed via
modules
query param. Whenmodules
is not passed, the query will just check if there is any data in the index patterns configured in the Settings pageHow to test
node scripts/synthtrace infra_hosts_with_apm_hosts --live
GET kbn:/api/metrics/source/hasData?modules=kubernetes&modules=system
GET kbn:/api/metrics/source/hasData?modules=system
GET kbn:/api/metrics/source/hasData?modules=kubernetes&modules=system&modules=kafka&modules=aws&modules=azure
- should return 400GET kbn:/api/metrics/source/hasData