Skip to content

Commit b3cc444

Browse files
authored
fixed bug in prepared query (#1111)
1 parent f7c9080 commit b3cc444

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

gateway/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM golang:1.13.5-alpine3.10
22
WORKDIR /build
33

44
# Take the current space cloud version as a argument
5-
ARG SC_VERSION=0.18.1
5+
ARG SC_VERSION=0.18.2
66

77
# Copy all the source files
88
COPY . .
@@ -16,7 +16,7 @@ RUN GOOS=linux CGO_ENABLED=0 go build -a -ldflags '-s -w -extldflags "-static"'
1616
RUN echo $SC_VERSION && wget https://storage.googleapis.com/space-cloud/mission-control/mission-control-v$SC_VERSION.zip && unzip mission-control-v$SC_VERSION.zip
1717

1818
FROM alpine:3.10
19-
ARG SC_VERSION=0.18.1
19+
ARG SC_VERSION=0.18.2
2020

2121
RUN apk --no-cache add ca-certificates
2222

gateway/modules/crud/crud.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ func (m *Module) SetConfig(project string, crud config.Crud) error {
145145
v.DBName = project
146146
}
147147

148+
// Add the prepared queries in this db
149+
for id, query := range v.PreparedQueries {
150+
m.queries[getPreparedQueryKey(strings.TrimPrefix(k, "sql-"), id)] = query
151+
}
152+
148153
if m.block != nil {
149154
// Skip if the connection string is the same
150155
if m.block.IsSame(v.Conn, v.DBName) {
@@ -183,11 +188,6 @@ func (m *Module) SetConfig(project string, crud config.Crud) error {
183188
m.dbType = v.Type
184189
m.block = c
185190
m.alias = strings.TrimPrefix(k, "sql-")
186-
187-
// Add the prepared queries in this db
188-
for id, query := range v.PreparedQueries {
189-
m.queries[getPreparedQueryKey(strings.TrimPrefix(k, "sql-"), id)] = query
190-
}
191191
}
192192
m.initBatchOperation(project, crud)
193193
return nil

gateway/utils/constants.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
)
66

77
// BuildVersion is the current version of Space Cloud
8-
const BuildVersion = "0.18.1"
8+
const BuildVersion = "0.18.2"
99

1010
const (
1111
// One operation returns a single document from the database

install-manifests/kubernetes/local/space-cloud.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ spec:
163163
containers:
164164
- name: runner
165165
command: ["./app", "start"]
166-
image: spaceuptech/runner:0.18.1
166+
image: spaceuptech/runner:0.18.2
167167
imagePullPolicy: IfNotPresent # IfNotPresent | Always
168168
env:
169169
- name: "LOG_LEVEL"
@@ -341,7 +341,7 @@ spec:
341341
containers:
342342
- name: gateway
343343
command: ["./app", "run"]
344-
image: spaceuptech/gateway:0.18.1
344+
image: spaceuptech/gateway:0.18.2
345345
imagePullPolicy: IfNotPresent # IfNotPresent | Always
346346
env:
347347
- name: "NODE_ID"

install-manifests/kubernetes/prod/space-cloud.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ spec:
163163
containers:
164164
- name: runner
165165
command: ["./app", "start"]
166-
image: spaceuptech/runner:0.18.1
166+
image: spaceuptech/runner:0.18.2
167167
imagePullPolicy: IfNotPresent # IfNotPresent | Always
168168
env:
169169
- name: "LOG_LEVEL"
@@ -345,7 +345,7 @@ spec:
345345
containers:
346346
- name: gateway
347347
command: ["./app", "run"]
348-
image: spaceuptech/gateway:0.18.1
348+
image: spaceuptech/gateway:0.18.2
349349
imagePullPolicy: IfNotPresent # IfNotPresent | Always
350350
env:
351351
- name: "NODE_ID"

runner/model/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package model
22

33
// Version represents the current runner version
4-
const Version string = "v0.18.1"
4+
const Version string = "v0.18.2"

space-cli/cmd/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package cmd
22

3-
const version string = "0.18.1"
3+
const version string = "0.18.2"

0 commit comments

Comments
 (0)