Skip to content

Commit ebb3e29

Browse files
committed
stop listening changes in storage and flist Changes
1 parent 1bf892e commit ebb3e29

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

pkg/environment/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ type Config struct {
3939
BinRepo string `json:"bin_repo"`
4040
GeoipURLs []string `json:"geoip_urls"`
4141

42-
FlistURL string `json:"flist_url"`
43-
V4FlistURL string `json:"v4_flist_url"`
42+
// FlistURL string `json:"flist_url"`
43+
// V4FlistURL string `json:"v4_flist_url"`
4444

4545
HubURL string `json:"hub_url"`
4646
V4HubURL string `json:"v4_hub_url"`
4747

48-
HubStorage string `json:"hub_storage"`
49-
V4HubStorage string `json:"v4_hub_storage"`
48+
// HubStorage string `json:"hub_storage"`
49+
// V4HubStorage string `json:"v4_hub_storage"`
5050
}
5151

5252
// Merge, updates current config with cfg merging and override config

pkg/environment/environment.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ const (
127127
var (
128128
pool substrate.Manager
129129
subURLs []string
130-
// poolOnce sync.Once
131130

132131
envDev = Environment{
133132
RunningMode: RunningDev,
@@ -330,7 +329,6 @@ func getEnvironmentFromParams(params kernel.Params) (Environment, error) {
330329
env = envProd
331330
}
332331

333-
// update it to read local config file instead of trying to download config over and over again
334332
config, err := getConfig(env.RunningMode, baseExtendedURL, http.DefaultClient)
335333
if err != nil {
336334
// maybe the node can't reach the internet right now
@@ -377,13 +375,15 @@ func getEnvironmentFromParams(params kernel.Params) (Environment, error) {
377375
env.GeoipURLs = geoip
378376
}
379377

380-
if flist := config.FlistURL; len(flist) > 0 {
381-
env.FlistURL = flist
382-
}
383-
384-
if storage := config.HubStorage; len(storage) > 0 {
385-
env.HubStorage = storage
386-
}
378+
// flist url and hub urls shouldn't listen to changes in config as long as we can't change it at run time.
379+
// it would cause breakage in vmd that needs a reboot to be recovered.
380+
// if flist := config.FlistURL; len(flist) > 0 {
381+
// env.FlistURL = flist
382+
// }
383+
//
384+
// if storage := config.HubStorage; len(storage) > 0 {
385+
// env.HubStorage = storage
386+
// }
387387

388388
if hub := config.HubURL; len(hub) > 0 {
389389
env.HubURL = hub
@@ -397,14 +397,14 @@ func getEnvironmentFromParams(params kernel.Params) (Environment, error) {
397397
// if the node running v4 chage urls to use v4 hub
398398
if params.IsV4() {
399399
env.FlistURL = defaultV4FlistURL
400-
if flist := config.V4FlistURL; len(flist) > 0 {
401-
env.FlistURL = flist
402-
}
400+
// if flist := config.V4FlistURL; len(flist) > 0 {
401+
// env.FlistURL = flist
402+
// }
403403

404404
env.HubStorage = defaultV4HubStorage
405-
if storage := config.V4HubStorage; len(storage) > 0 {
406-
env.HubStorage = storage
407-
}
405+
// if storage := config.V4HubStorage; len(storage) > 0 {
406+
// env.HubStorage = storage
407+
// }
408408

409409
}
410410

pkg/events/events.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ func (e *Processor) subscribe(ctx context.Context) error {
179179
newCL, NewMeta, err := e.sub.Raw()
180180
if err != nil {
181181
log.Debug().Err(err).Msg("failed to update substrate connection")
182+
continue
182183
}
183184

184185
// only update cl and mata after creating the new connection successfully

0 commit comments

Comments
 (0)