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 worker-queue update #1531

Merged
merged 4 commits into from
Feb 6, 2024
Merged

fix worker-queue update #1531

merged 4 commits into from
Feb 6, 2024

Conversation

sunkickr
Copy link
Contributor

@sunkickr sunkickr commented Feb 6, 2024

Description

Worker queue update command was using worker concurrency default values for hybrid when it should be using the value for hosted.

🎟 Issue(s)

🧪 Functional Testing

manual testing

📸 Screenshots

Screenshot 2024-02-06 at 1 50 12 PM

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

assert.Equal(t, int(mockWorkerQueueDefaultOptions.MaxWorkers.Default), actualQueue.MaxWorkerCount)
})
t.Run("sets default worker concurrency for queue if user did not provide it", func(t *testing.T) {
actualQueue := SetWorkerQueueValues(10, 150, 0, mockWorkerQueue, mockWorkerQueueDefaultOptions)
actualQueue := SetWorkerQueueValues(10, 150, 0, mockWorkerQueue, mockWorkerQueueDefaultOptions, mockMachineOptions)
Copy link
Contributor

Choose a reason for hiding this comment

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

for this test are workerQueueDefaultOptions.WorkerConcurrency.Default and machineOptions.Concurrency.Default the same value so it wasn't caught?

Copy link
Contributor Author

@sunkickr sunkickr Feb 6, 2024

Choose a reason for hiding this comment

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

I don't think if they were different values it would be caught. workerQueueDefaultOptions.WorkerConcurrency.Default is only used by hybrid and machineOptions.Concurrency.Default. But SetWorkerQueueValues was setup assuming that they both use workerQueueDefaultOptions.WorkerConcurrency.Default and the tests were setup to reflect that. Just need to make sure that SetWorkerQueueValues uses mockMachineOptions for hosted deployments which the tests do now

@sunkickr sunkickr merged commit bd709fd into main Feb 6, 2024
3 checks passed
@sunkickr sunkickr deleted the fix-worker-queue branch February 6, 2024 19:51
kushalmalani pushed a commit that referenced this pull request Feb 7, 2024
* fix worker-queue update

* fix lint

* fix test

* fix tests
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