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

[Automatic Import] User-supplied SVG not included in generated package #201008

Closed
ebeahan opened this issue Nov 20, 2024 · 4 comments · Fixed by #201139
Closed

[Automatic Import] User-supplied SVG not included in generated package #201008

ebeahan opened this issue Nov 20, 2024 · 4 comments · Fixed by #201139
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:AutomaticImport Team:Security-Scalability Team label for Security Integrations Scalability Team

Comments

@ebeahan
Copy link
Member

ebeahan commented Nov 20, 2024

Kibana version: 8.16-SNAPSHOT

Elasticsearch version: 8.16-SNAPSHOT

Describe the bug: If the user provides a custom SVG in the Automatic Import workflow, the custom SVG isn't part of the final generated integration package.

Steps to reproduce:

  1. Use Automatic Import to generate a new integration package. Provide a custom SVG on the Integration details step.
  2. Complete the workflow.
  3. The SVG isn't used in the generated package, when installing directly. SVG is present in the downloaded .zip file of the integration.

Expected behavior: Provided SVG file should be used as the integration's icon.

@ebeahan ebeahan added bug Fixes for quality problems that affect the customer experience Feature:AutomaticImport Team:Security-Scalability Team label for Security Integrations Scalability Team labels Nov 20, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-scalability (Team:Security-Scalability)

@ebeahan
Copy link
Member Author

ebeahan commented Nov 20, 2024

After some initial investigation, looks like the workflow uploads and places the SVG file into the correct location in the package structure.

I wonder if custom integrations always default to the EUI icon (custom SVG logo is never loaded at all) or if there's a regression.

@ebeahan
Copy link
Member Author

ebeahan commented Nov 20, 2024

Confirmed the user-supplied SVG displays in 8.15.0. Will work to pinpoint which version introduced the regression.

@ebeahan ebeahan self-assigned this Nov 20, 2024
@ebeahan
Copy link
Member Author

ebeahan commented Nov 20, 2024

Located the change in 8.15.2: https://github.com/elastic/kibana/blob/main/x-pack/plugins/integration_assistant/server/integration_builder/build_integration.ts#L188.

The icons section generates as a map/dictionary, but Fleet expects an array.

8.15.2+

icons:
  src: /img/logoElastic.svg
  title: syslog_test3 Logo
  size: 32x32
  type: image/svg+xml

8.15.1 and earlier

icons:
  - src: /img/logoElastic.svg
    title: syslog_test3 Logo
    size: 32x32
    type: image/svg+xml

@ilyannn ilyannn self-assigned this Nov 21, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 21, 2024
…1139)

## Release Note

Fixes a bug in Automatic Import where icons were not shown after the
integration was installed.

## Summary

Closes elastic#201008.

When implementing safe manifest output elastic#192316 a bug crept in:
the icons array was incorrectly output as a dictionary

    icons:
      src: /img/logoElastic.svg
      title: syslog_test3 Logo
      size: 32x32
      type: image/svg+xml

and the test was not smart enough to pick it up:

    expect(manifest.icons).toBeTruthy();

We fix the field and add better tests for it.

(cherry picked from commit 30e075a)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 21, 2024
…1139)

## Release Note

Fixes a bug in Automatic Import where icons were not shown after the
integration was installed.

## Summary

Closes elastic#201008.

When implementing safe manifest output elastic#192316 a bug crept in:
the icons array was incorrectly output as a dictionary

    icons:
      src: /img/logoElastic.svg
      title: syslog_test3 Logo
      size: 32x32
      type: image/svg+xml

and the test was not smart enough to pick it up:

    expect(manifest.icons).toBeTruthy();

We fix the field and add better tests for it.

(cherry picked from commit 30e075a)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 21, 2024
…1139)

## Release Note

Fixes a bug in Automatic Import where icons were not shown after the
integration was installed.

## Summary

Closes elastic#201008.

When implementing safe manifest output elastic#192316 a bug crept in:
the icons array was incorrectly output as a dictionary

    icons:
      src: /img/logoElastic.svg
      title: syslog_test3 Logo
      size: 32x32
      type: image/svg+xml

and the test was not smart enough to pick it up:

    expect(manifest.icons).toBeTruthy();

We fix the field and add better tests for it.

(cherry picked from commit 30e075a)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 21, 2024
…1139)

## Release Note

Fixes a bug in Automatic Import where icons were not shown after the
integration was installed.

## Summary

Closes elastic#201008.

When implementing safe manifest output elastic#192316 a bug crept in:
the icons array was incorrectly output as a dictionary

    icons:
      src: /img/logoElastic.svg
      title: syslog_test3 Logo
      size: 32x32
      type: image/svg+xml

