-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Service accounts: Remove Add API keys buttons and remove one state of migrating for API keys tab #63411
Service accounts: Remove Add API keys buttons and remove one state of migrating for API keys tab #63411
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some issues needs to be resolved. Also, we check and hide API keys tab for specific org. But then new org can be created and that org will have API keys tab. That's kinda strange behavior. Maybe we should have a global flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few comments to consider.
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Could we please hold on with the merge until we align on the release milestone and understand how this should be communicated. As this is a breaking change, I am hesitant about letting it out with 9.5. |
|
||
// hideApiKeysTabIfNoAPIKeysPresent is used to remove the apikeys tab from the admin tabs | ||
// if there are no apikeys, this makes it so that we only issue service account tokens instead | ||
func hideApiKeysTabIfNoAPIKeysPresent(l *log.ConcreteLogger, store *sqlstore.SQLStore, serviceAccountsStore *database.ServiceAccountsStoreImpl) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: This should be part of the store
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I think the correct place would be in the api key package
This removes the migrationstatus state from the UI in favor of only looking at the number of API keys to determine what to show to the user. This simplifies the logic and makes less calls to the backend with each page load. This was called both on the API keys page and the Service accounts page. - removes the state of migrationstatus from the UI - removes the backend call - removes the backend endpoint for migrationstatus
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
… migrating for API keys tab (#63411) * add: hide apikeys tab on start * make use of store method * added hiding of apikeys tab for new org creation * missing err check * removed unused files * implemennted fake to make tests run * move check for globalHideApikeys from org to admin * refactor to remove the fake * removed unused method calls for interface * Update pkg/services/serviceaccounts/manager/service.go Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com> * Update pkg/services/serviceaccounts/manager/service.go Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com> * remove the checkglobal method * removed duplicate global set const * add count of apikeys for performance * remove apikeys adding in UI * added back deleted file * added comment on component * changed wording and copy for hiding and migrating service accounts * refactor: remove migrationstatus in front/backend This removes the migrationstatus state from the UI in favor of only looking at the number of API keys to determine what to show to the user. This simplifies the logic and makes less calls to the backend with each page load. This was called both on the API keys page and the Service accounts page. - removes the state of migrationstatus from the UI - removes the backend call - removes the backend endpoint for migrationstatus * Update pkg/services/apikey/apikeyimpl/xorm_store.go Co-authored-by: Karl Persson <kalle.persson@grafana.com> * changes the contet to also be primary * change id of version for footer component --------- Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com> Co-authored-by: Karl Persson <kalle.persson@grafana.com>
What is this feature?
This is part of our deprecation strategy for API keys. This does the following:
Why do we need this feature?
This feature is an improvement of our communication and functionality of deprecating API keys from Grafana. We were showing a bit too much about migration status which gave impression of migrating would be a big issue. This improves not only the performance by reducing a number of calls to the backend but also creates a better experience for the user flow (tested and approved by UX)
*Which issue(s) does this PR fix?**:
#58091
Fixes #
Special notes for your reviewer: