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

[ResponseOps][Connectors] Fix bug with deprecated icon in the connectors table #184342

Merged
merged 1 commit into from
May 29, 2024

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented May 28, 2024

Summary

If the connector's table shows a deprecated connector it crashes. This PR fixes this issue by removing any usage of the deprecated access to the EUI theme variables.

Screenshots

Screenshot 2024-05-28 at 1 34 48 PM Screenshot 2024-05-28 at 1 33 13 PM Screenshot 2024-05-28 at 1 34 11 PM

Testing

  1. Create a deprecated SN connector.
  2. Verify that the page that list all connectors (Stack Management -> Connectors) does not crash

You can create a deprecated SN connector like:

curl --location 'https://localhost:5601/api/actions/connector' \
--header 'kbn-xsrf: true' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <basic auth token>' \
--data-raw '{
    "name": "SN",
    "connector_type_id": ".servicenow",
    "config": {
        "apiUrl": "https://<whatever>.service-now.com/",
        "usesTableApi": true <-- This makes the connector deprecated
    },
    "secrets": {
        "username": "admin",
        "password": "<whatever>"
    }
}'

For maintainers

@cnasikas cnasikas added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Actions/ConnectorsManagement Issues related to Connectors Management UX v8.14.0 v8.15.0 labels May 28, 2024
@cnasikas cnasikas self-assigned this May 28, 2024
@cnasikas cnasikas requested a review from a team as a code owner May 28, 2024 10:39
@elasticmachine
Copy link
Contributor

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

@cnasikas cnasikas added the bug Fixes for quality problems that affect the customer experience label May 28, 2024
>
{name}
</EuiLink>
<EuiFlexGroup justifyContent="center" alignItems="center" gutterSize="xs">
Copy link
Member Author

Choose a reason for hiding this comment

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

I wrapped the components with EuiFlexGroup and EuiFlexItem.

