Leverage release as version#33
Conversation
| } | ||
|
|
||
| if device.ID == mainDiskID { | ||
| device.MainDevice = true |
There was a problem hiding this comment.
Will be always false not sure the implications
There was a problem hiding this comment.
It can be true, in case the release_version identified mainDiskID variable resulting of the call to GetDeviceIdentifier (removed in the PR) equals the disk identifier (for example, /dev/sda).
This is to identify the main disk but potentially as spoken via chat, can be greatly simplified :)
|
|
||
| if err != nil { | ||
| fmt.Println("Error loading .env file for cloud version setup") | ||
| return |
There was a problem hiding this comment.
When running in non-cloud setups will return 👍
| log.Fatal(err.Error()) | ||
| } | ||
|
|
||
| if diagnostics.GetReleaseVersion() == diagnostics.DEV_VERSION { |
There was a problem hiding this comment.
Will always run tasks now - no more blocking against dev
There was a problem hiding this comment.
Yeah, only made sense in the very beginning when we didn't have any way to isolate :P
| taskResult := taskRestoreBackup() | ||
| log.Println("Task: " + task.Task) | ||
| log.Println("Args: " + task.Args.String) | ||
| switch task.Task { |
There was a problem hiding this comment.
This switch is getting huge :P Wondering if we could abstract this into something more manageable.
| func taskGetStorageDevices() string { | ||
| fmt.Println("Executing taskGetStorageDevices") | ||
|
|
||
| devices := storage.GetDevices(diagnostics.GetReleaseVersion()) |
There was a problem hiding this comment.
What is the reasoning to not pass the version (flavour) here? Since for now it is a bit fuzzy on how we wanna deal with reporting storage devices and the whole logic of mounting them and making them available for apps, we can go with not passing the version and then deal with the storage feature part as its own thing :)
| var Commit string | ||
| var BuildDate string | ||
|
|
||
| const ( |
There was a problem hiding this comment.
We still need some way to have a "running flavour" to allow the app to branch in and out depending on the machine / conditions it is running. We removed this in the case of the storage devices on this PR, but this is and will be necessary for other configuration aspects. How should we deal with this?
- Pass a flag at build time (aka
FLAVOUR) - Do it dynamically at run time based on some environment property (file, env var, etc), and then deal with setting this via the installers for specific platforms.
Wdyt?
paulotruta
left a comment
There was a problem hiding this comment.
In general looking great! 👍
Left a couple of questions, mostly regarding the need to still have a 'flavour' differentiator to allow changes to the logic. If this is at build or run time is up to decision ;)
RELEASEas the tag etc