diff --git a/cli/packages/prisma-yml/src/Environment.ts b/cli/packages/prisma-yml/src/Environment.ts index 0571d0236a..f21185897b 100644 --- a/cli/packages/prisma-yml/src/Environment.ts +++ b/cli/packages/prisma-yml/src/Environment.ts @@ -251,9 +251,8 @@ export class Environment { } private initClusters(rc: RC): Cluster[] { - const rcClusters = this.getClustersFromRC(rc) const sharedClusters = this.getSharedClusters(rc) - return [...rcClusters, ...sharedClusters] + return [...sharedClusters] } private getSharedClusters(rc: RC): Cluster[] { @@ -269,23 +268,6 @@ export class Environment { }) } - private getClustersFromRC(rc: RC): Cluster[] { - if (!rc.clusters) { - return [] - } - return Object.keys(rc.clusters).map(name => { - const cluster = rc.clusters![name] - return new Cluster( - this.out, - name, - cluster.host, - cluster.clusterSecret, - isLocal(cluster.host), - false, - ) - }) - } - private getLocalClusterConfig() { return this.clusters .filter( diff --git a/cli/packages/prisma-yml/src/PrismaDefinition.ts b/cli/packages/prisma-yml/src/PrismaDefinition.ts index 7edde2f535..28441d3119 100644 --- a/cli/packages/prisma-yml/src/PrismaDefinition.ts +++ b/cli/packages/prisma-yml/src/PrismaDefinition.ts @@ -215,23 +215,6 @@ and execute ${chalk.bold.green( } getCluster(throws: boolean = false): Cluster | undefined { - const clusterName = this.getClusterName() - if (clusterName) { - const cluster = this.env.clusterByName(clusterName) - if (!cluster && clusterName !== 'local') { - if (throws) { - throw new Error( - `Cluster ${clusterName}, that is provided in the prisma.yml could not be found. -If it is a private cluster, make sure that you're logged in with ${chalk.bold.green( - 'prisma login', - )}`, - ) - } - } else if (cluster) { - return cluster - } - } - if (this.definition && this.endpoint) { const { clusterBaseUrl,