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

[dbm] Handles mysql flexible server warning bug #18450

Merged

Conversation

dalextorres
Copy link
Contributor

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.

Screenshot 2024-08-28 at 3 42 04 PM

Motivation

Customer support escalation.

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Changelog entries must be created for modifications to shipped code
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.73%. Comparing base (738dcb9) to head (c4d8d02).
Report is 12 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
mysql 88.63% <95.00%> (+65.99%) ⬆️
presto ?
solr ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Comment on lines 139 to 141
azure_deployment_type = ""
if self._config.cloud_metadata.get("azure") is not None:
azure_deployment_type = self._config.cloud_metadata.get("azure")["deployment_type"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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")

Copy link
Contributor Author

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? 🪄

Copy link
Contributor

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.

Copy link
Contributor Author

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

@dalextorres dalextorres force-pushed the alex.torres/remove-mysql-flexible-server-agent-warning branch 3 times, most recently from 1cce25d to c9ee6d9 Compare August 28, 2024 22:59
@dalextorres dalextorres force-pushed the alex.torres/remove-mysql-flexible-server-agent-warning branch from c9ee6d9 to c4d8d02 Compare August 29, 2024 16:57
@dalextorres dalextorres requested a review from lu-zhengda August 29, 2024 17:26
@dalextorres dalextorres merged commit c57fa4e into master Aug 29, 2024
40 checks passed
@dalextorres dalextorres deleted the alex.torres/remove-mysql-flexible-server-agent-warning branch August 29, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants