Skip to content

feat: archive template versions to hide them from the ui #10086

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 40 commits into from

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Oct 5, 2023

Moved to #10179

What this does

Allows "archiving" template versions to clean them up from the UX. By default archived are not listed when calling /versions for a template. This action is reversible. Archived versions cannot be promoted or used in workspace builds.

Template versions that are in use or the current active template version cannot be archived.

Closes #9478

Cli Commands

Archive a template

# Archive all failed template versions for the template 'docker'
$ coder templates archive docker
# Archive all unused template versions
$ coder templates archive docker --all

Screenshot from 2023-10-09 18-21-59

Archive a template version

Archive/unarchive specific versions.

# Archive
$ coder templates versions archive docker strange_khorana9
Version strange_khorana9 archived at Oct  9 18:22:41


# Unarchive
$ coder templates versions unarchive docker strange_khorana9
Version strange_khorana9 unarchived at Oct  9 18:22:41

Future Work

  • Allow the UI to see archived versions with some toggle
  • Allow UI to archive/unarchive versions

Open issues

  • Deleted workspaces "reserve" a template version from archiving.

@Emyrk Emyrk changed the title feat: add soft delete to template versions feat: archiving template versions to "hide" from UX Oct 9, 2023
@Emyrk Emyrk requested a review from johnstcn October 9, 2023 23:38
@Emyrk Emyrk changed the title feat: archiving template versions to "hide" from UX feat: archive template versions to hide them from the ui Oct 10, 2023
@Emyrk Emyrk marked this pull request as ready for review October 10, 2023 00:28
kylecarbs and others added 11 commits October 9, 2023 19:36
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: add `external-auth` cli

* Add subcommands

* Improve descriptions

* Add external-auth subcommand

* Fix docs

* Fix gen

* Fix comment

* Fix golden file
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

This is too large a PR to review well in its current state. Could you please break it up into a few smaller ones?

Suggestion (but up to you):

  • Database-related changes
  • API/CLI-related changes
  • Other misc plumbing as required, golden files, etc.

I also see changes relating to ExternalAuth in this PR, which I don't believe are correct.

@Emyrk
Copy link
Member Author

Emyrk commented Oct 10, 2023

@johnstcn the external auth stuff is not my change... I merged in main and now I am seeing a lot more diffs. Will figure out what happened... The merge worked without any conflict, didn't expect this 🤔

@Emyrk
Copy link
Member Author

Emyrk commented Oct 10, 2023

The diff before was wildly inaccurate, I am unsure what happened there. I merged with main again and now the diff is correct.

I can break this up though

@johnstcn
Copy link
Member

Yeah I have no clue what went on with the diff!

I can break this up though

Please do! I know it's annoying to do, but smaller diffs are easier to review.

@Emyrk
Copy link
Member Author

Emyrk commented Oct 10, 2023

Moved to #10179

@Emyrk Emyrk closed this Oct 10, 2023
@Emyrk Emyrk deleted the stevenmasley/soft_delete_versions branch January 9, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Archive old template versions
5 participants