- Notifications
You must be signed in to change notification settings - Fork3
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
Merged
ethanndickson merged 1 commit intomainfrom09-30-feat_add_template_max_port_sharing_level_attributeOct 1, 2024
Merged
feat: add template max port sharing level attribute#110
ethanndickson merged 1 commit intomainfrom09-30-feat_add_template_max_port_sharing_level_attributeOct 1, 2024
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This stack of pull requests is managed by Graphite.Learn more about stacking. Join@ethanndickson and the rest of your teammates on |
bc9fa48
to92e865b
Compare92e865b
todcf7db0
Comparedeansheather approved these changesSep 30, 2024
880e17d
intomain 14 checks passed
Uh oh!
There was an error while loading.Please reload this page.
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
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.
Uh oh!
There was an error while loading.Please reload this page.
This is a somewhat hacky, temporary, solution to#108.
Prior to Coder
v2.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 to
v2.15.0
, we'll remove the redundant update request.