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

Fix stale deployment statuses #14095

Merged
merged 5 commits into from
Jun 17, 2024
Merged

Fix stale deployment statuses #14095

merged 5 commits into from
Jun 17, 2024

Conversation

collincchoy
Copy link
Contributor

@collincchoy collincchoy commented Jun 17, 2024

Similar (but different) to #14082 - this PR fixes a separate issue where Deployment statuses aren't being updated correctly. In particular, a work pool + queue with a running worker does not update a newly created deployment to READY.

Closes #13869

See #14097 for 2.x port.

Checklist

  • This pull request includes a label categorizing the change e.g. maintenance, fix, feature, enhancement, docs.
  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

@collincchoy collincchoy requested review from zangell44 and a team as code owners June 17, 2024 20:46
Base automatically changed from fix/paused-work-queues-auto-unpaused-to-active to main June 17, 2024 20:54
@collincchoy collincchoy added the fix A fix for a bug in an existing feature label Jun 17, 2024
@@ -1845,28 +1845,52 @@ async def test_updates_last_polled_on_a_multiple_work_queues(
assert work_queue.last_polled is None

async def test_updates_last_polled_on_a_full_work_pool(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changes to this test adds coverage that all requested work queues' last polled field gets updated regardless of their status which covers my changes to the polled_work_queue_ids up in the app code.

assert work_queue.last_polled > now

async def test_updates_work_queue_status_on_a_full_work_pool(
self, client, session, work_queues, work_pools
async def test_updates_statuses_on_a_full_work_pool(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this test now covers that both work queue statuses and deployment statuses are updated here.

There's one more pre-existing test after this one that checks a single deployment is updated correctly but this covers that multiple relevant deployments are updated regardless of work queue statuses

Copy link
Collaborator

@chrisguidry chrisguidry left a comment

Choose a reason for hiding this comment

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

Looks sharp to me!

@collincchoy collincchoy merged commit 7ffe562 into main Jun 17, 2024
26 checks passed
@collincchoy collincchoy deleted the fix/stale-deployment-statuses branch June 17, 2024 21:56
)

background_tasks.add_task(
mark_deployments_ready,
work_queue_ids=ready_work_queue_ids,
work_queue_ids=[wq.id for wq in work_queues],
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug in an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing deployment status in the UI
3 participants