and the test was not smart enough to pick it up:

    expect(manifest.icons).toBeTruthy();

We fix the field and add better tests for it.

(cherry picked from commit 30e075a)
kibanamachine added a commit that referenced this issue Nov 21, 2024
) (#201225)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Automatic Import] Correctly output icons in the manifest
(#201139)](#201139)

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

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

<!--BACKPORT [{"author":{"name":"Ilya
Nikokoshev","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-21T15:34:07Z","message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","8.17
candidate","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Correctly output icons in the
manifest","number":201139,"url":"https://github.com/elastic/kibana/pull/201139","mergeCommit":{"message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc"}},"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/201139","number":201139,"mergeCommit":{"message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc"}}]}] BACKPORT-->

Co-authored-by: Ilya Nikokoshev <[email protected]>
kibanamachine added a commit that referenced this issue Nov 21, 2024
…1139) (#201223)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Automatic Import] Correctly output icons in the manifest
(#201139)](#201139)

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

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

<!--BACKPORT [{"author":{"name":"Ilya
Nikokoshev","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-21T15:34:07Z","message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","8.17
candidate","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Correctly output icons in the
manifest","number":201139,"url":"https://github.com/elastic/kibana/pull/201139","mergeCommit":{"message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc"}},"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/201139","number":201139,"mergeCommit":{"message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc"}}]}] BACKPORT-->

Co-authored-by: Ilya Nikokoshev <[email protected]>
kibanamachine added a commit that referenced this issue Nov 21, 2024
…1139) (#201224)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Automatic Import] Correctly output icons in the manifest
(#201139)](#201139)

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

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

<!--BACKPORT [{"author":{"name":"Ilya
Nikokoshev","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-21T15:34:07Z","message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","8.17
candidate","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Correctly output icons in the
manifest","number":201139,"url":"https://github.com/elastic/kibana/pull/201139","mergeCommit":{"message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc"}},"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/201139","number":201139,"mergeCommit":{"message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc"}}]}] BACKPORT-->

Co-authored-by: Ilya Nikokoshev <[email protected]>
kibanamachine added a commit that referenced this issue Nov 21, 2024
…1139) (#201222)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Automatic Import] Correctly output icons in the manifest
(#201139)](#201139)

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

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

<!--BACKPORT [{"author":{"name":"Ilya
Nikokoshev","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-21T15:34:07Z","message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","8.17
candidate","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic
Import] Correctly output icons in the
manifest","number":201139,"url":"https://github.com/elastic/kibana/pull/201139","mergeCommit":{"message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc"}},"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/201139","number":201139,"mergeCommit":{"message":"[Automatic
Import] Correctly output icons in the manifest (#201139)\n\n## Release
Note\r\n\r\nFixes a bug in Automatic Import where icons were not shown
after the\r\nintegration was installed.\r\n\r\n## Summary\r\n\r\nCloses
#201008.\r\n\r\nWhen implementing safe manifest output #192316 a bug
crept in:\r\nthe icons array was incorrectly output as a
dictionary\r\n\r\n icons:\r\n src: /img/logoElastic.svg\r\n title:
syslog_test3 Logo\r\n size: 32x32\r\n type: image/svg+xml\r\n\r\nand the
test was not smart enough to pick it up:\r\n\r\n
expect(manifest.icons).toBeTruthy();\r\n\r\nWe fix the field and add
better tests for
it.","sha":"30e075a1b601a9bd5564667b67b3112479d1eebc"}}]}] BACKPORT-->

Co-authored-by: Ilya Nikokoshev <[email protected]>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this issue Nov 26, 2024
…1139)

## Release Note

Fixes a bug in Automatic Import where icons were not shown after the
integration was installed.

## Summary

Closes elastic#201008.

When implementing safe manifest output elastic#192316 a bug crept in:
the icons array was incorrectly output as a dictionary

    icons:
      src: /img/logoElastic.svg
      title: syslog_test3 Logo
      size: 32x32
      type: image/svg+xml

and the test was not smart enough to pick it up:

    expect(manifest.icons).toBeTruthy();

We fix the field and add better tests for it.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this issue Dec 12, 2024
…1139)

## Release Note

Fixes a bug in Automatic Import where icons were not shown after the
integration was installed.

## Summary

Closes elastic#201008.

When implementing safe manifest output elastic#192316 a bug crept in:
the icons array was incorrectly output as a dictionary

    icons:
      src: /img/logoElastic.svg
      title: syslog_test3 Logo
      size: 32x32
      type: image/svg+xml

and the test was not smart enough to pick it up:

    expect(manifest.icons).toBeTruthy();

We fix the field and add better tests for it.
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:AutomaticImport Team:Security-Scalability Team label for Security Integrations Scalability Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants