Skip to content

[Fleet] Fix package showing 'Needs authorization' warning even after transform assets were authorized successfully - #176647

Merged
qn895 merged 15 commits into
elastic:mainfrom
qn895:ml-fleet-fix-assets-page-stale-after-reauth
Feb 19, 2024
Merged

qn895 merged 15 commits into
elastic:mainfrom
qn895:ml-fleet-fix-assets-page-stale-after-reauth

Conversation

@qn895

@qn895 qn895 commented Feb 9, 2024 •

Copy link
Copy Markdown
Member

Summary

This PR fixes #176613. Previously, it assumes that the package info content will be refetched at a more frequent interval. This PR forces the update to happen when the reauthorization is done.

It also fixes:

  • An issue with the Assets page not showing correctly, when one of the assets doesn't have any attributes like title and description.
  • Race condition when deleting indices/transforms with ingest_pipeline tied in

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

qn895 added 2 commits February 9, 2024 17:02
…ved object without attributes. Add reauth info for bulk endpoint.
@qn895 qn895 added :ml Feature:Transforms Transforms Team:Fleet - DEPRECATED Use Team:streams-ui labels Feb 9, 2024
@qn895
qn895 requested a review from peteharverson February 9, 2024 23:11
@qn895 qn895 self-assigned this Feb 9, 2024
@qn895

qn895 commented Feb 10, 2024

Copy link
Copy Markdown
Member Author

/ci

@qn895
qn895 requested a review from criamico February 10, 2024 18:27
@qn895 qn895 added v8.13.0 v8.12.2 bug Fixes for quality problems that affect the customer experience labels Feb 12, 2024
@qn895
qn895 marked this pull request as ready for review February 12, 2024 17:02
@qn895
qn895 requested a review from a team as a code owner February 12, 2024 17:02
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kpollich kpollich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 🚀 - Thanks for tracking this down and pushing the fix.

@peteharverson peteharverson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code changes LGTM

@qn895
qn895 enabled auto-merge (squash) February 13, 2024 23:22
@qn895

qn895 commented Feb 14, 2024

Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@qn895

qn895 commented Feb 14, 2024

Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@qn895

qn895 commented Feb 14, 2024

Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@qn895
qn895 disabled auto-merge February 14, 2024 16:32
@qn895

qn895 commented Feb 19, 2024

Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@kibana-ci

Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #2 / daily rollups integration test deletes documents older that 3 days from the saved objects repository
  • [job] [logs] FTR Configs #21 / discover/group1 discover histogram "before all" hook for "should modify the time range when the histogram is brushed"

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
fleet 1.2MB 1.2MB +189.0B

History

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

cc @qn895

@kibanamachine

Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
✅ 8.12
✅ 8.13

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 Feb 19, 2024
…rning even after transform assets were authorized successfully (#176647) (#177236)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Fleet] Fix package showing 'Needs authorization' warning
even after transform assets were authorized successfully
(#176647)](#176647)

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

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

<!--BACKPORT [{"author":{"name":"Quynh Nguyen
(Quinn)","email":"43350163+qn895@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-02-19T19:12:17Z","message":"[Fleet]
Fix package showing 'Needs authorization' warning even after transform
assets were authorized successfully
(#176647)","sha":"4e10d1c70b30cf1c6d8eec8a87a9badc6ad422cb","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","Feature:Transforms","Team:Fleet","v8.13.0","v8.12.2","v8.14.0"],"title":"[Fleet]
Fix package showing 'Needs authorization' warning even after transform
assets were authorized
successfully","number":176647,"url":"https://github.com/elastic/kibana/pull/176647","mergeCommit":{"message":"[Fleet]
Fix package showing 'Needs authorization' warning even after transform
assets were authorized successfully
(#176647)","sha":"4e10d1c70b30cf1c6d8eec8a87a9badc6ad422cb"}},"sourceBranch":"main","suggestedTargetBranches":["8.13","8.12"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.12","label":"v8.12.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176647","number":176647,"mergeCommit":{"message":"[Fleet]
Fix package showing 'Needs authorization' warning even after transform
assets were authorized successfully
(#176647)","sha":"4e10d1c70b30cf1c6d8eec8a87a9badc6ad422cb"}}]}]
BACKPORT-->

Co-authored-by: Quynh Nguyen (Quinn) <43350163+qn895@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Feb 21, 2024
…rning even after transform assets were authorized successfully (#176647) (#177237)

# Backport

This will backport the following commits from `main` to `8.13`:
- [[Fleet] Fix package showing &#x27;Needs authorization&#x27; warning
even after transform assets were authorized successfully
(#176647)](#176647)

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

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

<!--BACKPORT [{"author":{"name":"Quynh Nguyen
(Quinn)","email":"43350163+qn895@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-02-19T19:12:17Z","message":"[Fleet]
Fix package showing 'Needs authorization' warning even after transform
assets were authorized successfully
(#176647)","sha":"4e10d1c70b30cf1c6d8eec8a87a9badc6ad422cb","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","Feature:Transforms","Team:Fleet","v8.13.0","v8.12.2","v8.14.0"],"title":"[Fleet]
Fix package showing 'Needs authorization' warning even after transform
assets were authorized
successfully","number":176647,"url":"https://github.com/elastic/kibana/pull/176647","mergeCommit":{"message":"[Fleet]
Fix package showing 'Needs authorization' warning even after transform
assets were authorized successfully
(#176647)","sha":"4e10d1c70b30cf1c6d8eec8a87a9badc6ad422cb"}},"sourceBranch":"main","suggestedTargetBranches":["8.13","8.12"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.12","label":"v8.12.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176647","number":176647,"mergeCommit":{"message":"[Fleet]
Fix package showing 'Needs authorization' warning even after transform
assets were authorized successfully
(#176647)","sha":"4e10d1c70b30cf1c6d8eec8a87a9badc6ad422cb"}}]}]
BACKPORT-->

Co-authored-by: Quynh Nguyen (Quinn) <43350163+qn895@users.noreply.github.com>
@mistic mistic added v8.12.3 and removed v8.12.2 labels Feb 22, 2024
@mistic

mistic commented Feb 22, 2024

Copy link
Copy Markdown
Contributor

This PR didn't landed on time to be included on v8.12.2. Updating the labels.

fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
@qn895
qn895 deleted the ml-fleet-fix-assets-page-stale-after-reauth branch June 18, 2024 17:23
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:Transforms Transforms :ml release_note:fix Team:Fleet - DEPRECATED Use Team:streams-ui v8.12.3 v8.13.0 v8.14.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet] Assets page shows outdated 'Needs authorization' warning badge even though transform asset was authorized successfully

7 participants