-
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
[BUG] lost update while concurrent synthetics private location API calls #190801
Labels
bug
Fixes for quality problems that affect the customer experience
Team:obs-ux-management
Observability Management User Experience Team
Comments
biscout42
added a commit
to elastic/terraform-provider-elasticstack
that referenced
this issue
Aug 21, 2024
) * fix: move all resources in one namespace for tcp monitor acc tests * add mutex in kibana API client and move tests to same package to run test in single golang process due-to elastic/kibana#190801
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
@jughosta Synthetics is owned by @elastic/obs-ux-management-team. I'll add the team label. |
shahzad31
added a commit
that referenced
this issue
Nov 7, 2024
## Summary Fixes #190801 !! Handle private locations simultaneous edits !! Registered a new saved object to handle private locations properly. Instead of using a singleton, now each private location will be represented by it's own saved object. ### Existing private locations When we are doing any write operation, we migrate them to new kind of saved object and remove the legacy saved object type. ### Testing - Create multiple private locations on main - Switch to branch and create few more locations - Make sure all private locations are editable, deleteable and have been migrated to new saved object types in the course --------- Co-authored-by: kibanamachine <[email protected]>
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this issue
Nov 7, 2024
…195874) ## Summary Fixes elastic#190801 !! Handle private locations simultaneous edits !! Registered a new saved object to handle private locations properly. Instead of using a singleton, now each private location will be represented by it's own saved object. ### Existing private locations When we are doing any write operation, we migrate them to new kind of saved object and remove the legacy saved object type. ### Testing - Create multiple private locations on main - Switch to branch and create few more locations - Make sure all private locations are editable, deleteable and have been migrated to new saved object types in the course --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 96c9b5b)
kibanamachine
added a commit
that referenced
this issue
Nov 7, 2024
…95874) (#199387) # Backport This will backport the following commits from `main` to `8.x`: - [[Synthetics] Handle private locations simultaneous edits !! (#195874)](#195874) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-07T21:31:09Z","message":"[Synthetics] Handle private locations simultaneous edits !! (#195874)\n\n## Summary\r\n\r\nFixes #190801 !!\r\n\r\nHandle private locations simultaneous edits !! \r\n\r\nRegistered a new saved object to handle private locations properly.\r\nInstead of using a singleton, now each private location will be\r\nrepresented by it's own saved object.\r\n\r\n### Existing private locations\r\nWhen we are doing any write operation, we migrate them to new kind of\r\nsaved object and remove the legacy saved object type.\r\n\r\n\r\n### Testing\r\n\r\n- Create multiple private locations on main \r\n- Switch to branch and create few more locations\r\n- Make sure all private locations are editable, deleteable and have been\r\nmigrated to new saved object types in the course\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"96c9b5b5d0a82c6e4b0a9b86fc1ab4dd9fa4d707","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management"],"title":"[Synthetics] Handle private locations simultaneous edits !!","number":195874,"url":"https://github.com/elastic/kibana/pull/195874","mergeCommit":{"message":"[Synthetics] Handle private locations simultaneous edits !! (#195874)\n\n## Summary\r\n\r\nFixes #190801 !!\r\n\r\nHandle private locations simultaneous edits !! \r\n\r\nRegistered a new saved object to handle private locations properly.\r\nInstead of using a singleton, now each private location will be\r\nrepresented by it's own saved object.\r\n\r\n### Existing private locations\r\nWhen we are doing any write operation, we migrate them to new kind of\r\nsaved object and remove the legacy saved object type.\r\n\r\n\r\n### Testing\r\n\r\n- Create multiple private locations on main \r\n- Switch to branch and create few more locations\r\n- Make sure all private locations are editable, deleteable and have been\r\nmigrated to new saved object types in the course\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"96c9b5b5d0a82c6e4b0a9b86fc1ab4dd9fa4d707"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195874","number":195874,"mergeCommit":{"message":"[Synthetics] Handle private locations simultaneous edits !! (#195874)\n\n## Summary\r\n\r\nFixes #190801 !!\r\n\r\nHandle private locations simultaneous edits !! \r\n\r\nRegistered a new saved object to handle private locations properly.\r\nInstead of using a singleton, now each private location will be\r\nrepresented by it's own saved object.\r\n\r\n### Existing private locations\r\nWhen we are doing any write operation, we migrate them to new kind of\r\nsaved object and remove the legacy saved object type.\r\n\r\n\r\n### Testing\r\n\r\n- Create multiple private locations on main \r\n- Switch to branch and create few more locations\r\n- Make sure all private locations are editable, deleteable and have been\r\nmigrated to new saved object types in the course\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"96c9b5b5d0a82c6e4b0a9b86fc1ab4dd9fa4d707"}}]}] BACKPORT--> Co-authored-by: Shahzad <[email protected]>
mbondyra
pushed a commit
to mbondyra/kibana
that referenced
this issue
Nov 8, 2024
…195874) ## Summary Fixes elastic#190801 !! Handle private locations simultaneous edits !! Registered a new saved object to handle private locations properly. Instead of using a singleton, now each private location will be represented by it's own saved object. ### Existing private locations When we are doing any write operation, we migrate them to new kind of saved object and remove the legacy saved object type. ### Testing - Create multiple private locations on main - Switch to branch and create few more locations - Make sure all private locations are editable, deleteable and have been migrated to new saved object types in the course --------- Co-authored-by: kibanamachine <[email protected]>
CAWilson94
pushed a commit
to CAWilson94/kibana
that referenced
this issue
Nov 8, 2024
…195874) ## Summary Fixes elastic#190801 !! Handle private locations simultaneous edits !! Registered a new saved object to handle private locations properly. Instead of using a singleton, now each private location will be represented by it's own saved object. ### Existing private locations When we are doing any write operation, we migrate them to new kind of saved object and remove the legacy saved object type. ### Testing - Create multiple private locations on main - Switch to branch and create few more locations - Make sure all private locations are editable, deleteable and have been migrated to new saved object types in the course --------- Co-authored-by: kibanamachine <[email protected]>
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:obs-ux-management
Observability Management User Experience Team
Kibana version:
8.14.3
,8.15.0
Elasticsearch version:
8.14.3
,8.15.0
Original install method (e.g. download page, yum, from source, etc.):
Docker compose
Describe the bug:
Two concurrent private location create requests leads to first of them is lost.
In case of concurrent tests which create private locations, one of the locations is lost. Here is an example of kibana debug log:
After that follow-up request for private location
monitor-pll-kuooipy79h3a3gnw2wydly
fails. In this example it happened with an attempt to create a monitor for this private location (see error below), and I have another tests, where follow-up request GET/api/synthetics/private_locations/locationId
fails with 404.Error example:
API client sees correct
200
reply after creatingmonitor-pll-kuooipy79h3a3gnw2wydly
private location in the example above (via POST, with all its details in the body)Steps to reproduce:
POST /api/synthetics/private_locations
requests concurrently.GET /api/synthetics/private_locations/location_id
for each of created locationsExpected behavior:
All private locations exist in Kibana in case of concurrent POST requests.
Provide logs and/or server output (if relevant):
see above
Any additional context:
The root cause could be in our private location API implementation, which uses a single saved object to keep track of private locations.
The text was updated successfully, but these errors were encountered: