-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid sending template metadata update if
max_port_share_level
…
… is default (#190) Closes #188. For context, the `MaxPortShareLevel` template metadata value was not present on the `coderd` create template request prior to 2.15. As such, during template creation we need to send an update request for backwards compatibility (though we could probably remove this soon), see #110. Whilst we don't send this update request is the attribute is omitted on the resource, we were sending a spurious update request if the value was explicitly configured to the default value ('owner' for enterprise+, 'public' otherwise). This was causing the error in the linked issue. An example is seen in the newly added test. The fix is to just not send that update request if the configured value is: - Unknown - Equal to the value on the newly created template. note: I'd recommend hiding the whitespace when reviewing the diff
- Loading branch information
1 parent
aa3dbcd
commit 1d19415
Showing
2 changed files
with
144 additions
and
111 deletions.
There are no files selected for viewing
This file contains 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 file contains 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