Skip to content

Conversation

@bluesliverx
Copy link
Contributor

What does this PR do?

Adds a fresh connection variable for mysql_cache and fixes some other small issues that we've encountered in production at scale.

What issues does this PR fix or reference?

Fixes: #63991

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@bluesliverx bluesliverx requested a review from a team as a code owner March 28, 2023 22:19
@bluesliverx bluesliverx requested review from cmcmarrow and removed request for a team March 28, 2023 22:19
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Fix 63991: Add option to use a fresh connection for mysql cache [master] Fix 63991: Add option to use a fresh connection for mysql cache Mar 28, 2023
@bluesliverx bluesliverx force-pushed the patch-mysql branch 2 times, most recently from e1a3361 to 86be273 Compare March 29, 2023 13:35
@bluesliverx
Copy link
Contributor Author

Not sure how to rerun the tests, so I just amended the commit and repushed. I cannot see how what I did could cause failures to git checkout, outright failures to run the job, etc.

@whytewolf
Copy link
Collaborator

Not sure how to rerun the tests, so I just amended the commit and repushed. I cannot see how what I did could cause failures to git checkout, outright failures to run the job, etc.

don't think it was you. GitHub actions was having some problems earlier in the day.

Copy link
Contributor

@cmcmarrow cmcmarrow left a comment

Choose a reason for hiding this comment

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

Thank you for the PR, Just one request.

try:
# MySQLdb import failed, try to import PyMySQL
import pymysql
from pymysql.err import InterfaceError
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than making a throw away InterfaceError can we just wrap from pymysql.err import InterfaceError in its own try catch before we init the other stuff?

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 could, but then how would I reference InterfaceError below where it is caught without creating the class? I guess I'm not seeing what it buys us, but I'm probably missing something :)

@bluesliverx
Copy link
Contributor Author

@cmcmarrow I responded to your request. I could use some more details on what exactly you were looking for.

@bluesliverx bluesliverx temporarily deployed to ci April 24, 2023 00:44 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci April 24, 2023 00:44 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci April 24, 2023 00:44 — with GitHub Actions Inactive
@bluesliverx
Copy link
Contributor Author

@cmcmarrow still looking for another review/response to my questions.

@bluesliverx bluesliverx temporarily deployed to ci May 8, 2023 14:24 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci May 8, 2023 14:25 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci May 8, 2023 14:26 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci May 8, 2023 15:34 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci May 8, 2023 15:34 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci May 8, 2023 15:34 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci May 8, 2023 15:57 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci May 8, 2023 15:57 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci May 8, 2023 15:57 — with GitHub Actions Inactive
@bluesliverx
Copy link
Contributor Author

Can anyone help out with a review since @cmcmarrow seems to be MIA?

@bluesliverx
Copy link
Contributor Author

@Ch3LL I'm only pinging you because you seem to the only one consistent at responding, any chance we can get this reassigned? I've been waiting for a response from @cmcmarrow for a couple of months... I'm not in a huge hurry, but might be nice to get this in before salt 3007.

Copy link
Contributor

@Ch3LL Ch3LL left a comment

Choose a reason for hiding this comment

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

This looks good to me, but I would like to get @garethgreenaway 's sign off as well since he has been in the mysql code the most.

@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 00:10 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 00:11 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 00:11 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 00:29 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 00:33 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 01:48 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 21:37 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 21:37 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 21:50 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 21:51 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 21:52 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 22:05 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 23:11 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 23:11 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 23:11 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 23:11 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 23:11 — with GitHub Actions Inactive
@bluesliverx bluesliverx temporarily deployed to ci June 8, 2023 23:11 — with GitHub Actions Inactive
@garethgreenaway garethgreenaway merged commit 7da18aa into saltstack:master Jun 9, 2023
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.

[BUG] MySql cache implementation has issues at scale using pymysql

5 participants