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

feat: add template max port sharing level attribute#110

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

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedSep 30, 2024
edited
Loading

This is a somewhat hacky, temporary, solution to#108.

Prior to Coderv2.15.0 (viacoder/coder#14366), it was not possible to set the max port sharing level when the template was created. To retain compatibility between the template resource and older, supported, versions of Coder, the provider will make aPATCH request immediately after creating the template to set the max port sharing level.

When we no longer support versions of Coder prior tov2.15.0, we'll remove the redundant update request.

stirby reacted with heart emoji
@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@ethanndickson and the rest of your teammates onGraphiteGraphite

@ethanndicksonethanndicksonforce-pushed the09-30-feat_add_template_max_port_sharing_level_attribute branch 2 times, most recently frombc9fa48 to92e865bCompareSeptember 30, 2024 04:50
@ethanndicksonethanndickson marked this pull request as ready for reviewSeptember 30, 2024 04:56
@ethanndicksonethanndicksonforce-pushed the09-30-feat_add_template_max_port_sharing_level_attribute branch from92e865b todcf7db0CompareSeptember 30, 2024 04:56
@ethanndicksonethanndickson merged commit880e17d intomainOct 1, 2024
14 checks passed
@ethanndicksonethanndickson deleted the 09-30-feat_add_template_max_port_sharing_level_attribute branchOctober 1, 2024 04:20
ethanndickson added a commit that referenced this pull requestFeb 26, 2025
… is default (#190)Closes#188.For context, the `MaxPortShareLevel` template metadata value was notpresent on the `coderd` create template request prior to 2.15. As such,during template creation we need to send an update request for backwardscompatibility (though we could probably remove this soon), see#110.Whilst we don't send this update request is the attribute is omitted onthe resource, we were sending a spurious update request if the value wasexplicitly configured to the default value ('owner' for enterprise+,'public' otherwise). This was causing the error in the linked issue. Anexample is seen in the newly added test.The fix is to just not send that update request if the configured valueis:- Unknown- Equal to the value on the newly created template.note: I'd recommend hiding the whitespace when reviewing the diff
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@deansheatherdeansheatherdeansheather approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ethanndickson@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp