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-5195] - Prevent duplicate OCP cost model tasks #5190

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

lcouzens
Copy link
Contributor

@lcouzens lcouzens commented Jun 26, 2024

Jira Ticket

COST-5195

Description

This change will add a new worker cached args check to add and validate that no current cost model tasks have been queued matching the same args before queuing a new task.

Testing

  1. Checkout Branch

  2. Restart Koku with multiple workers

  3. Load OCP data with a cost model

  4. Add the following wait and log message to the update_cost_model_costs task.

     LOG.info(f"\n\n WAITING ON COST MODEL TASK \n\n")
     import time; time.sleep(100)
    
  5. Generate new OCP data and post it via masu

  6. Worker 1 should process the data then hang in the sleep (Simulating a task in-progress)

  7. Generate/post new data again

  8. See the second worker downloads/processes the report but this time logs the following. cost model update for range already queued, skipping new task.

Release Notes

  • proposed release note
* [COST-5195](https://issues.redhat.com/browse/COST-5195) Prevent duplicate cost model update task being queued

@lcouzens lcouzens requested review from a team as code owners June 26, 2024 12:44
@lcouzens lcouzens added the ocp-smoke-tests pr_check will build the image and run ocp + ocp on [clouds] smoke tests label Jun 26, 2024
@lcouzens lcouzens changed the title [COST-5195] - Prevent duplicate OCP summary tasks [COST-5195] - Prevent duplicate OCP cost model tasks Jun 26, 2024
@lcouzens lcouzens removed the ocp-smoke-tests pr_check will build the image and run ocp + ocp on [clouds] smoke tests label Jun 27, 2024
@lcouzens lcouzens marked this pull request as draft June 27, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant