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

fix(rbac): reduce number of transactions for admin role #1919

Closed
wants to merge 1 commit into from

Conversation

PatAKnight
Copy link
Member

@PatAKnight PatAKnight commented Jul 22, 2024

Description

Fixes the issue where an error is thrown whenever the RBAC Backend plugin configuration values are not set within the app-config. Namely, the problem happened whenever an admin was not set in the app-config.

The issue seemed to be happening because a transaction was not being committed properly and was not freeing up. This in turn would result in the following error

ForwardedError [KnexTimeoutError]: Plugin 'permission' startup failed; caused by KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?

The fix was to have it so that the role metadata transaction and the admin roles transaction are now shared.

Fixes

Copy link

openshift-ci bot commented Jul 22, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from pataknight. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

sonarcloud bot commented Jul 22, 2024

@AndrienkoAleksandr
Copy link
Collaborator

Alternative fix is here: #1923

@AndrienkoAleksandr
Copy link
Collaborator

We talked with @PatAKnight. Both fixes make sense. I cherry-picked this fix to pr: #1923

@PatAKnight
Copy link
Member Author

Closing in favor of #1923

@PatAKnight PatAKnight closed this Jul 24, 2024
@PatAKnight PatAKnight deleted the fix-rbac-transaction branch August 9, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants