-
Notifications
You must be signed in to change notification settings - Fork 0
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
allow for different args with conduit > 12 #53
base: main
Are you sure you want to change the base?
Conversation
pkg/conduit/version.go
Outdated
// runtime container depending on the conduit version. | ||
func ArgsByVersion(version string, pipelineFile string, connectorsPath string, dbPath string, processorsPath string) []string { | ||
var args []string | ||
if version < "v0.12.0" { |
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.
Does this comparison work?;-)
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.
I checked it in go playground and the unit tests worked
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.
Right, but this is true because the strings are compared lexically. Even though 'v0.12.0.' and 'v0.12' are the same the comparison will return one being larger. So while the comparison here holds true, this is a side effect because versions are made of increasing numbers. Using the semver pkg provides a deterministic comparison between any version string.
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.
Makes sense, updated to use the semver package for version comparison
f5c8574
to
03a990d
Compare
03a990d
to
25c2657
Compare
Description
Add compatibility for conduit 0.12 and 0.13 to accommodate updates in flags. This will allow for future conduit upgrades.
Quick checks: