-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[dbm] Handles mysql flexible server warning bug #18450
[dbm] Handles mysql flexible server warning bug #18450
Conversation
azure_deployment_type = "" | ||
if self._config.cloud_metadata.get("azure") is not None: | ||
azure_deployment_type = self._config.cloud_metadata.get("azure")["deployment_type"] |
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.
azure_deployment_type = "" | |
if self._config.cloud_metadata.get("azure") is not None: | |
azure_deployment_type = self._config.cloud_metadata.get("azure")["deployment_type"] | |
azure_deployment_type = self._config.cloud_metadata.get("azure", {}).get("deployment_type") |
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.
wouldn't I have to do some validation before comparing a string and a possible empty object? or python magic handles it? 🪄
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 azure_deployment_type is None, azure_deployment_type != 'flexible_server' will still be False.
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 see, i'm used to having type comparison errors
1cce25d
to
c9ee6d9
Compare
c9ee6d9
to
c4d8d02
Compare
What does this PR do?
A customer was seeing a wrong agent message in DBM UI while using Azure Flexible Server. Query Activity and Wait Event collection is not supported for MySQL Azure Flexible Server deployment type, so we should not emit the warning when this is the case.
Motivation
Customer support escalation.
Additional Notes
Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged