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

Check that minProcesses times the nr of queues is less than maxProcesses #1289

Closed
wants to merge 1 commit into from

Conversation

PrinsFrank
Copy link
Contributor

@PrinsFrank PrinsFrank commented Jun 22, 2023

When changing the number for minProcesses, maxProcesses or the amount of queues for a supervisor, there might be 0 processes assigned for all queues within a supervisor. This happens when minProcesses * count(queues) is more than maxProcesses:

'environments' => [
    'production' => [
        'supervisor-1' => [
            'minProcesses' => 2,
            'maxProcesses' => 5,
            'queues' => ['queue-1', 'queue-2', 'queue-3']
        ]
    ]
],

This PR adds an exception to prevent this from silently happening.

If maxProcesses is less than the number of queues, the maxProcesses is ignored and a process is added for each queue silently. This will still work after this change, but might be unexpected as well.

@PrinsFrank
Copy link
Contributor Author

Sorry, this is a breaking change and currently only results in supervisors with zero processes but horizon still starts. I'll fix the underlying issue in the autoscaler.

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.

1 participant