Skip to content
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] Fix call to service api #203451

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

crespocarlos
Copy link
Contributor

@crespocarlos crespocarlos commented Dec 9, 2024

fixes 203389

Summary

Fix the call to /api/infra/services when using a relative date range

service_api_relative_date_range

How to test

  • Navigate to host detail view, and change the data picker to use relative dates
  • Click on Submit

@crespocarlos crespocarlos added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team backport:version Backport to applied version labels v8.17.0 release_note:skip Skip the PR/issue when compiling release notes labels Dec 9, 2024
@crespocarlos
Copy link
Contributor Author

/ci

@crespocarlos crespocarlos marked this pull request as ready for review December 9, 2024 16:53
@crespocarlos crespocarlos requested a review from a team as a code owner December 9, 2024 16:53
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

Copy link
Member

@jennypavlova jennypavlova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code LGTM, just some nits/questions ⬇️

const params = useMemo(
() => ({
filters: { [HOST_NAME_FIELD]: hostName },
from: dateRange.from,
to: dateRange.to,
from: parsedDateRange.from,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: As we use both from and to we can simply use ...parsedDateRange here, wdyt?

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Dec 9, 2024
Copy link
Contributor

github-actions bot commented Dec 9, 2024

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 10, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: cb415b3
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-203451-cb415b33a3b3

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
infra 1538 1539 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
infra 1.8MB 1.8MB +240.0B

History

@crespocarlos crespocarlos merged commit 1a20fda into elastic:main Dec 10, 2024
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12257218461

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 10, 2024
fixes [203389](elastic#203389)
## Summary

Fix the call to `/api/infra/services` when using a relative date range

![service_api_relative_date_range](https://github.com/user-attachments/assets/772bba2c-07c8-4031-8d8a-61bdc7ab6d70)

### How to test
- Navigate to host detail view, and change the data picker to use
relative dates
- Click on Submit

(cherry picked from commit 1a20fda)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 10, 2024
fixes [203389](elastic#203389)
## Summary

Fix the call to `/api/infra/services` when using a relative date range

![service_api_relative_date_range](https://github.com/user-attachments/assets/772bba2c-07c8-4031-8d8a-61bdc7ab6d70)

### How to test
- Navigate to host detail view, and change the data picker to use
relative dates
- Click on Submit

(cherry picked from commit 1a20fda)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 Backport failed because of merge conflicts
8.17
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 203451

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 10, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Infra] Fix call to service api
(#203451)](#203451)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-10T13:33:32Z","message":"[Infra]
Fix call to service api (#203451)\n\nfixes
[203389](https://github.com/elastic/kibana/issues/203389)\r\n##
Summary\r\n\r\nFix the call to `/api/infra/services` when using a
relative date
range\r\n\r\n\r\n![service_api_relative_date_range](https://github.com/user-attachments/assets/772bba2c-07c8-4031-8d8a-61bdc7ab6d70)\r\n\r\n\r\n###
How to test\r\n- Navigate to host detail view, and change the data
picker to use\r\nrelative dates\r\n- Click on
Submit","sha":"1a20fda7021fa49d054c19d4757592dda385f5de","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","backport:version","v8.17.0","v8.16.2"],"title":"[Infra]
Fix call to service
api","number":203451,"url":"https://github.com/elastic/kibana/pull/203451","mergeCommit":{"message":"[Infra]
Fix call to service api (#203451)\n\nfixes
[203389](https://github.com/elastic/kibana/issues/203389)\r\n##
Summary\r\n\r\nFix the call to `/api/infra/services` when using a
relative date
range\r\n\r\n\r\n![service_api_relative_date_range](https://github.com/user-attachments/assets/772bba2c-07c8-4031-8d8a-61bdc7ab6d70)\r\n\r\n\r\n###
How to test\r\n- Navigate to host detail view, and change the data
picker to use\r\nrelative dates\r\n- Click on
Submit","sha":"1a20fda7021fa49d054c19d4757592dda385f5de"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203451","number":203451,"mergeCommit":{"message":"[Infra]
Fix call to service api (#203451)\n\nfixes
[203389](https://github.com/elastic/kibana/issues/203389)\r\n##
Summary\r\n\r\nFix the call to `/api/infra/services` when using a
relative date
range\r\n\r\n\r\n![service_api_relative_date_range](https://github.com/user-attachments/assets/772bba2c-07c8-4031-8d8a-61bdc7ab6d70)\r\n\r\n\r\n###
How to test\r\n- Navigate to host detail view, and change the data
picker to use\r\nrelative dates\r\n- Click on
Submit","sha":"1a20fda7021fa49d054c19d4757592dda385f5de"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <[email protected]>
kibanamachine added a commit that referenced this pull request Dec 10, 2024
# Backport

This will backport the following commits from `main` to `8.17`:
- [[Infra] Fix call to service api
(#203451)](#203451)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-10T13:33:32Z","message":"[Infra]
Fix call to service api (#203451)\n\nfixes
[203389](https://github.com/elastic/kibana/issues/203389)\r\n##
Summary\r\n\r\nFix the call to `/api/infra/services` when using a
relative date
range\r\n\r\n\r\n![service_api_relative_date_range](https://github.com/user-attachments/assets/772bba2c-07c8-4031-8d8a-61bdc7ab6d70)\r\n\r\n\r\n###
How to test\r\n- Navigate to host detail view, and change the data
picker to use\r\nrelative dates\r\n- Click on
Submit","sha":"1a20fda7021fa49d054c19d4757592dda385f5de","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","backport:version","v8.17.0","v8.16.2"],"title":"[Infra]
Fix call to service
api","number":203451,"url":"https://github.com/elastic/kibana/pull/203451","mergeCommit":{"message":"[Infra]
Fix call to service api (#203451)\n\nfixes
[203389](https://github.com/elastic/kibana/issues/203389)\r\n##
Summary\r\n\r\nFix the call to `/api/infra/services` when using a
relative date
range\r\n\r\n\r\n![service_api_relative_date_range](https://github.com/user-attachments/assets/772bba2c-07c8-4031-8d8a-61bdc7ab6d70)\r\n\r\n\r\n###
How to test\r\n- Navigate to host detail view, and change the data
picker to use\r\nrelative dates\r\n- Click on
Submit","sha":"1a20fda7021fa49d054c19d4757592dda385f5de"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203451","number":203451,"mergeCommit":{"message":"[Infra]
Fix call to service api (#203451)\n\nfixes
[203389](https://github.com/elastic/kibana/issues/203389)\r\n##
Summary\r\n\r\nFix the call to `/api/infra/services` when using a
relative date
range\r\n\r\n\r\n![service_api_relative_date_range](https://github.com/user-attachments/assets/772bba2c-07c8-4031-8d8a-61bdc7ab6d70)\r\n\r\n\r\n###
How to test\r\n- Navigate to host detail view, and change the data
picker to use\r\nrelative dates\r\n- Click on
Submit","sha":"1a20fda7021fa49d054c19d4757592dda385f5de"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
fixes [203389](elastic#203389)
## Summary

Fix the call to `/api/infra/services` when using a relative date range


![service_api_relative_date_range](https://github.com/user-attachments/assets/772bba2c-07c8-4031-8d8a-61bdc7ab6d70)


### How to test
- Navigate to host detail view, and change the data picker to use
relative dates
- Click on Submit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.16.2 v8.17.0 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[infra] Services endpoint error when auto-refresh is enabled
4 participants