Conversation
4 tasks
shahzad31
added a commit
to elastic/kibana
that referenced
this pull request
Jul 21, 2025
## Summary Follow up to #221568 This PR allows specifying spaces param in project monitors. Following use-cases have been supported User will be able to supports `spaces: ["defautl", "test"] ` Proper API tests have been added to provide additional coverage for the use-case. ### Validations - [ ] The route to which project api is being called should always be part of spaces if defined. - [ ] Non existent space will throw error - [ ] User must have permission to all specified spaces for CRUDS - [ ] User can also specify * to create monitors in all spaces ### PR Testing You can use following project monitors PR to test this PR elastic/synthetics#1052 First create few project monitors before this branch and then switch and specify multi spaces as part of the options and verify in UI that editing , adding and deletion works as expected on push command.
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jul 21, 2025
## Summary Follow up to elastic#221568 This PR allows specifying spaces param in project monitors. Following use-cases have been supported User will be able to supports `spaces: ["defautl", "test"] ` Proper API tests have been added to provide additional coverage for the use-case. ### Validations - [ ] The route to which project api is being called should always be part of spaces if defined. - [ ] Non existent space will throw error - [ ] User must have permission to all specified spaces for CRUDS - [ ] User can also specify * to create monitors in all spaces ### PR Testing You can use following project monitors PR to test this PR elastic/synthetics#1052 First create few project monitors before this branch and then switch and specify multi spaces as part of the options and verify in UI that editing , adding and deletion works as expected on push command. (cherry picked from commit 39d87d0)
kibanamachine
added a commit
to elastic/kibana
that referenced
this pull request
Jul 21, 2025
# Backport This will backport the following commits from `main` to `9.1`: - [[Synthetics] Support projects multi spaces !! (#227674)](#227674) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2025-07-21T07:52:26Z","message":"[Synthetics] Support projects multi spaces !! (#227674)\n\n## Summary\n\nFollow up to https://github.com/elastic/kibana/pull/221568\n\nThis PR allows specifying spaces param in project monitors. \n\nFollowing use-cases have been supported\n\nUser will be able to supports \n\n`spaces: [\"defautl\", \"test\"]\n`\n\nProper API tests have been added to provide additional coverage for the\nuse-case.\n\n### Validations\n\n- [ ] The route to which project api is being called should always be\npart of spaces if defined.\n- [ ] Non existent space will throw error \n- [ ] User must have permission to all specified spaces for CRUDS\n- [ ] User can also specify * to create monitors in all spaces\n\n\n### PR Testing\nYou can use following project monitors PR to test this PR\nhttps://github.com/elastic/synthetics/pull/1052\n\n\nFirst create few project monitors before this branch and then switch and\nspecify multi spaces as part of the options and verify in UI that\nediting , adding and deletion works as expected on push command.","sha":"39d87d0f908f0d1bbe7e1a29c588f3d8ea045da1","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:feature","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0","author:obs-ux-management","v9.2.0"],"title":"[Synthetics] Support projects multi spaces !!","number":227674,"url":"https://github.com/elastic/kibana/pull/227674","mergeCommit":{"message":"[Synthetics] Support projects multi spaces !! (#227674)\n\n## Summary\n\nFollow up to https://github.com/elastic/kibana/pull/221568\n\nThis PR allows specifying spaces param in project monitors. \n\nFollowing use-cases have been supported\n\nUser will be able to supports \n\n`spaces: [\"defautl\", \"test\"]\n`\n\nProper API tests have been added to provide additional coverage for the\nuse-case.\n\n### Validations\n\n- [ ] The route to which project api is being called should always be\npart of spaces if defined.\n- [ ] Non existent space will throw error \n- [ ] User must have permission to all specified spaces for CRUDS\n- [ ] User can also specify * to create monitors in all spaces\n\n\n### PR Testing\nYou can use following project monitors PR to test this PR\nhttps://github.com/elastic/synthetics/pull/1052\n\n\nFirst create few project monitors before this branch and then switch and\nspecify multi spaces as part of the options and verify in UI that\nediting , adding and deletion works as expected on push command.","sha":"39d87d0f908f0d1bbe7e1a29c588f3d8ea045da1"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227674","number":227674,"mergeCommit":{"message":"[Synthetics] Support projects multi spaces !! (#227674)\n\n## Summary\n\nFollow up to https://github.com/elastic/kibana/pull/221568\n\nThis PR allows specifying spaces param in project monitors. \n\nFollowing use-cases have been supported\n\nUser will be able to supports \n\n`spaces: [\"defautl\", \"test\"]\n`\n\nProper API tests have been added to provide additional coverage for the\nuse-case.\n\n### Validations\n\n- [ ] The route to which project api is being called should always be\npart of spaces if defined.\n- [ ] Non existent space will throw error \n- [ ] User must have permission to all specified spaces for CRUDS\n- [ ] User can also specify * to create monitors in all spaces\n\n\n### PR Testing\nYou can use following project monitors PR to test this PR\nhttps://github.com/elastic/synthetics/pull/1052\n\n\nFirst create few project monitors before this branch and then switch and\nspecify multi spaces as part of the options and verify in UI that\nediting , adding and deletion works as expected on push command.","sha":"39d87d0f908f0d1bbe7e1a29c588f3d8ea045da1"}}]}] BACKPORT--> Co-authored-by: Shahzad <shahzad31comp@gmail.com>
shahzad31
commented
Jul 21, 2025
Member
vigneshshanmugam
left a comment
There was a problem hiding this comment.
I am bit confused as we use space specific URL format when pushing the monitors to Kibana -
Line 149 in 1e444dc
But now, with this change how its a bit awkward, What happens to the URL format- would it be pushed to /default/ kibana endpoint?
src/core/runner.ts
Outdated
| (journey.cb ?? journey.callback)({ params: options.params } as any); | ||
| const monitor = journey.monitor ?? journey?._getMonitor(); | ||
| monitor.update(this.#monitor?.config); | ||
| monitor.setSpaces( |
Member
There was a problem hiding this comment.
This should not be required as the .update call should handle the changes from the config. Please check once.
shahzad31
added a commit
to elastic/kibana
that referenced
this pull request
Jul 22, 2025
# Backport This will backport the following commits from `main` to `8.19`: - [[Synthetics] Support projects multi spaces !! (#227674)](#227674) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2025-07-21T07:52:26Z","message":"[Synthetics] Support projects multi spaces !! (#227674)\n\n## Summary\n\nFollow up to https://github.com/elastic/kibana/pull/221568\n\nThis PR allows specifying spaces param in project monitors. \n\nFollowing use-cases have been supported\n\nUser will be able to supports \n\n`spaces: [\"defautl\", \"test\"]\n`\n\nProper API tests have been added to provide additional coverage for the\nuse-case.\n\n### Validations\n\n- [ ] The route to which project api is being called should always be\npart of spaces if defined.\n- [ ] Non existent space will throw error \n- [ ] User must have permission to all specified spaces for CRUDS\n- [ ] User can also specify * to create monitors in all spaces\n\n\n### PR Testing\nYou can use following project monitors PR to test this PR\nhttps://github.com/elastic/synthetics/pull/1052\n\n\nFirst create few project monitors before this branch and then switch and\nspecify multi spaces as part of the options and verify in UI that\nediting , adding and deletion works as expected on push command.","sha":"39d87d0f908f0d1bbe7e1a29c588f3d8ea045da1","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:feature","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0","author:obs-ux-management","v9.2.0"],"title":"[Synthetics] Support projects multi spaces !!","number":227674,"url":"https://github.com/elastic/kibana/pull/227674","mergeCommit":{"message":"[Synthetics] Support projects multi spaces !! (#227674)\n\n## Summary\n\nFollow up to https://github.com/elastic/kibana/pull/221568\n\nThis PR allows specifying spaces param in project monitors. \n\nFollowing use-cases have been supported\n\nUser will be able to supports \n\n`spaces: [\"defautl\", \"test\"]\n`\n\nProper API tests have been added to provide additional coverage for the\nuse-case.\n\n### Validations\n\n- [ ] The route to which project api is being called should always be\npart of spaces if defined.\n- [ ] Non existent space will throw error \n- [ ] User must have permission to all specified spaces for CRUDS\n- [ ] User can also specify * to create monitors in all spaces\n\n\n### PR Testing\nYou can use following project monitors PR to test this PR\nhttps://github.com/elastic/synthetics/pull/1052\n\n\nFirst create few project monitors before this branch and then switch and\nspecify multi spaces as part of the options and verify in UI that\nediting , adding and deletion works as expected on push command.","sha":"39d87d0f908f0d1bbe7e1a29c588f3d8ea045da1"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/228725","number":228725,"state":"OPEN"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227674","number":227674,"mergeCommit":{"message":"[Synthetics] Support projects multi spaces !! (#227674)\n\n## Summary\n\nFollow up to https://github.com/elastic/kibana/pull/221568\n\nThis PR allows specifying spaces param in project monitors. \n\nFollowing use-cases have been supported\n\nUser will be able to supports \n\n`spaces: [\"defautl\", \"test\"]\n`\n\nProper API tests have been added to provide additional coverage for the\nuse-case.\n\n### Validations\n\n- [ ] The route to which project api is being called should always be\npart of spaces if defined.\n- [ ] Non existent space will throw error \n- [ ] User must have permission to all specified spaces for CRUDS\n- [ ] User can also specify * to create monitors in all spaces\n\n\n### PR Testing\nYou can use following project monitors PR to test this PR\nhttps://github.com/elastic/synthetics/pull/1052\n\n\nFirst create few project monitors before this branch and then switch and\nspecify multi spaces as part of the options and verify in UI that\nediting , adding and deletion works as expected on push command.","sha":"39d87d0f908f0d1bbe7e1a29c588f3d8ea045da1"}}]}] BACKPORT--> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Bluefinger
pushed a commit
to Bluefinger/kibana
that referenced
this pull request
Jul 22, 2025
## Summary Follow up to elastic#221568 This PR allows specifying spaces param in project monitors. Following use-cases have been supported User will be able to supports `spaces: ["defautl", "test"] ` Proper API tests have been added to provide additional coverage for the use-case. ### Validations - [ ] The route to which project api is being called should always be part of spaces if defined. - [ ] Non existent space will throw error - [ ] User must have permission to all specified spaces for CRUDS - [ ] User can also specify * to create monitors in all spaces ### PR Testing You can use following project monitors PR to test this PR elastic/synthetics#1052 First create few project monitors before this branch and then switch and specify multi spaces as part of the options and verify in UI that editing , adding and deletion works as expected on push command.
kertal
pushed a commit
to kertal/kibana
that referenced
this pull request
Jul 25, 2025
## Summary Follow up to elastic#221568 This PR allows specifying spaces param in project monitors. Following use-cases have been supported User will be able to supports `spaces: ["defautl", "test"] ` Proper API tests have been added to provide additional coverage for the use-case. ### Validations - [ ] The route to which project api is being called should always be part of spaces if defined. - [ ] Non existent space will throw error - [ ] User must have permission to all specified spaces for CRUDS - [ ] User can also specify * to create monitors in all spaces ### PR Testing You can use following project monitors PR to test this PR elastic/synthetics#1052 First create few project monitors before this branch and then switch and specify multi spaces as part of the options and verify in UI that editing , adding and deletion works as expected on push command.
crespocarlos
pushed a commit
to crespocarlos/kibana
that referenced
this pull request
Jul 25, 2025
## Summary Follow up to elastic#221568 This PR allows specifying spaces param in project monitors. Following use-cases have been supported User will be able to supports `spaces: ["defautl", "test"] ` Proper API tests have been added to provide additional coverage for the use-case. ### Validations - [ ] The route to which project api is being called should always be part of spaces if defined. - [ ] Non existent space will throw error - [ ] User must have permission to all specified spaces for CRUDS - [ ] User can also specify * to create monitors in all spaces ### PR Testing You can use following project monitors PR to test this PR elastic/synthetics#1052 First create few project monitors before this branch and then switch and specify multi spaces as part of the options and verify in UI that editing , adding and deletion works as expected on push command.
emilioalvap
approved these changes
Jul 28, 2025
This was referenced Aug 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To test the PR
You can create a dummy project and point it to the source of the directory like this
then you can specify spaces as an option in config or individula monitors using monitor.use
spaces in lightweight are also supported
Notes