Revert "chore: Implement joins with golang templates (#6429)" (#6560)

This reverts commit 8b125d6c5d.
This commit is contained in:
Kyle Carberry
2023-03-10 10:39:02 -06:00
committed by GitHub
parent a8433b18e4
commit 7eb2c2ff6d
36 changed files with 660 additions and 894 deletions
@@ -204,7 +204,7 @@ func isEligibleForAutoStartStop(ws database.Workspace) bool {
func getNextTransition(
ws database.Workspace,
priorHistory database.WorkspaceBuildRBAC,
priorHistory database.WorkspaceBuild,
priorJob database.ProvisionerJob,
) (
validTransition database.WorkspaceTransition,
@@ -239,7 +239,7 @@ func getNextTransition(
// TODO(cian): this function duplicates most of api.postWorkspaceBuilds. Refactor.
// See: https://github.com/coder/coder/issues/1401
func build(ctx context.Context, store database.Store, workspace database.Workspace, trans database.WorkspaceTransition, priorHistory database.WorkspaceBuildRBAC, priorJob database.ProvisionerJob) error {
func build(ctx context.Context, store database.Store, workspace database.Workspace, trans database.WorkspaceTransition, priorHistory database.WorkspaceBuild, priorJob database.ProvisionerJob) error {
template, err := store.GetTemplateByID(ctx, workspace.TemplateID)
if err != nil {
return xerrors.Errorf("get workspace template: %w", err)
@@ -2,16 +2,17 @@ package executor_test
import (
"context"
"os"
"testing"
"time"
"github.com/google/uuid"
"go.uber.org/goleak"
"github.com/google/uuid"
"github.com/coder/coder/coderd/autobuild/executor"
"github.com/coder/coder/coderd/coderdtest"
"github.com/coder/coder/coderd/database"
"github.com/coder/coder/coderd/database/dbtestutil"
"github.com/coder/coder/coderd/schedule"
"github.com/coder/coder/coderd/util/ptr"
"github.com/coder/coder/codersdk"
@@ -492,7 +493,7 @@ func TestExecutorWorkspaceAutostopNoWaitChangedMyMind(t *testing.T) {
}
func TestExecutorAutostartMultipleOK(t *testing.T) {
if !dbtestutil.UsingRealDatabase() {
if os.Getenv("DB") == "" {
t.Skip(`This test only really works when using a "real" database, similar to a HA setup`)
}