-
Notifications
You must be signed in to change notification settings - Fork 0
Leverage release as version #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -153,14 +139,9 @@ func GetDevices(release_version diagnostics.ReleaseVersion) []Device { | |||
Status: DeviceStatus{ID: 1, Description: "healthy"}, | |||
} | |||
|
|||
if device.ID == mainDiskID { | |||
device.MainDevice = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be always false
not sure the implications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :)
@@ -82,6 +82,7 @@ func SetupCloudOptions() { | |||
|
|||
if err != nil { | |||
fmt.Println("Error loading .env file for cloud version setup") | |||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running in non-cloud setups will return 👍
@@ -164,213 +164,208 @@ func ExecuteTask(task Task) Task { | |||
log.Fatal(err.Error()) | |||
} | |||
|
|||
if diagnostics.GetReleaseVersion() == diagnostics.DEV_VERSION { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will always run tasks now - no more blocking against dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This switch is getting huge :P Wondering if we could abstract this into something more manageable.
@@ -1196,7 +1190,7 @@ func taskGetSystemUptime() string { | |||
func taskGetStorageDevices() string { | |||
fmt.Println("Executing taskGetStorageDevices") | |||
|
|||
devices := storage.GetDevices(diagnostics.GetReleaseVersion()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Version string | ||
var Commit string | ||
var BuildDate string | ||
|
||
const ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ;)
RELEASE
as the tag etc