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

mysql_query: returns execution_time_ms list containing execution time per query #697

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

Andersson007
Copy link
Collaborator

@Andersson007 Andersson007 commented Jan 16, 2025

SUMMARY

Was requested for c.postgresql and I think it'd be nice to have this here too

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.05%. Comparing base (a45a0d0) to head (e7e5ed8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #697      +/-   ##
==========================================
- Coverage   79.43%   77.05%   -2.38%     
==========================================
  Files          32       20      -12     
  Lines        2815     2672     -143     
  Branches      703      678      -25     
==========================================
- Hits         2236     2059     -177     
- Misses        397      415      +18     
- Partials      182      198      +16     
Flag Coverage Δ
integration 76.42% <100.00%> (+0.07%) ⬆️
sanity ?
units ?

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Andersson007
Copy link
Collaborator Author

ready for review

@laurent-indermuehle
Copy link
Collaborator

Nice addition @Andersson007. I think this is ready.

I'm surprised this feature is not described in DB API 2.0 (PEP 249). Otherwise PyMySQL could have take care of this.

Copy link
Collaborator

@laurent-indermuehle laurent-indermuehle left a comment

Choose a reason for hiding this comment

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

I have just one question about line 159.
Since tests only checks if the returned value is bigger than 0, we never check what's returned.

plugins/modules/mysql_query.py Show resolved Hide resolved
@Andersson007
Copy link
Collaborator Author

I have just one question about line 159. Since tests only checks if the returned value is bigger than 0, we never check what's returned.

@laurent-indermuehle your suggestion has been committed, also answered the question

@laurent-indermuehle laurent-indermuehle merged commit 960ac32 into ansible-collections:main Jan 16, 2025
55 of 57 checks passed
@Andersson007
Copy link
Collaborator Author

@markuman @laurent-indermuehle thanks for reviewing!
@optica-phoffmann thanks for requesting the feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants