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

coder features list CLI command#3533

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
spikecurtis merged 10 commits intomainfromspike/3278_entitlements_cli
Aug 17, 2022
Merged

Conversation

spikecurtis
Copy link
Contributor

Fixes#3278

Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtisspikecurtis requested review fromkylecarbs anda teamAugust 17, 2022 16:12
@spikecurtisspikecurtis requested a review froma team as acode ownerAugust 17, 2022 16:12

client := coderdtest.New(t, nil)
coderdtest.CreateFirstUser(t, client)
cmd, root := clitest.New(t, "features", "list", "-o", "json")
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Possibly slightly weird is that when you do-o json you get the whole Entitlements struct, but when you do-o table (or default output), you only get the features in the table.

What is missing in the table output are the warnings, but our plan is to print license warnings afterevery CLI command, so when that is done you will still get them in the output.

Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

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

Just one comment on the API, but LGTM.

Comment on lines 37 to 40
type EntitlementsRequest struct {
// placeholder so that we can add request parameters in future
// without breaking changes to the go API
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm tempted not to do this unless we have certainty that all parameters would be optional.

Otherwise a syntax error wouldn't occur, but the API request may fail.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

We don't have certainty that all parameters will be optional, but adding a new non-optional parameter is always an API breaking change.

If we formulate things with this placeholder, we at least have a straightforward way to add optional parameters in future without a breaking change. It's true that we could doopts ...EntilementsRequestOptions in future, but that's inconsistent with how other methods work, so I added the placeholder...

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Hmm, well, looks like my hand is being forced to what you suggest anyway. Typescript doesn't like the empty struct from our autogenerated code, so I'll just drop this. Not worth fixing for something we're not crazy about in the first place.

kylecarbs reacted with thumbs up emoji
Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtisspikecurtis merged commitacd0cd6 intomainAug 17, 2022
@spikecurtisspikecurtis deleted the spike/3278_entitlements_cli branchAugust 17, 2022 18:26
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@kylecarbskylecarbskylecarbs 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.

Implement Entitlements API in AGPL
2 participants
@spikecurtis@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp