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-1165: Add Priority worker/queue. #2741

Merged
merged 5 commits into from
Mar 22, 2021
Merged

COST-1165: Add Priority worker/queue. #2741

merged 5 commits into from
Mar 22, 2021

Conversation

myersCody
Copy link
Contributor

@myersCody myersCody commented Mar 18, 2021

How to Test

Testing Sources Delete

  1. Bring up the koku server with:
docker-compose -f testing/compose_files/docker-compose-multiworker.yml up
  1. Using the sources api, add a source. (If you need help with this step feel free to reach out)
  2. Using the sources api, delete a source and watch the priority-worker logs. Example:
priority_worker    | [2021-03-18 18:08:40,743] INFO 5ce0e4d2-7ccc-4bfc-a412-f3674730ecab Deleting Provider 7b848818-e4c8-43d4-944f-56ae3b50c4d9 for Source ID: 2
priority_worker    | [2021-03-18 18:08:40,743: INFO/ForkPoolWorker-1] Deleting Provider 7b848818-e4c8-43d4-944f-56ae3b50c4d9 for Source ID: 2

Testing Cost Model Updates

  1. Bring up the koku server with:
docker-compose -f testing/compose_files/docker-compose-multiworker.yml up
  1. Add a source
    Note: This one does not have to be through the sources api, it can be any source.
  2. After the source is added, add a cost model by posting the json to the cost model endpoint.
    Then check the logs to make sure the priority-worker picked up the cost-model update:
priority-worker    | [2021-03-22 15:54:27,257: INFO/ForkPoolWorker-1] [masu.processor.tasks.update_cost_model_costs(c16201d0-0a2a-4c3a-9667-c92a1c38a38f via c16201d0-0a2a-4c3a-9667-c92a1c38a38f)] update_cost_model_costs called with args:
priority-worker    |  schema_name: acct10001,
priority-worker    |  provider_uuid: 595e8cde-0dfe-4083-83fa-0bd30de28867

e2e changes: https://github.com/RedHatInsights/e2e-deploy/pull/2896

@myersCody myersCody self-assigned this Mar 18, 2021
koku/masu/processor/tasks.py Outdated Show resolved Hide resolved
koku/masu/processor/tasks.py Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #2741 (5abbeed) into master (7246f95) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@          Coverage Diff           @@
##           master   #2741   +/-   ##
======================================
  Coverage    94.7%   94.7%           
======================================
  Files         289     289           
  Lines       22364   22365    +1     
  Branches     2550    2550           
======================================
+ Hits        21178   21179    +1     
- Misses        714     716    +2     
+ Partials      472     470    -2     

@myersCody myersCody marked this pull request as ready for review March 22, 2021 17:03
@myersCody myersCody changed the title WIP: COST-1165: Add Priority worker/queue. COST-1165: Add Priority worker/queue. Mar 22, 2021
Copy link
Member

@maskarb maskarb left a comment

Choose a reason for hiding this comment

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

lgtm!

@myersCody myersCody merged commit 0c68f06 into master Mar 22, 2021
@myersCody myersCody deleted the issues/1165 branch March 22, 2021 18:02
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