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: refactor deployment config#6347

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
ammario merged 89 commits intomainfrombigcli
Mar 7, 2023
Merged

feat: refactor deployment config#6347

ammario merged 89 commits intomainfrombigcli
Mar 7, 2023

Conversation

ammario
Copy link
Member

@ammarioammario commentedFeb 25, 2023
edited
Loading

This PR introduces a newbigcli package and refactorscoder server to use it instead of cobra/viper. It enables non-janky long-help formatting, doc generation, and YAML support. As a follow-up, I will convert the rest of thecoder CLI to usebigcli. After a month or two of stability, we can open sourcebigcli, probably replacing the defunctcoder/cli.

The line of codes should be around net zero, but the new code will be much easier to understand, maintain, and extend.

Breaking changes:

  • Removed long-deprecated Experimental flag

TODO

  • Support Git Auth
  • Manually confirm that environment variable and flag names match old implementation

Follow-on issues:

High-priority-cleanup

  • Generate CLI docs again
  • Convert the rest of the CLI to bigcli
  • Refactor rest ofcli/server_test.go to use "clitest.Start" for better cleanup and error reporting
  • Regenerate golden files

Other

  • Document / Validate YAML works
  • Send back telemetry for each server option, plus how they're set. This makes it easier to make / communicate breaking changes.
  • Document how Support Links work in the YAML
  • Generate all Deployment setting pages and navigation from Options array

Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

I haven't taken a look at the actual CLI output, but so far this seems like an improvement over what we have. I'd like to see the re-introduction of golden files (for the server command) so that visual changes are always verified.

It looks like a few things are still missing for this to be mergeable, so just leaving comments for now.

PS. I'm not sold on the name, what makes itbig? 😆.

return strings.Join(names, " ")
}

// FullName returns usage of the command, preceded
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
//FullName returns usage of the command, preceded
//FullUsage returns usage of the command, preceded


// FullName returns usage of the command, preceded
// by the usage of its parents.
func (c *Command) FullUsage() string {
Copy link
Member

Choose a reason for hiding this comment

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

When do we need to show parent command usage in addition to current command usage?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

We do so in the help template, perhaps not validly.

type OptionSet []Option

// Add adds the given Options to the OptionSet.
func (s *OptionSet) Add(opts ...Option) {
Copy link
Member

Choose a reason for hiding this comment

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

Consider updating function signature, since this is a set, we should do some verification/erroring here. Alternatively we may consider renaming, whichever makes more sense.


// ParseEnv parses the given environment variables into the OptionSet.
func (s *OptionSet) ParseEnv(globalPrefix string, environ []string) error {
var merr *multierror.Error
Copy link
Member

Choose a reason for hiding this comment

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

Should we consider usingerrors.Join instead? (I see we have one or two other uses of multierr currently, but we could nip that in the bud unless they give us something we need.

@ammario
Copy link
MemberAuthor

ammario commentedMar 6, 2023
edited
Loading

PS. I'm not sold on the name, what makes itbig? 😆.

Struggled to find a good name, butbig because it's meant to support bigger CLIs lol. If we think it's not very clear, I'm also down to use a more "cute" name likeserpent (following on the cobra/viper snake theme).

I'd like to see the re-introduction of golden files (for the server command) so that visual changes are always verified.

I added this as a high priority follow-up.

@ammarioammario requested a review fromkylecarbsMarch 6, 2023 19:19
@ammarioammario mentioned this pull requestMar 7, 2023
18 tasks
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.

Some manual stuff testing:

image
^See the lack of space betweenrunning andCoder

image
^It says "Git Authentication Providers" randomly

image
^It's worth manually checking if this is still working by default. I know the value was false before, but somehow internally I think it was actually true.

image
This is in the deployment settings.

@ammarioammario merged commit3b73321 intomainMar 7, 2023
@ammarioammario deleted the bigcli branchMarch 7, 2023 21:10
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 7, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri left review comments

@kylecarbskylecarbskylecarbs approved these changes

Assignees

@ammarioammario

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ammario@mafredri@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp