Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add dynamic parameter warning if missing metadata#17809

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 9 commits intomainfromstevenmasley/old_version
May 14, 2025

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedMay 13, 2025
edited
Loading

EDIT: I made it anerror instead of a warning

Templates from before

Screenshot From 2025-05-13 16-57-59

Templates on an old provisioner

Screenshot From 2025-05-13 17-00-14

Dynamic parameters require the latest provisioner to function
@EmyrkEmyrk changed the titlechore: previous template versions missing dynamic param metadatachore: add dynamic param metadata to previous template versionsMay 13, 2025
@EmyrkEmyrk marked this pull request as ready for reviewMay 13, 2025 22:16
@EmyrkEmyrk requested a review fromaslilacMay 14, 2025 14:38
func NewServer(lifecycleCtx context.Context,
func NewServer(
lifecycleCtx context.Context,
apiVersion string,
Copy link
Member

Choose a reason for hiding this comment

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

I don't feel like coderd should be telling the provisioner what it's version is. This would break on deployments with external provisioners that are on an older version. and I know that's not really a thing we prioritize supporting, but this masks over the mismatched versions in a bad way.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Coderd does not tell the provisioner.

External provisioners call coderd viaprovisionerDaemonServe

In that, they add a query param of their version:

apiVersion:="1.0"
ifqv:=r.URL.Query().Get("version");qv!="" {
apiVersion=qv
}

Which is saved to the DB, and what we show on the provisioners page:

And in that serve function, that apiVersion is sent to the go routine that manages the gRPC connection:

So theapiVersion in thatNewServer is the Coderd side of the provisioner. And that version is sourced from the external provisionerd

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The daemon client sends the version here:

query.Add("version",proto.CurrentVersion.String())

Idk why it sets it twice

@EmyrkEmyrk changed the titlechore: add dynamic param metadata to previous template versionschore: add dynamic parameter warning if missing metadataMay 14, 2025
func parameterProvisionerVersionDiagnostic(tf database.TemplateVersionTerraformValue) hcl.Diagnostics {
missingMetaData := hcl.Diagnostic{
Severity: hcl.DiagError,
Summary: "This template version is missing required metadata to support dynamic parameters. Go back to the classic creation flow.",
Copy link
Member

Choose a reason for hiding this comment

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

hmm. I don't like this. I would much prefer if we could have a way to expose this naturally to the frontend, forcing it over to the classic form. why make everyone click the "dynamic parameters suck" button? that's a super bad first impression

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

You are right, it is unfortunate. I want to get this in first, just to get an error up if someone toggles on dev and get this detection in. I will build on this experience.

We just needsomething now, otherwise it fails silently.

Emyrkand others added2 commitsMay 14, 2025 11:41
Co-authored-by: ケイラ <mckayla@hey.com>
@EmyrkEmyrk merged commit789c4be intomainMay 14, 2025
34 checks passed
@EmyrkEmyrk deleted the stevenmasley/old_version branchMay 14, 2025 17:21
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 14, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Emyrk@aslilac

[8]ページ先頭

©2009-2025 Movatter.jp