Skip to content

fix(enterprise/coderd): check provisionerd API version on connection #12191

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

Merged
merged 8 commits into from
Feb 16, 2024

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Feb 16, 2024

Extracted from #12021

Moves package coderd/util/apiversion to apiversion to avoid import cycles.
Adds a version check when a provisioner daemon attempts to connect to coderd.
We were not doing this before.
We assume that the API version is "1.0" if no version is specified.
Adds a test that a missing version parameter is treated as API version 1.0.

@johnstcn johnstcn self-assigned this Feb 16, 2024
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Moves package coderd/util/apiversion to apiversion to avoid import cycles.

I'm not opposed to the change but I saw nothing that would've cause an import cycle without the restructuring.

@johnstcn johnstcn merged commit a2cbb0f into main Feb 16, 2024
@johnstcn johnstcn deleted the cj/provisionerd-check-current-version branch February 16, 2024 18:43
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants