Skip to content

[ResponseOps][Connectors] Keep the channel ID when editing an existing Slack connector#247098

Merged
cnasikas merged 2 commits intoelastic:mainfrom
cnasikas:slack_bug_fixes
Dec 19, 2025
Merged

[ResponseOps][Connectors] Keep the channel ID when editing an existing Slack connector#247098
cnasikas merged 2 commits intoelastic:mainfrom
cnasikas:slack_bug_fixes

Conversation

@cnasikas
Copy link
Copy Markdown
Member

@cnasikas cnasikas commented Dec 19, 2025

Summary

PR #245423 simplified a lot the logic of the Slack connector regarding channels. This PR fixes a small bug introduced in the PR where it would remove the ID of the channel from the payload for existing connector.

Testing

  1. Create a connector using the following payload:
{
    "name": "Slack - test allowedChannels",
    "config": {
        "allowedChannels": [
            {
                "id": "C096LSBJZBQ", // should have an ID
                "name": "test"
            }
        ]
    },
    "secrets": {
        "token": "foo"
    },
    "connector_type_id": ".slack_api"
}
  1. Edit the connector by adding an extra channel
  2. Verify that the payload sent to the API preserves the channel ID. The new channel should only have a name.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

@cnasikas cnasikas requested a review from a team as a code owner December 19, 2025 14:12
@cnasikas cnasikas self-assigned this Dec 19, 2025
@cnasikas cnasikas added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// backport:version Backport to applied version labels v9.3.0 v9.4.0 labels Dec 19, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

@js-jankisalvi js-jankisalvi left a comment

Choose a reason for hiding this comment

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

Verified locally, works as expected 👍

Only channel name visible while executing the connector 👍

@cnasikas cnasikas enabled auto-merge (squash) December 19, 2025 15:13
@cnasikas cnasikas added the bug Fixes for quality problems that affect the customer experience label Dec 19, 2025
@cnasikas cnasikas merged commit 2dce199 into elastic:main Dec 19, 2025
16 checks passed
@cnasikas cnasikas deleted the slack_bug_fixes branch December 19, 2025 17:53
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.3

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

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

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

id before after diff
stackConnectors 1.1MB 1.1MB +588.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
stackConnectors 76.6KB 76.7KB +46.0B

History

cc @cnasikas

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 19, 2025
…g Slack connector (elastic#247098)

## Summary

PR elastic#245423 simplified a lot the
logic of the Slack connector regarding channels. This PR fixes a small
bug introduced in the PR where it would remove the ID of the channel
from the payload for existing connector.

### Testing

1. Create a connector using the following payload:

```
{
    "name": "Slack - test allowedChannels",
    "config": {
        "allowedChannels": [
            {
                "id": "C096LSBJZBQ", // should have an ID
                "name": "test"
            }
        ]
    },
    "secrets": {
        "token": "foo"
    },
    "connector_type_id": ".slack_api"
}
```

2. Edit the connector by adding an extra channel
3. Verify that the payload sent to the API preserves the channel ID. The
new channel should only have a name.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 2dce199)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.3

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

Questions ?

Please refer to the Backport tool documentation

