-
Notifications
You must be signed in to change notification settings - Fork 41
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
Upgrade operator sdk 125 #240
Conversation
…sdk-version/v1.25.0/ Not updating ginkgo to v2 yet - this will require further changes. Signed-off-by: Julien Ropé <[email protected]>
…ubebuilder assets Signed-off-by: Julien Ropé <[email protected]>
Following the guide from https://onsi.github.io/ginkgo/MIGRATING_TO_V2 Signed-off-by: Julien Ropé <[email protected]>
Hi @littlejawa. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
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.
Multiarch support looks additive and shouldn't change affect our downstream builds. ginkgov2 changes look good and nice to see. Everything else looks good
@littlejawa: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
lgtm, thank you @littlejawa
`make test` is known to be failing since a long time. An issue is that it thus leaks a directory that prevents `make clean` to succeed because of restrictive file access modes. Separate the building of the test, which introduces the file access mode issue, from the actual test run. This allows to fully benefit from the access mode fixing introduced by PR openshift#240. Signed-off-by: Greg Kurz <[email protected]>
`make test` is known to be failing since a long time. An issue is that it thus leaks a directory that prevents `make clean` to succeed because of restrictive file access modes. Separate the building of the test, which introduces the file access mode issue, from the actual test run. This allows to fully benefit from the access mode fixing introduced by PR openshift#240. Signed-off-by: Greg Kurz <[email protected]>
Following steps from https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.25.0/
This PR will require more time, mostly because I'm not sure about the consequences of the changes I'm making.
Enable multi-arch build support
I have added the code related to that in the
Makefile
, but my understanding is that this is just enabling it if we ever want to support more archs. It requires additional changes to actually build anything.I'm not sure if/how we can test that change without the appropriate support, and I don't know if we actually want/can support other archs... so I'm leaving it here for discussion.
Update ginkgo to v2
Updating the dependency in
go.mod
is reverted by the nextgo mod tidy
call if we don't actually use that version of ginkgo in our tests.Moving to ginkgo v2 is not a simple step. It has its own migration guide to follow :
https://onsi.github.io/ginkgo/MIGRATING_TO_V2
According to this, the v1 is deprecated so it really seems we have to update.
Doing it reveals two issues in the suite_test.go file:
BeforeSuite
doesn't use thedone
parameter anymore, nor a timeout value, effectively making it synchronous.This is on purpose according to https://onsi.github.io/ginkgo/MIGRATING_TO_V2#removed-async-testing
The migration guide provides guidance on how to make it async again if we really need to, using different methods, but I didn't go that far.
I don't think we actually have parallel tests running anyway, and the execution time of
make test
onmain
and on this PR branch are the same.I feel we can leave it that way, but tell me if you think otherwise, and we can try to change it.
RunSpecsWithDefaultAndCustomReporters
is deprecatedSee https://onsi.github.io/ginkgo/MIGRATING_TO_V2#removed-custom-reporters
The call is then made without the
NewlineReporter
... but I admit I have no idea what the consequences are.Where can I check for the output ? I see nothing from
make test
on the main branch already.The migration guide says you should use an additional parameter to ginkgo to get some reports, but I don't see ginkgo being called anywhere actually (we just use "go test"). Is that where we should add it? Do we need it?
I tried to use the
ReportAfterSuite
method from the migration guide, but theNewlineReporter
is not accepted there, and I can't really test it if I don't know where to look for the output. Some guidance would be appreciated.I kept the ginkgo changes in a separate commit so that we can modify this part separately if needed.
misc
make clean
otherwise. I kept the commit separated in case a better method is suggested for fixing it.