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

Hide assistant's knowledge base UI when assistantKnowledgeBaseByDefault feature flag is disabled #196762

Merged
merged 7 commits into from
Oct 18, 2024

Conversation

e40pud
Copy link
Contributor

@e40pud e40pud commented Oct 17, 2024

Summary

This is the followup to #195733 where we implemented the RBAC to allow managing Global Knowledge Base docs. With those changes we introduced a bug where we do not hide the RBAC configuration setting when assistantKnowledgeBaseByDefault feature flag is disabled. It means that in Serverless users will see this setting but it will do nothing for them.

Screenshots of the fixed behaviour

  • assistantKnowledgeBaseByDefault = true

Capture-2024-10-17-204859

  • assistantKnowledgeBaseByDefault = false

Capture-2024-10-17-204752

@e40pud e40pud added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Feature:Security Assistant Security Assistant Team:Security Generative AI Security Generative AI v8.16.0 backport:version Backport to applied version labels labels Oct 17, 2024
@e40pud e40pud self-assigned this Oct 17, 2024
@e40pud e40pud marked this pull request as ready for review October 17, 2024 18:56
@e40pud e40pud requested review from a team as code owners October 17, 2024 18:56
@e40pud e40pud requested a review from a team as a code owner October 17, 2024 20:44
Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #94 / management Ingest pipelines Manage databases List returns existing databases

History

cc @e40pud

