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-5492] Handle special characters in tag queries #5336

Merged
merged 12 commits into from
Oct 11, 2024

Conversation

bacciotti
Copy link
Contributor

Jira Ticket

COST-5492

Description

This change will handle special characters in tag queries, for instance white spaces and semicolons.

Testing

  1. Checkout Branch
  2. Restart Koku
  3. Ingest some tags with special characters, like app test or app;test
  4. Hit endpoint ?group_by[tag:app test]=* or ?group_by[tag:app;test]=*&order_by[tag:app;test]=asc
  5. You should see a code 200 response with proper data.

Release Notes

  • Handle special characters in tag queries
* [COST-5492](https://issues.redhat.com/browse/COST-5492) Handle special characters in tag queries

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.0%. Comparing base (b760cd3) to head (d9703f7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #5336   +/-   ##
=====================================
  Coverage   94.0%   94.0%           
=====================================
  Files        375     375           
  Lines      31616   31624    +8     
  Branches    4658    4658           
=====================================
+ Hits       29734   29742    +8     
- Misses      1201    1203    +2     
+ Partials     681     679    -2     

@bacciotti bacciotti added smoke-tests pr_check will build the image and run minimal required smokes and removed smokes-required labels Oct 7, 2024
@bacciotti
Copy link
Contributor Author

/retest

@bacciotti bacciotti enabled auto-merge (squash) October 7, 2024 18:10
@bacciotti
Copy link
Contributor Author

/retest

@bacciotti bacciotti added the ocp-smoke-tests pr_check will build the image and run ocp + ocp on [clouds] smoke tests label Oct 8, 2024
@bacciotti
Copy link
Contributor Author

/retest

1 similar comment
@bacciotti
Copy link
Contributor Author

/retest

koku/api/report/queries.py Outdated Show resolved Hide resolved
@samdoran
Copy link
Contributor

There are three places where the same string is being sanitized. Two are still using the regex method and one is using a translation table. The sanitizing functionality could be put into a function for consistency instead of doing the same thing in three different places.

@bacciotti bacciotti merged commit 28e9a54 into main Oct 11, 2024
13 of 14 checks passed
@bacciotti bacciotti deleted the COST-5492_handle_special_characters_tag_queries branch October 11, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ocp-smoke-tests pr_check will build the image and run ocp + ocp on [clouds] smoke tests 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.

2 participants