-
Notifications
You must be signed in to change notification settings - Fork 521
CLOUDP-58413: Deploy any version of MongoDB #29
Conversation
rodrigovalin
left a comment
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.
Missing unit test on BuildsForVersion please
| # TODO: This build takes longer than it needs to and can still be optimized | ||
| RUN go build -o build/_output/bin/mongodb-kubernetes-operator -mod=vendor github.com/mongodb/mongodb-kubernetes-operator/cmd/manager | ||
|
|
||
| ENV manifest_version=4.2 |
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.
shouldn't this be on the next stage? it is not needed at this point I guess.
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 will likely change, I was thinking for now we can just grab the version for 4.2. This can be adjusted later
| func (v VersionManifest) BuildsForVersion(version string) MongoDbVersionConfig { | ||
| var builds []BuildConfig | ||
| for _, versionConfig := range v.Versions { | ||
| if versionConfig.Name != version || strings.HasSuffix(version, "-ent") { |
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 don't understand the idea behind the right part of the if ... a version suffixed with -ent will never get any builds, and there are no unit tests checking this ;)
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.
you're right I had this mixed up with something else, we don't need this 👍
|
@rodrigovalin tests added for BuildsForVersion Also added a versionManifest function as argument for mocking purposes. (tests were looking for file on disk) |
rodrigovalin
left a comment
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.
🐺
All Submissions:
closes #XXXXin your comment to auto-close the issue that your PR fixes (if such).This PR adds a local copy of the version manifest to the operator image. When constructing the automation config, only the relevant builds are added.
An e2e test will be added which tests version change after the test improvements made in #28