@e40pud e40pud merged commit f6e8065 into elastic:main Oct 18, 2024
45 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 18, 2024
…ult` feature flag is disabled (elastic#196762)

## Summary

This is the followup to elastic#195733
where we implemented the RBAC to allow managing Global Knowledge Base
docs. With those changes we introduced a bug where we do not hide the
RBAC configuration setting when `assistantKnowledgeBaseByDefault`
feature flag is disabled. It means that in Serverless users will see
this setting but it will do nothing for them.

### Screenshots of the fixed behaviour

* `assistantKnowledgeBaseByDefault = true`

![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)

* `assistantKnowledgeBaseByDefault = false`

![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)

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

💚 All backports created successfully

Status Branch Result
8.16

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 Oct 18, 2024
…owledgeBaseByDefault` feature flag is disabled (#196762) (#196857)

# Backport

This will backport the following commits from `main` to `8.16`:
- [Hide assistant's knowledge base UI when
`assistantKnowledgeBaseByDefault` feature flag is disabled
(#196762)](#196762)

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

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

<!--BACKPORT [{"author":{"name":"Ievgen
Sorokopud","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-18T11:35:04Z","message":"Hide
assistant's knowledge base UI when `assistantKnowledgeBaseByDefault`
feature flag is disabled (#196762)\n\n## Summary\r\n\r\nThis is the
followup to https://github.com/elastic/kibana/pull/195733\r\nwhere we
implemented the RBAC to allow managing Global Knowledge Base\r\ndocs.
With those changes we introduced a bug where we do not hide the\r\nRBAC
configuration setting when `assistantKnowledgeBaseByDefault`\r\nfeature
flag is disabled. It means that in Serverless users will see\r\nthis
setting but it will do nothing for them.\r\n\r\n### Screenshots of the
fixed behaviour\r\n\r\n* `assistantKnowledgeBaseByDefault =
true`\r\n\r\n\r\n![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)\r\n\r\n*
`assistantKnowledgeBaseByDefault =
false`\r\n\r\n\r\n![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)","sha":"f6e8065dd75116ddf596b77f75a8468804008323","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:Security
Assistant","Team:Security Generative
AI","v8.16.0","backport:version"],"title":"Hide assistant's knowledge
base UI when `assistantKnowledgeBaseByDefault` feature flag is
disabled","number":196762,"url":"https://github.com/elastic/kibana/pull/196762","mergeCommit":{"message":"Hide
assistant's knowledge base UI when `assistantKnowledgeBaseByDefault`
feature flag is disabled (#196762)\n\n## Summary\r\n\r\nThis is the
followup to https://github.com/elastic/kibana/pull/195733\r\nwhere we
implemented the RBAC to allow managing Global Knowledge Base\r\ndocs.
With those changes we introduced a bug where we do not hide the\r\nRBAC
configuration setting when `assistantKnowledgeBaseByDefault`\r\nfeature
flag is disabled. It means that in Serverless users will see\r\nthis
setting but it will do nothing for them.\r\n\r\n### Screenshots of the
fixed behaviour\r\n\r\n* `assistantKnowledgeBaseByDefault =
true`\r\n\r\n\r\n![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)\r\n\r\n*
`assistantKnowledgeBaseByDefault =
false`\r\n\r\n\r\n![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)","sha":"f6e8065dd75116ddf596b77f75a8468804008323"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196762","number":196762,"mergeCommit":{"message":"Hide
assistant's knowledge base UI when `assistantKnowledgeBaseByDefault`
feature flag is disabled (#196762)\n\n## Summary\r\n\r\nThis is the
followup to https://github.com/elastic/kibana/pull/195733\r\nwhere we
implemented the RBAC to allow managing Global Knowledge Base\r\ndocs.
With those changes we introduced a bug where we do not hide the\r\nRBAC
configuration setting when `assistantKnowledgeBaseByDefault`\r\nfeature
flag is disabled. It means that in Serverless users will see\r\nthis
setting but it will do nothing for them.\r\n\r\n### Screenshots of the
fixed behaviour\r\n\r\n* `assistantKnowledgeBaseByDefault =
true`\r\n\r\n\r\n![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)\r\n\r\n*
`assistantKnowledgeBaseByDefault =
false`\r\n\r\n\r\n![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)","sha":"f6e8065dd75116ddf596b77f75a8468804008323"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Ievgen Sorokopud <[email protected]>
@jbudz
Copy link
Member

jbudz commented Oct 18, 2024

@e40pud there's a version gap with this backport. Can you check if this should also be backported to 8.x/8.17?

@e40pud
Copy link
Contributor Author

e40pud commented Oct 19, 2024

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

@e40pud
Copy link
Contributor Author

e40pud commented Oct 19, 2024

@e40pud there's a version gap with this backport. Can you check if this should also be backported to 8.x/8.17?

@jbudz thanks for catching this, I created a backport to 8.x #196980. Does that mean that this fix will not go into the next Serverless release on Monday? We were hoping to get it in.

cc @peluja1012

e40pud added a commit to e40pud/kibana that referenced this pull request Oct 19, 2024
…ult` feature flag is disabled (elastic#196762)

## Summary

This is the followup to elastic#195733
where we implemented the RBAC to allow managing Global Knowledge Base
docs. With those changes we introduced a bug where we do not hide the
RBAC configuration setting when `assistantKnowledgeBaseByDefault`
feature flag is disabled. It means that in Serverless users will see
this setting but it will do nothing for them.

### Screenshots of the fixed behaviour

* `assistantKnowledgeBaseByDefault = true`

![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)

* `assistantKnowledgeBaseByDefault = false`

![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)

(cherry picked from commit f6e8065)
@jbudz
Copy link
Member

jbudz commented Oct 19, 2024

@e40pud there's a version gap with this backport. Can you check if this should also be backported to 8.x/8.17?

@jbudz thanks for catching this, I created a backport to 8.x #196980. Does that mean that this fix will not go into the next Serverless release on Monday? We were hoping to get it in.

cc @peluja1012

It will, serverless releases from main (the commit merged from this PR).

e40pud added a commit that referenced this pull request Oct 21, 2024
…ByDefault` feature flag is disabled (#196762) (#196980)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Hide assistant's knowledge base UI when
`assistantKnowledgeBaseByDefault` feature flag is disabled
(#196762)](#196762)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Ievgen
Sorokopud","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-18T11:35:04Z","message":"Hide
assistant's knowledge base UI when `assistantKnowledgeBaseByDefault`
feature flag is disabled (#196762)\n\n## Summary\r\n\r\nThis is the
followup to https://github.com/elastic/kibana/pull/195733\r\nwhere we
implemented the RBAC to allow managing Global Knowledge Base\r\ndocs.
With those changes we introduced a bug where we do not hide the\r\nRBAC
configuration setting when `assistantKnowledgeBaseByDefault`\r\nfeature
flag is disabled. It means that in Serverless users will see\r\nthis
setting but it will do nothing for them.\r\n\r\n### Screenshots of the
fixed behaviour\r\n\r\n* `assistantKnowledgeBaseByDefault =
true`\r\n\r\n\r\n![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)\r\n\r\n*
`assistantKnowledgeBaseByDefault =
false`\r\n\r\n\r\n![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)","sha":"f6e8065dd75116ddf596b77f75a8468804008323","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:Security
Assistant","Team:Security Generative
AI","v8.16.0","backport:version"],"number":196762,"url":"https://github.com/elastic/kibana/pull/196762","mergeCommit":{"message":"Hide
assistant's knowledge base UI when `assistantKnowledgeBaseByDefault`
feature flag is disabled (#196762)\n\n## Summary\r\n\r\nThis is the
followup to https://github.com/elastic/kibana/pull/195733\r\nwhere we
implemented the RBAC to allow managing Global Knowledge Base\r\ndocs.
With those changes we introduced a bug where we do not hide the\r\nRBAC
configuration setting when `assistantKnowledgeBaseByDefault`\r\nfeature
flag is disabled. It means that in Serverless users will see\r\nthis
setting but it will do nothing for them.\r\n\r\n### Screenshots of the
fixed behaviour\r\n\r\n* `assistantKnowledgeBaseByDefault =
true`\r\n\r\n\r\n![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)\r\n\r\n*
`assistantKnowledgeBaseByDefault =
false`\r\n\r\n\r\n![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)","sha":"f6e8065dd75116ddf596b77f75a8468804008323"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196762","number":196762,"mergeCommit":{"message":"Hide
assistant's knowledge base UI when `assistantKnowledgeBaseByDefault`
feature flag is disabled (#196762)\n\n## Summary\r\n\r\nThis is the
followup to https://github.com/elastic/kibana/pull/195733\r\nwhere we
implemented the RBAC to allow managing Global Knowledge Base\r\ndocs.
With those changes we introduced a bug where we do not hide the\r\nRBAC
configuration setting when `assistantKnowledgeBaseByDefault`\r\nfeature
flag is disabled. It means that in Serverless users will see\r\nthis
setting but it will do nothing for them.\r\n\r\n### Screenshots of the
fixed behaviour\r\n\r\n* `assistantKnowledgeBaseByDefault =
true`\r\n\r\n\r\n![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)\r\n\r\n*
`assistantKnowledgeBaseByDefault =
false`\r\n\r\n\r\n![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)","sha":"f6e8065dd75116ddf596b77f75a8468804008323"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/196857","number":196857,"state":"MERGED","mergeCommit":{"sha":"8094dd6d7791a5fd6e8ead925a1ba42b6bb7acfa","message":"[8.16]
Hide assistant&#x27;s knowledge base UI when
&#x60;assistantKnowledgeBaseByDefault&#x60; feature flag is disabled
(#196762) (#196857)\n\n# Backport\n\nThis will backport the following
commits from `main` to `8.16`:\n- [Hide assistant&#x27;s knowledge base
UI when\n&#x60;assistantKnowledgeBaseByDefault&#x60; feature flag is
disabled\n(#196762)](https://github.com/elastic/kibana/pull/196762)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Ievgen\nSorokopud\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-10-18T11:35:04Z\",\"message\":\"Hide\nassistant's
knowledge base UI when `assistantKnowledgeBaseByDefault`\nfeature flag
is disabled (#196762)\\n\\n## Summary\\r\\n\\r\\nThis is the\nfollowup
to https://github.com/elastic/kibana/pull/195733\\r\\nwhere
we\nimplemented the RBAC to allow managing Global Knowledge
Base\\r\\ndocs.\nWith those changes we introduced a bug where we do not
hide the\\r\\nRBAC\nconfiguration setting when
`assistantKnowledgeBaseByDefault`\\r\\nfeature\nflag is disabled. It
means that in Serverless users will see\\r\\nthis\nsetting but it will
do nothing for them.\\r\\n\\r\\n### Screenshots of the\nfixed
behaviour\\r\\n\\r\\n* `assistantKnowledgeBaseByDefault
=\ntrue`\\r\\n\\r\\n\\r\\n![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)\\r\\n\\r\\n*\n`assistantKnowledgeBaseByDefault
=\nfalse`\\r\\n\\r\\n\\r\\n![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)\",\"sha\":\"f6e8065dd75116ddf596b77f75a8468804008323\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"Feature:Security\nAssistant\",\"Team:Security
Generative\nAI\",\"v8.16.0\",\"backport:version\"],\"title\":\"Hide
assistant's knowledge\nbase UI when `assistantKnowledgeBaseByDefault`
feature flag
is\ndisabled\",\"number\":196762,\"url\":\"https://github.com/elastic/kibana/pull/196762\",\"mergeCommit\":{\"message\":\"Hide\nassistant's
knowledge base UI when `assistantKnowledgeBaseByDefault`\nfeature flag
is disabled (#196762)\\n\\n## Summary\\r\\n\\r\\nThis is the\nfollowup
to https://github.com/elastic/kibana/pull/195733\\r\\nwhere
we\nimplemented the RBAC to allow managing Global Knowledge
Base\\r\\ndocs.\nWith those changes we introduced a bug where we do not
hide the\\r\\nRBAC\nconfiguration setting when
`assistantKnowledgeBaseByDefault`\\r\\nfeature\nflag is disabled. It
means that in Serverless users will see\\r\\nthis\nsetting but it will
do nothing for them.\\r\\n\\r\\n### Screenshots of the\nfixed
behaviour\\r\\n\\r\\n* `assistantKnowledgeBaseByDefault
=\ntrue`\\r\\n\\r\\n\\r\\n![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)\\r\\n\\r\\n*\n`assistantKnowledgeBaseByDefault
=\nfalse`\\r\\n\\r\\n\\r\\n![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)\",\"sha\":\"f6e8065dd75116ddf596b77f75a8468804008323\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.16\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/196762\",\"number\":196762,\"mergeCommit\":{\"message\":\"Hide\nassistant's
knowledge base UI when `assistantKnowledgeBaseByDefault`\nfeature flag
is disabled (#196762)\\n\\n## Summary\\r\\n\\r\\nThis is the\nfollowup
to https://github.com/elastic/kibana/pull/195733\\r\\nwhere
we\nimplemented the RBAC to allow managing Global Knowledge
Base\\r\\ndocs.\nWith those changes we introduced a bug where we do not
hide the\\r\\nRBAC\nconfiguration setting when
`assistantKnowledgeBaseByDefault`\\r\\nfeature\nflag is disabled. It
means that in Serverless users will see\\r\\nthis\nsetting but it will
do nothing for them.\\r\\n\\r\\n### Screenshots of the\nfixed
behaviour\\r\\n\\r\\n* `assistantKnowledgeBaseByDefault
=\ntrue`\\r\\n\\r\\n\\r\\n![Capture-2024-10-17-204859](https://github.com/user-attachments/assets/ca4489b1-8ad9-4e57-824f-455ddb74da6c)\\r\\n\\r\\n*\n`assistantKnowledgeBaseByDefault
=\nfalse`\\r\\n\\r\\n\\r\\n![Capture-2024-10-17-204752](https://github.com/user-attachments/assets/fbd2511f-4e09-4ef9-8403-6578366728e4)\",\"sha\":\"f6e8065dd75116ddf596b77f75a8468804008323\"}},{\"branch\":\"8.16\",\"label\":\"v8.16.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by:
Ievgen Sorokopud <[email protected]>"}}]}] BACKPORT-->
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:Security Assistant Security Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants