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-5029] - Override start date for OCP infra mapping #5108

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

lcouzens
Copy link
Contributor

Jira Ticket

COST-5029

Description

This change will override the start date being passed into the check_cluster_infrastructure function so daily operator payload processing attempts to match clusters to cloud providers over a wider dataset.

Testing

  1. Checkout Branch
  2. Restart Koku
  3. load your fav OCP on Cloud data
  4. See everything correlate correctly
  5. Hit the resummary endpoint for you OCP provider with a date != to start of the month
    localhost:5042/api/cost-management/v1/report_data/?schema=org1234567&provider_uuid=1db0352d-e4df-4772-b4a0-90bac1e51b15&start_date=2024-05-10
  6. Check logs for passed in date being changed to start of month

Example log:
[2024-05-15 18:54:44,394] INFO 9fc8cd8e-d453-4764-b678-89587fbecafb 1818 {'message': 'checking if OCP cluster is running on cloud infrastructure', 'tracing_id': '', 'schema': 'org1234567', 'provider_uuid': '1db0352d-e4df-4772-b4a0-90bac1e51b15', 'cluster_id': 'test_cost_ocp_on_gcp_cluster_pom', 'cluster_alias': 'OCP source for cluster test_cost_ocp_on_gcp_cluster_pom', 'start_date': datetime.date(2024, 5, 1), 'end_date': datetime.date(2024, 5, 15)}

Release Notes

  • proposed release note
* [COST-####](https://issues.redhat.com/browse/COST-####) Fix daily OCP on Cloud provider matching

@lcouzens lcouzens added the ocp-smoke-tests pr_check will build the image and run ocp + ocp on [clouds] smoke tests label May 15, 2024
@lcouzens lcouzens requested review from a team as code owners May 15, 2024 18:57
@lcouzens lcouzens enabled auto-merge (squash) May 15, 2024 19:00
Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.2%. Comparing base (f5e18ee) to head (725b173).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #5108   +/-   ##
=====================================
  Coverage   94.2%   94.2%           
=====================================
  Files        378     378           
  Lines      31579   31581    +2     
  Branches    3754    3754           
=====================================
+ Hits       29732   29736    +4     
+ Misses      1177    1174    -3     
- Partials     670     671    +1     

@lcouzens lcouzens merged commit cbef59d into main May 15, 2024
11 checks passed
@lcouzens lcouzens deleted the COST-5029 branch May 15, 2024 22:00
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 smokes-required
Projects
None yet
2 participants