<EuiIconTip
iconProps={{
'data-test-subj': `missingSecrets_${item.id}`,
style: { verticalAlign: 'text-top' },
Copy link
Member Author

Choose a reason for hiding this comment

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

New style.

Copy link
Contributor

@adcoelho adcoelho left a comment

Choose a reason for hiding this comment

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

Tested and works as expected 👍

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

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
triggersActionsUi 1.6MB 1.6MB +92.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @cnasikas

@cnasikas cnasikas merged commit a365891 into elastic:main May 29, 2024
32 checks passed
@cnasikas cnasikas deleted the fix_deprecated_connector_bug branch May 29, 2024 07:52
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 29, 2024
…ors table (elastic#184342)

## Summary

If the connector's table shows a deprecated connector it crashes. This
PR fixes this issue by removing any usage of the deprecated access to
the EUI theme variables.

## Screenshots

<img width="541" alt="Screenshot 2024-05-28 at 1 34 48 PM"
src="https://github.com/elastic/kibana/assets/7871006/a2aad5e3-c49c-476a-b7bf-37ec57ed03b9">

<img width="456" alt="Screenshot 2024-05-28 at 1 33 13 PM"
src="https://github.com/elastic/kibana/assets/7871006/b2953215-1744-481b-8fbf-70a5df26fc30">

<img width="743" alt="Screenshot 2024-05-28 at 1 34 11 PM"
src="https://github.com/elastic/kibana/assets/7871006/66b1e86f-f618-4a68-bdc0-7c6e1727a4b7">

## Testing

1. Create a deprecated SN connector.
2. Verify that the page that list all connectors (Stack Management ->
Connectors) does not crash

You can create a deprecated SN connector like:

```
curl --location 'https://localhost:5601/api/actions/connector' \
--header 'kbn-xsrf: true' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <basic auth token>' \
--data-raw '{
    "name": "SN",
    "connector_type_id": ".servicenow",
    "config": {
        "apiUrl": "https://<whatever>.service-now.com/",
        "usesTableApi": true <-- This makes the connector deprecated
    },
    "secrets": {
        "username": "admin",
        "password": "<whatever>"
    }
}'
```

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit a365891)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.14

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request May 29, 2024
…connectors table (#184342) (#184392)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[ResponseOps][Connectors] Fix bug with deprecated icon in the
connectors table
(#184342)](#184342)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Christos
Nasikas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-05-29T07:52:37Z","message":"[ResponseOps][Connectors]
Fix bug with deprecated icon in the connectors table (#184342)\n\n##
Summary\r\n\r\nIf the connector's table shows a deprecated connector it
crashes. This\r\nPR fixes this issue by removing any usage of the
deprecated access to\r\nthe EUI theme variables.\r\n\r\n##
Screenshots\r\n\r\n<img width=\"541\" alt=\"Screenshot 2024-05-28 at 1
34
48 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/7871006/a2aad5e3-c49c-476a-b7bf-37ec57ed03b9\">\r\n\r\n<img
width=\"456\" alt=\"Screenshot 2024-05-28 at 1 33
13 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/7871006/b2953215-1744-481b-8fbf-70a5df26fc30\">\r\n\r\n<img
width=\"743\" alt=\"Screenshot 2024-05-28 at 1 34
11 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/7871006/66b1e86f-f618-4a68-bdc0-7c6e1727a4b7\">\r\n\r\n\r\n##
Testing\r\n\r\n1. Create a deprecated SN connector.\r\n2. Verify that
the page that list all connectors (Stack Management ->\r\nConnectors)
does not crash\r\n\r\nYou can create a deprecated SN connector
like:\r\n\r\n```\r\ncurl --location
'https://localhost:5601/api/actions/connector' \\\r\n--header 'kbn-xsrf:
true' \\\r\n--header 'Content-Type: application/json' \\\r\n--header
'Authorization: Basic <basic auth token>' \\\r\n--data-raw '{\r\n
\"name\": \"SN\",\r\n \"connector_type_id\": \".servicenow\",\r\n
\"config\": {\r\n \"apiUrl\":
\"https://<whatever>.service-now.com/\",\r\n \"usesTableApi\": true <--
This makes the connector deprecated\r\n },\r\n \"secrets\": {\r\n
\"username\": \"admin\",\r\n \"password\": \"<whatever>\"\r\n
}\r\n}'\r\n```\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked
for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"a365891c6847c0fef80d909666f1ce5cbf0986b3","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:ResponseOps","Feature:Actions/ConnectorsManagement","v8.14.0","v8.15.0"],"title":"[ResponseOps][Connectors]
Fix bug with deprecated icon in the connectors
table","number":184342,"url":"https://github.com/elastic/kibana/pull/184342","mergeCommit":{"message":"[ResponseOps][Connectors]
Fix bug with deprecated icon in the connectors table (#184342)\n\n##
Summary\r\n\r\nIf the connector's table shows a deprecated connector it
crashes. This\r\nPR fixes this issue by removing any usage of the
deprecated access to\r\nthe EUI theme variables.\r\n\r\n##
Screenshots\r\n\r\n<img width=\"541\" alt=\"Screenshot 2024-05-28 at 1
34
48 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/7871006/a2aad5e3-c49c-476a-b7bf-37ec57ed03b9\">\r\n\r\n<img
width=\"456\" alt=\"Screenshot 2024-05-28 at 1 33
13 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/7871006/b2953215-1744-481b-8fbf-70a5df26fc30\">\r\n\r\n<img
width=\"743\" alt=\"Screenshot 2024-05-28 at 1 34
11 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/7871006/66b1e86f-f618-4a68-bdc0-7c6e1727a4b7\">\r\n\r\n\r\n##
Testing\r\n\r\n1. Create a deprecated SN connector.\r\n2. Verify that
the page that list all connectors (Stack Management ->\r\nConnectors)
does not crash\r\n\r\nYou can create a deprecated SN connector
like:\r\n\r\n```\r\ncurl --location
'https://localhost:5601/api/actions/connector' \\\r\n--header 'kbn-xsrf:
true' \\\r\n--header 'Content-Type: application/json' \\\r\n--header
'Authorization: Basic <basic auth token>' \\\r\n--data-raw '{\r\n
\"name\": \"SN\",\r\n \"connector_type_id\": \".servicenow\",\r\n
\"config\": {\r\n \"apiUrl\":
\"https://<whatever>.service-now.com/\",\r\n \"usesTableApi\": true <--
This makes the connector deprecated\r\n },\r\n \"secrets\": {\r\n
\"username\": \"admin\",\r\n \"password\": \"<whatever>\"\r\n
}\r\n}'\r\n```\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked
for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"a365891c6847c0fef80d909666f1ce5cbf0986b3"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/184342","number":184342,"mergeCommit":{"message":"[ResponseOps][Connectors]
Fix bug with deprecated icon in the connectors table (#184342)\n\n##
Summary\r\n\r\nIf the connector's table shows a deprecated connector it
crashes. This\r\nPR fixes this issue by removing any usage of the
deprecated access to\r\nthe EUI theme variables.\r\n\r\n##
Screenshots\r\n\r\n<img width=\"541\" alt=\"Screenshot 2024-05-28 at 1
34
48 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/7871006/a2aad5e3-c49c-476a-b7bf-37ec57ed03b9\">\r\n\r\n<img
width=\"456\" alt=\"Screenshot 2024-05-28 at 1 33
13 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/7871006/b2953215-1744-481b-8fbf-70a5df26fc30\">\r\n\r\n<img
width=\"743\" alt=\"Screenshot 2024-05-28 at 1 34
11 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/7871006/66b1e86f-f618-4a68-bdc0-7c6e1727a4b7\">\r\n\r\n\r\n##
Testing\r\n\r\n1. Create a deprecated SN connector.\r\n2. Verify that
the page that list all connectors (Stack Management ->\r\nConnectors)
does not crash\r\n\r\nYou can create a deprecated SN connector
like:\r\n\r\n```\r\ncurl --location
'https://localhost:5601/api/actions/connector' \\\r\n--header 'kbn-xsrf:
true' \\\r\n--header 'Content-Type: application/json' \\\r\n--header
'Authorization: Basic <basic auth token>' \\\r\n--data-raw '{\r\n
\"name\": \"SN\",\r\n \"connector_type_id\": \".servicenow\",\r\n
\"config\": {\r\n \"apiUrl\":
\"https://<whatever>.service-now.com/\",\r\n \"usesTableApi\": true <--
This makes the connector deprecated\r\n },\r\n \"secrets\": {\r\n
\"username\": \"admin\",\r\n \"password\": \"<whatever>\"\r\n
}\r\n}'\r\n```\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked
for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"a365891c6847c0fef80d909666f1ce5cbf0986b3"}}]}]
BACKPORT-->

Co-authored-by: Christos Nasikas <[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 Feature:Actions/ConnectorsManagement Issues related to Connectors Management UX release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.14.0 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants