Update provider to use explicitly version v0.1.0#10
Update provider to use explicitly version v0.1.0#10gabriel-samfira merged 1 commit intocloudbase:mainfrom
Conversation
fabi200123
commented
Sep 4, 2024
- Update the provider to use version v0.1.0 explicitly
eb2710e to
055b741
Compare
provider/lxd.go
Outdated
|
|
||
| var _ execution.ExternalProvider = &LXD{} | ||
|
|
||
| var version = "v0.1.0" |
There was a problem hiding this comment.
This is not the interface version. This is the provider version.... The GetVersion() command gets the provider version. Not the interface version.
This needs to be 0.0.0-unknown by default. This will then be set by:
garm-provider-lxd/scripts/build-static.sh
Line 39 in b63472c
which also needs to be updated to no longer try to set the Version in main.go.
Also, this variable must be exported.
055b741 to
42fad3a
Compare
provider/lxd.go
Outdated
|
|
||
| // GetVersion returns the interface version of the provider. | ||
| func (l *LXD) GetVersion(ctx context.Context) string { | ||
| fmt.Println(version) |
There was a problem hiding this comment.
This doesn't feel right. We either return a string or just print it, but not both. This function gets called in garm-provider-common here:
Which in turn gets used by the provider here:
Line 55 in b63472c
the result of which is printed here:
Lines 60 to 62 in b63472c
if you test these changes with:
GARM_COMMAND="GetVersion" ./garm-provider-lxdyou will most likely get the version printed twice.
42fad3a to
b7844c7
Compare
b7844c7 to
befd220
Compare