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

POST data_view with overwrite recieves 400 error #161016

Closed
neiljbrookes opened this issue Jun 30, 2023 · 1 comment · Fixed by #160953
Closed

POST data_view with overwrite recieves 400 error #161016

neiljbrookes opened this issue Jun 30, 2023 · 1 comment · Fixed by #160953
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@neiljbrookes
Copy link

Kibana version:
8.8.1

Elasticsearch version:
8.8.1

Server OS version:

Browser version:

Browser OS version:

Original install method (e.g. download page, yum, from source, etc.):

Describe the bug:
Under some circumstances passing override to POST /api/data_views/data_view would fail

Steps to reproduce:

  1. Attempt to overwrite a data view
POST /api/data_views/data_view
{
	"override": true,
	"data_view": {
		"id": "logs-*",
		"name": "logs-* (CCS)",
		"title": "logs-*,*:logs-*"
	}
}
  1. Recieve error
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "Saved object [index-pattern/logs-*] conflict"
}

Expected behavior:

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

@neiljbrookes neiljbrookes added the bug Fixes for quality problems that affect the customer experience label Jun 30, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Jun 30, 2023
@wayneseymour wayneseymour added the Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. label Jun 30, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jun 30, 2023
mattkime added a commit that referenced this issue Jul 4, 2023
## Summary

Under some circumstances passing `override` to `POST
/api/data_views/data_view` would fail. Its now fixed.

To test - Try using the override param from the Kibana dev console. I
found it reproduced the problem before the fix and shows its resolved
after the fix. The problem did not appear in the integration tests.

I suspect the problem had to do with how quickly the delete was
performed - if it completed before the create command then everything
was fine. If it didn't then the error would appear. Passing the
overwrite param to the saved object client eliminates the possibility of
the delete failing to complete.

Closes #161016
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jul 4, 2023
## Summary

Under some circumstances passing `override` to `POST
/api/data_views/data_view` would fail. Its now fixed.

To test - Try using the override param from the Kibana dev console. I
found it reproduced the problem before the fix and shows its resolved
after the fix. The problem did not appear in the integration tests.

I suspect the problem had to do with how quickly the delete was
performed - if it completed before the create command then everything
was fine. If it didn't then the error would appear. Passing the
overwrite param to the saved object client eliminates the possibility of
the delete failing to complete.

Closes elastic#161016

(cherry picked from commit 803d139)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants