do not conversion-gen v1alpha3.OSDisk due to warning message non-determinism#1368
Merged
k8s-ci-robot merged 1 commit intoMay 6, 2021
Merged
Conversation
Contributor
|
/hold we are looking into fixing this another way |
629f2ea to
e3488e0
Compare
e3488e0 to
d6a69a5
Compare
| // WARNING: this requires any updates to ManagedDisk to be manually converted. This is due to the odd issue with | ||
| // conversion-gen where the warning message generated uses a relative directory import rather than the fully | ||
| // qualified import when generating outside of the GOPATH. | ||
| // +k8s:conversion-gen=false |
Contributor
There was a problem hiding this comment.
do we need // +k8s:conversion-gen=false so it doesn't generate autoConvert_v1alpha3_OSDisk_To_v1alpha4_OSDisk ?
Contributor
Author
There was a problem hiding this comment.
Yes, that is precisely what +k8s:conversion-gen=false does.
Contributor
|
/lgtm |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CecileRobertMichon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
|
/hold cancel |
Contributor
Author
|
/retest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind bug
What this PR does / why we need it:
When conversion-gen runs outside of the GOPATH, it will generate some resources with
./api/v1alpha3.TypeNamerather than the full import path of the resourcesigs.k8s.io/cluster-api-provider-azure/api/v1alpha3.TypeName. This seems to work fine when running conversion-gen in the GOPATH.#1300 and #1332 are running into this issue. It seems to have started with #1321,
but I don't see any evidence that the issue should be caused by anything in that change set.I do not see a clear cause for why this is happening, and after a messing around with each of the flags for conversion-gen, I've thrown up my hands and just used sed to manipulate the conversion-gen output. I'm not super proud, but it will fix the problem until we find a better solution.Due to OSDisk and DataDisk needing
*ManageDiskandManagedDiskconversions which would require the same conversion func name with two different signatures, conversion-gen warns that manual conversion is needed, which #1321 properly handled. This PR tells conversion-gen not to generate conversions for OSDisk and handles the conversion in the custom converter func for OSDisk, which eliminates the warning message with the relative path.Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:
Release note: