[agent/docker] replace SSH opt-in by env types #940
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses issue #887 in which SSH jobs can wait indefinitely in the queue if no agent has SSH capability enabled because jobs are added based on the environment availability and removed based on what agents are capable.
It replaces the
ssh_allowedenvironment parameter opt-in by multiple environment types. This ensures the job will always be treated as it won't be sent to the queue if the environment type has not been announced. It also removes any SSH awareness from the queue and keep that concept in the specific environment code.Another solution would have been to make the client code aware of SSH and prevent the job from getting in the queue, but that would have been heavier in terms of lines of code and would have introduced agent specificities into the common code.