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

[COST-4877] Report correct PostgreSQL version #5019

Merged
merged 10 commits into from
Apr 9, 2024
Merged

Conversation

samdoran
Copy link
Contributor

@samdoran samdoran commented Apr 4, 2024

Jira Ticket

COST-4877

Description

The version string digits changed after PostgreSQL 9. Update the version string parsing to work with both version number schemas.

Change get_pg_engine_version method to return a string instead of list of ints. This makes it easier for the caller.

Use a simpler SQL command to get the version string from the database
Remove unecessary use of a global
Add more test cases

Testing

tox -- masu.test.api.test_db_performance.py

Release Notes

  • proposed release note
* [COST-4877] Report correct PostgreSQL version on metrics dashboard (#5019)

@samdoran samdoran requested review from a team as code owners April 4, 2024 20:59
@samdoran samdoran added the smoke-tests pr_check will build the image and run minimal required smokes label Apr 4, 2024
The version string digits changed after PostgreSQL 9. Update the version string
parsing to work with both version number schemas.

Change get_pg_engine_version method to return a string instead of list of ints.
This makes it easier for the caller.

This will need to be updated when PostgreSQL goes above version 99.

- Use a simpler SQL command to get the version string from the database
- Remove unecessary use of a global
- Add more test cases
Copy link

codecov bot commented Apr 4, 2024

Codecov Report

Merging #5019 (ef71c54) into main (afe17e9) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #5019   +/-   ##
=====================================
  Coverage   94.1%   94.1%           
=====================================
  Files        377     377           
  Lines      31322   31321    -1     
  Branches    3713    3711    -2     
=====================================
+ Hits       29479   29483    +4     
+ Misses      1174    1170    -4     
+ Partials     669     668    -1     

@samdoran samdoran force-pushed the fix-psql-version branch 3 times, most recently from 66c1bcf to ae96c8e Compare April 4, 2024 22:24
@samdoran samdoran enabled auto-merge (squash) April 8, 2024 13:54
@lcouzens
Copy link
Contributor

lcouzens commented Apr 9, 2024

@samdoran can we link this to a JIRA please.

@samdoran samdoran changed the title Report correct PostgreSQL version [COST-4877] Report correct PostgreSQL version Apr 9, 2024
@samdoran samdoran merged commit 77dbb76 into main Apr 9, 2024
11 checks passed
@samdoran samdoran deleted the fix-psql-version branch April 9, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smoke-tests pr_check will build the image and run minimal required smokes smokes-required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants