Skip to content

Commit 3120bd8

Browse files
committed
feat(be): boltdb deprecated label
1 parent a113ba7 commit 3120bd8

File tree

6 files changed

+38
-9
lines changed

6 files changed

+38
-9
lines changed

cli/setup/setup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func InteractiveSetup(conf *util.ConfigType) {
113113

114114
dbPrompt := `What database to use:
115115
1 - MySQL
116-
2 - BoltDB
116+
2 - BoltDB (DEPRECATED!!!)
117117
3 - PostgreSQL
118118
4 - SQLite
119119
`

db/sql/migrations/v2.16.0.err.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
alter table `project__environment` drop `source_storage_id`;
2+
alter table `project__environment` drop `source_storage_key`;
13
alter table `access_key` drop `storage_id`;
24
alter table `access_key` drop `source_storage_id`;
35
alter table `access_key` drop `source_storage_key`;

db/sql/migrations/v2.16.0.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ create table project__secret_storage (
1818
alter table `access_key` add `storage_id` int null references `project__secret_storage`(`id`);
1919

2020
alter table `access_key` add `source_storage_id` int null references `project__secret_storage`(`id`);
21-
alter table `access_key` add `source_storage_key` varchar(1000);
21+
alter table `access_key` add `source_storage_key` varchar(1000);
22+
23+
alter table `project__environment` add `source_storage_id` int null references `project__secret_storage`(`id`);
24+
alter table `project__environment` add `source_storage_key` varchar(1000);

util/config.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ var Cookie *securecookie.SecureCookie
3434
var WebHostURL *url.URL
3535

3636
const (
37-
DbDriverMySQL = "mysql"
38-
// Deprecated: replaced with sqlite
39-
DbDriverBolt = "bolt"
37+
DbDriverMySQL = "mysql"
38+
DbDriverBolt = "bolt" // Deprecated: replaced with sqlite
4039
DbDriverPostgres = "postgres"
4140
DbDriverSQLite = "sqlite"
4241
)
@@ -203,7 +202,7 @@ type DebuggingConfig struct {
203202
// ConfigType mapping between Config and the json file that sets it
204203
type ConfigType struct {
205204
MySQL *DbConfig `json:"mysql,omitempty"`
206-
BoltDb *DbConfig `json:"bolt,omitempty"`
205+
BoltDb *DbConfig `json:"bolt,omitempty"` // Deprecated
207206
Postgres *DbConfig `json:"postgres,omitempty"`
208207
SQLite *DbConfig `json:"sqlite,omitempty"`
209208

web/src/components/EnvironmentForm.vue

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,36 @@
5353
:rules="[v => !!v || $t('name_required')]"
5454
required
5555
:disabled="formSaving"
56-
class="mb-2"
5756
outlined
5857
dense
5958
></v-text-field>
6059

60+
<v-row>
61+
<v-col>
62+
<v-autocomplete
63+
v-model="item.source_storage_id"
64+
:label="$t('Secret Storage (optional)')"
65+
:items="secretStorages"
66+
:disabled="formSaving"
67+
item-value="id"
68+
item-text="name"
69+
outlined
70+
dense
71+
clearable
72+
/>
73+
</v-col>
74+
<v-col>
75+
76+
<v-text-field
77+
v-model="item.source_storage_key"
78+
:label="$t('Source Key')"
79+
:disabled="formSaving || !item.source_storage_id"
80+
outlined
81+
dense
82+
/>
83+
</v-col>
84+
</v-row>
85+
6186
<v-tabs grow v-model="tab">
6287
<v-tab key="variables">Variables</v-tab>
6388
<v-tab key="secrets">Secrets</v-tab>

web/src/views/Runners.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ export default {
403403
404404
computed: {
405405
webHost() {
406-
return this.systemInfo?.web_host || '';
406+
return this.systemInfo?.web_host || window.location.origin;
407407
},
408408
409409
premiumFeatures() {
@@ -420,7 +420,7 @@ export default {
420420
421421
runnerConfigCommand() {
422422
return `{
423-
"web_host": "${this.webHost}",
423+
"web_host": "${this.webHost || window.location.origin}",
424424
"runner": {
425425
"token": "${(this.newRunner || {}).token}",
426426
"private_key_file": "/path/to/private/key"

0 commit comments

Comments
 (0)