baileycash-elastic pushed a commit to baileycash-elastic/kibana that referenced this pull request Dec 19, 2025
…g Slack connector (elastic#247098)

## Summary

PR elastic#245423 simplified a lot the
logic of the Slack connector regarding channels. This PR fixes a small
bug introduced in the PR where it would remove the ID of the channel
from the payload for existing connector.

### Testing

1. Create a connector using the following payload:

```
{
    "name": "Slack - test allowedChannels",
    "config": {
        "allowedChannels": [
            {
                "id": "C096LSBJZBQ", // should have an ID
                "name": "test"
            }
        ]
    },
    "secrets": {
        "token": "foo"
    },
    "connector_type_id": ".slack_api"
}
```

2. Edit the connector by adding an extra channel
3. Verify that the payload sent to the API preserves the channel ID. The
new channel should only have a name.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
kibanamachine added a commit that referenced this pull request Dec 23, 2025
…xisting Slack connector (#247098) (#247159)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[ResponseOps][Connectors] Keep the channel ID when editing an
existing Slack connector
(#247098)](#247098)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Christos
Nasikas","email":"christos.nasikas@elastic.co"},"sourceCommit":{"committedDate":"2025-12-19T17:52:58Z","message":"[ResponseOps][Connectors]
Keep the channel ID when editing an existing Slack connector
(#247098)\n\n## Summary\n\nPR
#245423 simplified a lot
the\nlogic of the Slack connector regarding channels. This PR fixes a
small\nbug introduced in the PR where it would remove the ID of the
channel\nfrom the payload for existing connector.\n\n### Testing\n\n1.
Create a connector using the following payload:\n\n```\n{\n \"name\":
\"Slack - test allowedChannels\",\n \"config\": {\n \"allowedChannels\":
[\n {\n \"id\": \"C096LSBJZBQ\", // should have an ID\n \"name\":
\"test\"\n }\n ]\n },\n \"secrets\": {\n \"token\": \"foo\"\n },\n
\"connector_type_id\": \".slack_api\"\n}\n```\n\n2. Edit the connector
by adding an extra channel\n3. Verify that the payload sent to the API
preserves the channel ID. The\nnew channel should only have a
name.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions.
\n\nReviewers should verify this PR satisfies this list as well.\n\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"2dce199c0d7c2c38f1c6f92789ee5f7469dec4b5","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:ResponseOps","backport:version","v9.3.0","v9.4.0"],"title":"[ResponseOps][Connectors]
Keep the channel ID when editing an existing Slack
connector","number":247098,"url":"https://github.com/elastic/kibana/pull/247098","mergeCommit":{"message":"[ResponseOps][Connectors]
Keep the channel ID when editing an existing Slack connector
(#247098)\n\n## Summary\n\nPR
#245423 simplified a lot
the\nlogic of the Slack connector regarding channels. This PR fixes a
small\nbug introduced in the PR where it would remove the ID of the
channel\nfrom the payload for existing connector.\n\n### Testing\n\n1.
Create a connector using the following payload:\n\n```\n{\n \"name\":
\"Slack - test allowedChannels\",\n \"config\": {\n \"allowedChannels\":
[\n {\n \"id\": \"C096LSBJZBQ\", // should have an ID\n \"name\":
\"test\"\n }\n ]\n },\n \"secrets\": {\n \"token\": \"foo\"\n },\n
\"connector_type_id\": \".slack_api\"\n}\n```\n\n2. Edit the connector
by adding an extra channel\n3. Verify that the payload sent to the API
preserves the channel ID. The\nnew channel should only have a
name.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions.
\n\nReviewers should verify this PR satisfies this list as well.\n\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"2dce199c0d7c2c38f1c6f92789ee5f7469dec4b5"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/247098","number":247098,"mergeCommit":{"message":"[ResponseOps][Connectors]
Keep the channel ID when editing an existing Slack connector
(#247098)\n\n## Summary\n\nPR
#245423 simplified a lot
the\nlogic of the Slack connector regarding channels. This PR fixes a
small\nbug introduced in the PR where it would remove the ID of the
channel\nfrom the payload for existing connector.\n\n### Testing\n\n1.
Create a connector using the following payload:\n\n```\n{\n \"name\":
\"Slack - test allowedChannels\",\n \"config\": {\n \"allowedChannels\":
[\n {\n \"id\": \"C096LSBJZBQ\", // should have an ID\n \"name\":
\"test\"\n }\n ]\n },\n \"secrets\": {\n \"token\": \"foo\"\n },\n
\"connector_type_id\": \".slack_api\"\n}\n```\n\n2. Edit the connector
by adding an extra channel\n3. Verify that the payload sent to the API
preserves the channel ID. The\nnew channel should only have a
name.\n\n\n### Checklist\n\nCheck the PR satisfies following conditions.
\n\nReviewers should verify this PR satisfies this list as well.\n\n-
[x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"2dce199c0d7c2c38f1c6f92789ee5f7469dec4b5"}}]}]
BACKPORT-->

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 6, 2026
…g Slack connector (elastic#247098)

## Summary

PR elastic#245423 simplified a lot the
logic of the Slack connector regarding channels. This PR fixes a small
bug introduced in the PR where it would remove the ID of the channel
from the payload for existing connector.

### Testing

1. Create a connector using the following payload:

```
{
    "name": "Slack - test allowedChannels",
    "config": {
        "allowedChannels": [
            {
                "id": "C096LSBJZBQ", // should have an ID
                "name": "test"
            }
        ]
    },
    "secrets": {
        "token": "foo"
    },
    "connector_type_id": ".slack_api"
}
```

2. Edit the connector by adding an extra channel
3. Verify that the payload sent to the API preserves the channel ID. The
new channel should only have a name.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
dej611 pushed a commit to dej611/kibana that referenced this pull request Jan 8, 2026
…g Slack connector (elastic#247098)

## Summary

PR elastic#245423 simplified a lot the
logic of the Slack connector regarding channels. This PR fixes a small
bug introduced in the PR where it would remove the ID of the channel
from the payload for existing connector.

### Testing

1. Create a connector using the following payload:

```
{
    "name": "Slack - test allowedChannels",
    "config": {
        "allowedChannels": [
            {
                "id": "C096LSBJZBQ", // should have an ID
                "name": "test"
            }
        ]
    },
    "secrets": {
        "token": "foo"
    },
    "connector_type_id": ".slack_api"
}
```

2. Edit the connector by adding an extra channel
3. Verify that the payload sent to the API preserves the channel ID. The
new channel should only have a name.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
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 bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants