Skip to content

chore: add archive column to template versions #10178

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

Merged
merged 5 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Linting
  • Loading branch information
Emyrk committed Oct 10, 2023
commit ba1310a67bef0164d1e41fec7c99ead5b3cb8274
4 changes: 2 additions & 2 deletions coderd/database/dbfake/dbfake.go
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ func (q *FakeQuerier) AllUserIDs(_ context.Context) ([]uuid.UUID, error) {
return userIDs, nil
}

func (q *FakeQuerier) ArchiveUnusedTemplateVersions(ctx context.Context, arg database.ArchiveUnusedTemplateVersionsParams) ([]uuid.UUID, error) {
func (q *FakeQuerier) ArchiveUnusedTemplateVersions(_ context.Context, arg database.ArchiveUnusedTemplateVersionsParams) ([]uuid.UUID, error) {
err := validateDatabaseType(arg)
if err != nil {
return nil, err
Expand Down Expand Up @@ -5340,7 +5340,7 @@ func (*FakeQuerier) TryAcquireLock(_ context.Context, _ int64) (bool, error) {
return false, xerrors.New("TryAcquireLock must only be called within a transaction")
}

func (q *FakeQuerier) UnarchiveTemplateVersion(ctx context.Context, arg database.UnarchiveTemplateVersionParams) error {
func (q *FakeQuerier) UnarchiveTemplateVersion(_ context.Context, arg database.UnarchiveTemplateVersionParams) error {
err := validateDatabaseType(arg)
if err != nil {
return err
Expand Down
4 changes: 1 addition & 3 deletions coderd/database/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"context"
"database/sql"
"encoding/json"
"fmt"
"sort"
"testing"
"time"
Expand Down Expand Up @@ -551,8 +550,7 @@ func createTemplateVersion(t testing.TB, db database.Store, tpl database.Templat
j.StartedAt = earlier
j.CompletedAt = now
default:
t.Fatal(fmt.Sprintf("invalid status: %s", args.Status))

t.Fatalf("invalid status: %s", args.Status)
}

dbgen.ProvisionerJob(t, db, nil, j)
Expand Down