-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Upgrade Assistant] Add deprecation logging as step on overview page #126277
[Upgrade Assistant] Add deprecation logging as step on overview page #126277
Conversation
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
setIsComplete(false); | ||
} | ||
|
||
setIsComplete(logsCount?.count === 0); |
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 love that we're bubbling this state up to the steps UI. If this step is marked as incomplete, does it block the user from upgrading? If so, then I'm concerned about users being blocked from upgrading in the event an Elastic-triggered log shows up and they have no way to fix it. Maybe I'm just being paranoid, but given the trouble we had with these logs originally I think we might want to err on the side of caution.
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.
Ah, good catch! I didn't realize we were blocking the upgrade on cloud, but now I see that we are. I will remove this.
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.
Actually, on further review, I see that we are calling the status route to determine whether or not the upgrade button is disabled. This takes into account any critical deprecations from ES or Kibana, and whether the system indices migration is needed. It does not check deprecation logs.
With that said, I think the current approach is OK to leave as-is.
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.
👍 Thanks for looking into it. Just wanted to make sure the actual button in UA that takes you to Cloud isn't disabled by the incomplete state of the step. But I believe that button is enabled/disabled based on the Status API, right? That's literally what you wrote. 🤦 Thanks!
@elasticmachine merge upstream |
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.
Thanks for making these changes @alisonelizabeth! code lgtm, tested locally. Left one small question 🚀
|
||
<EuiSpacer /> | ||
|
||
<EuiButton onClick={navigateToEsDeprecationLogs} data-test-subj="viewLogsLink"> |
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.
if a user doesn't have index privileges, the only thing they can do in the es deprecation logs page
is enable/disable log collection right? Wondering if it's worthy to still show this CTA in that case 🤔
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.
That's correct. I was on the fence for this as well. I'm going to go ahead and remove it.
I looked back at the previous code when it was part of the deprecations step, and I see we weren't showing the sentence/link to the deprecation logs when a user did not have privileges.
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 am wondering if the title of the step shouldn't be simply "Address Elasticsearch deprecations" or "Address API deprecations" |
Thanks for the feedback @sebelga! That's a good point. @jrodewig would you mind weighing in here on the copy? |
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.
Thanks for the ping. This looks good overall, but I think the missing privileges error needs some work.
I also left some other non-blocking suggestions.
|
||
const i18nTexts = { | ||
logsStepTitle: i18n.translate('xpack.upgradeAssistant.overview.logsStep.title', { | ||
defaultMessage: 'Address deprecation logs', |
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 don't feel strongly about it, but I like @sabarasaba's suggestion here.
defaultMessage: 'Address deprecation logs', | |
defaultMessage: 'Address API deprecations', |
}), | ||
logsStepDescription: i18n.translate('xpack.upgradeAssistant.overview.logsStep.description', { | ||
defaultMessage: | ||
'Review the Elasticsearch deprecation logs to make sure you are not using deprecated APIs.', |
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.
Minor wording nit.
'Review the Elasticsearch deprecation logs to make sure you are not using deprecated APIs.', | |
'Review the Elasticsearch deprecation logs to ensure you're not using deprecated APIs.', |
enableLogsButtonLabel: i18n.translate( | ||
'xpack.upgradeAssistant.overview.logsStep.enableLogsButtonLabel', | ||
{ | ||
defaultMessage: 'Enable logs', |
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.
"Enabled logging" sounds a bit more natural to me.
defaultMessage: 'Enable logs', | |
defaultMessage: 'Enable logging', |
} | ||
), | ||
loadingError: i18n.translate('xpack.upgradeAssistant.overview.logsStep.loadingError', { | ||
defaultMessage: 'An error occurred while retrieving the count of deprecation logs', |
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.
defaultMessage: 'An error occurred while retrieving the count of deprecation logs', | |
defaultMessage: 'An error occurred while retrieving the deprecation log count', |
missingPrivilegesTitle: i18n.translate( | ||
'xpack.upgradeAssistant.overview.logsStep.missingPrivilegesTitle', | ||
{ | ||
defaultMessage: 'You require index privileges to analyze the deprecation logs', |
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.
This wording is a little awkward to me, and I don't think it stands on its own.
Can we add a description that includes the required index privileges and the indices you need them on?
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.
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.
Copy changes LGTM. Thanks @alisonelizabeth.
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
Fixes #125842
This PR makes the deprecation logging feature more prominent in Upgrade Assistant by adding it as its own separate step on the Overview page.
Screenshots
// Deprecation logging enabled
// Deprecation logging disabled
// Error state
// Missing privileges
// New test coverage