Skip to content

[Task Manager] Remove spaces plugin dependency in task manager plugin#221596

Merged
kowalczyk-krzysztof merged 5 commits intoelastic:mainfrom
kowalczyk-krzysztof:chore/taskmanager-remove-space-dependency
May 28, 2025
Merged

[Task Manager] Remove spaces plugin dependency in task manager plugin#221596
kowalczyk-krzysztof merged 5 commits intoelastic:mainfrom
kowalczyk-krzysztof:chore/taskmanager-remove-space-dependency

Conversation

@kowalczyk-krzysztof
Copy link
Copy Markdown
Member

@kowalczyk-krzysztof kowalczyk-krzysztof commented May 27, 2025

Summary

This PR removes spaces plugin dependency from task manager plugin and replaces spacesService.getActiveSpace with getSpaceIdFromPath from @kbn/spaces-utils package. This prevents a circular dependency from happening in #220138

Note

I'm changing the test case to use test-space id instead of testSpace as this was an invalid space id and it shouldn't have been used in the mock.

@kowalczyk-krzysztof kowalczyk-krzysztof self-assigned this May 27, 2025
@kowalczyk-krzysztof kowalczyk-krzysztof requested a review from a team as a code owner May 27, 2025 10:08
@kowalczyk-krzysztof kowalczyk-krzysztof added the release_note:skip Skip the PR/issue when compiling release notes label May 27, 2025
@kowalczyk-krzysztof kowalczyk-krzysztof requested a review from a team as a code owner May 27, 2025 10:08
@kowalczyk-krzysztof kowalczyk-krzysztof added Feature:Task Manager backport:skip This PR does not require backporting Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// labels May 27, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@kowalczyk-krzysztof kowalczyk-krzysztof marked this pull request as draft May 27, 2025 10:30
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

cc @kowalczyk-krzysztof

@kowalczyk-krzysztof kowalczyk-krzysztof marked this pull request as ready for review May 27, 2025 16:50
Copy link
Copy Markdown
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the cleanup!

Copy link
Copy Markdown
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

LGTM

@kowalczyk-krzysztof kowalczyk-krzysztof merged commit 017c2e5 into elastic:main May 28, 2025
11 checks passed
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
…elastic#221596)

## Summary

This PR removes spaces plugin dependency from task manager plugin and
replaces `spacesService.getActiveSpace` with `getSpaceIdFromPath` from
`@kbn/spaces-utils` package. This prevents a circular dependency from
happening in elastic#220138

> [!NOTE]  
> I'm changing the test case to use `test-space` id instead of
`testSpace` as this was an invalid space id and it shouldn't have been
used in the mock.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kowalczyk-krzysztof kowalczyk-krzysztof added backport:version Backport to applied version labels v8.19.0 and removed backport:skip This PR does not require backporting backport:version Backport to applied version labels labels Jun 3, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19

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

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [ResponseOps][TaskManager] Throw error if using generated encryption key to schedule tasks with user scope (#217790)

Manual backport

To create the backport manually run:

node scripts/backport --pr 221596

Questions ?

Please refer to the Backport tool documentation

@kowalczyk-krzysztof
Copy link
Copy Markdown
Member Author

💚 All backports created successfully

Status Branch Result
8.19

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

Questions ?

Please refer to the Backport tool documentation

kowalczyk-krzysztof added a commit to kowalczyk-krzysztof/kibana that referenced this pull request Jun 3, 2025
…elastic#221596)

## Summary

This PR removes spaces plugin dependency from task manager plugin and
replaces `spacesService.getActiveSpace` with `getSpaceIdFromPath` from
`@kbn/spaces-utils` package. This prevents a circular dependency from
happening in elastic#220138

> [!NOTE]
> I'm changing the test case to use `test-space` id instead of
`testSpace` as this was an invalid space id and it shouldn't have been
used in the mock.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 017c2e5)
kowalczyk-krzysztof added a commit that referenced this pull request Jun 3, 2025
… plugin (#221596) (#222355)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Task Manager] Remove spaces plugin dependency in task manager plugin
(#221596)](#221596)

<!--- Backport version: 10.0.0 -->

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

<!--BACKPORT [{"author":{"name":"Krzysztof
Kowalczyk","email":"krzysztof.kowalczyk@elastic.co"},"sourceCommit":{"committedDate":"2025-05-28T07:28:16Z","message":"[Task
Manager] Remove spaces plugin dependency in task manager plugin
(#221596)\n\n## Summary\n\nThis PR removes spaces plugin dependency from
task manager plugin and\nreplaces `spacesService.getActiveSpace` with
`getSpaceIdFromPath` from\n`@kbn/spaces-utils` package. This prevents a
circular dependency from\nhappening in
https://github.com/elastic/kibana/pull/220138\n\n> [!NOTE] \n> I'm
changing the test case to use `test-space` id instead of\n`testSpace` as
this was an invalid space id and it shouldn't have been\nused in the
mock.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"017c2e53f578d7da08616cca7cd4f9f920b5a571","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:Task
Manager","Team:ResponseOps","backport:version","v9.1.0","v8.19.0"],"title":"[Task
Manager] Remove spaces plugin dependency in task manager
plugin","number":221596,"url":"https://github.com/elastic/kibana/pull/221596","mergeCommit":{"message":"[Task
Manager] Remove spaces plugin dependency in task manager plugin
(#221596)\n\n## Summary\n\nThis PR removes spaces plugin dependency from
task manager plugin and\nreplaces `spacesService.getActiveSpace` with
`getSpaceIdFromPath` from\n`@kbn/spaces-utils` package. This prevents a
circular dependency from\nhappening in
https://github.com/elastic/kibana/pull/220138\n\n> [!NOTE] \n> I'm
changing the test case to use `test-space` id instead of\n`testSpace` as
this was an invalid space id and it shouldn't have been\nused in the
mock.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"017c2e53f578d7da08616cca7cd4f9f920b5a571"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221596","number":221596,"mergeCommit":{"message":"[Task
Manager] Remove spaces plugin dependency in task manager plugin
(#221596)\n\n## Summary\n\nThis PR removes spaces plugin dependency from
task manager plugin and\nreplaces `spacesService.getActiveSpace` with
`getSpaceIdFromPath` from\n`@kbn/spaces-utils` package. This prevents a
circular dependency from\nhappening in
https://github.com/elastic/kibana/pull/220138\n\n> [!NOTE] \n> I'm
changing the test case to use `test-space` id instead of\n`testSpace` as
this was an invalid space id and it shouldn't have been\nused in the
mock.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"017c2e53f578d7da08616cca7cd4f9f920b5a571"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
zacharyparikh pushed a commit to zacharyparikh/kibana that referenced this pull request Jun 4, 2025
…elastic#221596)

## Summary

This PR removes spaces plugin dependency from task manager plugin and
replaces `spacesService.getActiveSpace` with `getSpaceIdFromPath` from
`@kbn/spaces-utils` package. This prevents a circular dependency from
happening in elastic#220138

> [!NOTE]  
> I'm changing the test case to use `test-space` id instead of
`testSpace` as this was an invalid space id and it shouldn't have been
used in the mock.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kowalczyk-krzysztof kowalczyk-krzysztof deleted the chore/taskmanager-remove-space-dependency branch August 1, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Task Manager release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants