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

chore: deprecate template create command in favor of template push#11390

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
f0ssel merged 43 commits intomainfromf0ssel/templatepush-2
Jan 5, 2024

Conversation

f0ssel
Copy link
Contributor

@f0sself0ssel commentedJan 3, 2024
edited
Loading

Closes#9318

What this changes:

  • coder template create has been marked as deprecated and produces a warning pushing users topush andedit commands.
  • --create flag has been removed frompush in favor of automatically creating if template does not exist.
  • --private flag has been added tocoder template edit to meet parity with the previouscreate command flags.
  • disable_everyone_group_access bool has been added to the template edit API to support the new--private flag.
  • Update docs to change mentions ofcoder templates create tocoder templates push.

Examples:

➜  coder git:(f0ssel/templatepush-2) ✗ go run ./cmd/coder/main.go template createDEPRECATION WARNING: This command will be removed in a futurerelease.Use `coder templates push` command for creating and updating templates. Use `coder templates edit` command for editing template settings.
➜  coder git:(f0ssel/templatepush-2) go run ./cmd/coder/main.go template -h   coder v0.0.0-develUSAGE:  coder templates  Manage templates  Aliases: template  Templates are written in standard Terraform and describe the infrastructure for workspaces    - Make changes to your template, and plan the changes:          $ coder templates plan my-template       - Create or push an update to the template. Your developers can update their  workspaces:          $ coder templates push my-template SUBCOMMANDS:    archive     Archive unused or failed template versions from a given template(s)    create      DEPRECATED: Create a template from the current directory or as specified by flag    delete      Delete templates    edit        Edit the metadata of a template by name.    init        Get started with a templated template.    list        List all the templates available for the organization    pull        Download the active, latest, or specified version of a template to a path.    push        Create or update a template from the current directory or as specified by flag    versions    Manage different versions of the specified template———Run `coder --help` for a list of global options.

matifali reacted with rocket emoji
@ammarioGraphite App
Copy link
Member

I'm good with this change as it gets us closer to the ideal state. We will have to mark the PR as a breaking change.

@f0ssel
Copy link
ContributorAuthor

Great, I'll continue this one and mark it so. Thanks for the guidance on this one.

@f0ssel
Copy link
ContributorAuthor

@ammario One more thing, since this will be a breaking change - should we just bite the bullet and remove the create command altogether? Or is that too drastic? I figure it may be better than breaking people twice, once now and once again when we remove it. (And lets us do the cleanup now instead of possibly forgetting to do it later).

@ammarioGraphite App
Copy link
Member

That's a good point. We could go ahead and break "create" right now, but I don't think we should simply remove the command from the CLI as the error message would be scary. Instead, we can hide the subcommand and make it fail with something like "usepush instead with the same arguments".

@ammario
Copy link
Member

Hmm, I wonder if we can just makecreate an alias ofpush?

@f0sself0ssel changed the titlefix: remove settings flags from template create command (experiment)fix!: remove settings flags from template create command (experiment)Jan 4, 2024
@f0sself0ssel changed the titlefix!: remove settings flags from template create command (experiment)fix!: remove template create command in favor of template pushJan 4, 2024
@f0sself0ssel requested a review fromammarioJanuary 4, 2024 16:15
@f0ssel
Copy link
ContributorAuthor

I went ahead and just made the command produce an error instructing users topush oredit, since an alias would just produce generic invalid flag errors without any other information.

@f0sself0ssel marked this pull request as ready for reviewJanuary 4, 2024 17:44
@f0sself0ssel changed the titlefix!: remove template create command in favor of template pushfix!: deprecate template create command in favor of template pushJan 4, 2024
@f0sself0ssel changed the titlefix!: deprecate template create command in favor of template pushfix: deprecate template create command in favor of template pushJan 4, 2024
@github-actionsgithub-actionsbot added the release/breakingThis label is applied to PRs to detect breaking changes as part of the release process labelJan 4, 2024
@f0sself0ssel changed the titlefix: deprecate template create command in favor of template pushchore: deprecate template create command in favor of template pushJan 4, 2024
@github-actionsgithub-actionsbot changed the titlechore: deprecate template create command in favor of template pushchore!: deprecate template create command in favor of template pushJan 4, 2024
@f0sself0ssel removed the release/breakingThis label is applied to PRs to detect breaking changes as part of the release process labelJan 4, 2024
@f0sself0ssel changed the titlechore!: deprecate template create command in favor of template pushchore: deprecate template create command in favor of template pushJan 4, 2024
@f0sself0ssel requested a review fromsreyaJanuary 5, 2024 19:00
@f0ssel
Copy link
ContributorAuthor

@ammario@sreya I've made the changes we spoke about yesterday and this should be ready for review.

Copy link
Collaborator

@sreyasreya left a comment

Choose a reason for hiding this comment

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

It would be good if the command was marked as deprecrated in thecoder templates --help output

f0ssel reacted with thumbs up emoji
@f0sself0ssel requested a review fromsreyaJanuary 5, 2024 20:25
Copy link
Collaborator

@sreyasreya left a comment

Choose a reason for hiding this comment

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

LGTM, may be good to support deprecation inclibase but I don't have any suggestions for the best way to do it

@f0sself0sselforce-pushed thef0ssel/templatepush-2 branch from2cfd8df to13794fdCompareJanuary 5, 2024 20:48
@f0sself0sselenabled auto-merge (squash)January 5, 2024 21:00
@f0sself0ssel merged commitb21da38 intomainJan 5, 2024
@f0sself0ssel deleted the f0ssel/templatepush-2 branchJanuary 5, 2024 21:04
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 5, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@sreyasreyasreya approved these changes

@ammarioammarioAwaiting requested review from ammario

Assignees

@f0sself0ssel

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Fold template create into template push
3 participants
@f0ssel@ammario@sreya

[8]ページ先頭

©2009-2025 Movatter.jp