Skip to content

Bump to Go 1.19, Ginkgo v2 & kubebuilder 3.7.1#6047

Merged
laxmikantbpandhare merged 2 commits intooperator-framework:masterfrom
laxmikantbpandhare:ginkgo-v2
Oct 14, 2022
Merged

Bump to Go 1.19, Ginkgo v2 & kubebuilder 3.7.1#6047
laxmikantbpandhare merged 2 commits intooperator-framework:masterfrom
laxmikantbpandhare:ginkgo-v2

Conversation

@laxmikantbpandhare
Copy link
Member

@laxmikantbpandhare laxmikantbpandhare commented Sep 29, 2022

Description of the change:
Changes in this PR are:

  • Modified go version to 1.19 in all the places and Kubebuilder to k8s 1.25
  • The config-gen is completely removed from Kubebuilder. As part of this bump, the website content of SDK was updated where the doc is referring to config-gen.
  • Updated ginkgo to ginkgo/v2 in all of the files. The reason behind it is that Kubebuilder updated to ginkgo/v2.
  • Updated all the io/ioutil imported packages to either io or os. io/ioutil got deprecated in 1.16 and no longer it is used. Updated all the files in SDK.
  • Ansible scaffolding got modified in order to incorporate with Kubebuilder --component-config flag changes. Previously, it was scaffolding and doing some file changes without considering the --component-config flag.
  • This PR bumped Kubebuilder to a newer version and it got the recent PR changes for the --component-config flag.
  • Helm scaffolding got modified in order to incorporate with Kubebuilder --component-config flag changes. Previously, it was scaffolding and doing some file changes without considering the --component-config flag.

Motivation for the change:

  • Ginkgo version mismatch in Kubebuilder and operator-sdk. ginkgo updated to ginkgo/v2
  • Updated io/ioutil to io or oc as io/ioutil got deprecated in 1.16
  • Updated go version to 1.19

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 19:52 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 19:52 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 19:52 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 19:52 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 19:52 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 19:52 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 19:52 Inactive
@laxmikantbpandhare laxmikantbpandhare self-assigned this Sep 29, 2022
@laxmikantbpandhare
Copy link
Member Author

Updated the Kubebuilder version as the new KB version has ginkgo/v2 changes.

@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 19:59 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 19:59 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 20:03 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 20:03 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 20:03 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 20:04 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy September 29, 2022 20:05 Inactive
@laxmikantbpandhare
Copy link
Member Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 3, 2022
@laxmikantbpandhare laxmikantbpandhare removed the request for review from fabianvf October 9, 2022 00:29
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 9, 2022 00:47 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 9, 2022 00:47 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 9, 2022 00:47 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 9, 2022 00:47 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 9, 2022 00:47 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 9, 2022 00:47 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 9, 2022 00:47 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 12, 2022 16:41 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 12, 2022 16:41 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 12, 2022 16:41 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 12, 2022 16:41 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 12, 2022 16:41 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 12, 2022 16:41 Inactive
@laxmikantbpandhare laxmikantbpandhare temporarily deployed to deploy October 12, 2022 16:42 Inactive
@theishshah
Copy link
Contributor

/lgtm

Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple things:

  • We need to update the changelog to include entries for everything that is a user facing change and may require a migration guide.
  • I would like add comments to the helm/ansible plugins where we are replacing code because of the yaml linting error. Ideally this will be fixed in Kubebuilder at some point and we won't need to do this replace anymore.
  • The ansible/helm samples in the testdata/ directory have many files deleted from the manifests/ directory. Why is this being done?

There may be a couple other little nits, but the above summary is the major things that I think we need to address before merging this in.

@jmrodri
Copy link
Member

jmrodri commented Oct 14, 2022

Saw a typo in generation code, it's been there a while so I'm not going to fix it in this PR. #6085

Copy link
Member

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR! That was a lot of work. A few things I think we need to add to this (this is a short summary, use the comments in the review for all of the actual details) :)

  • update PR description to give a summary of all of the changes in this PR. You bumped go, ginkgo, and kube. You had to change some Labels to LabelsMap, explain why that had to happen. Mention some of the repercussions the kube bump had with component config.
  • I think we need a couple changelog files. Might be easier to capture the migrations for the specific ones if they are in separate files
    • Changes to ansible scaffolding, with migration
    • Changes to helm scaffolding, with migration
    • Changes to go dependencies, with migration; also call out the multiarch change. That might have to be a migration step as well.
    • Component Config needs to be mentioned somewhere, either in the ansible and helm or separately
    • go, ginkgo, kubebuilder bumps can be in a single changelog fragment

@laxmikantbpandhare
Copy link
Member Author

laxmikantbpandhare commented Oct 14, 2022

Added changelogs below:

  1. One change log for go bump to 1.19, Kubebuilder bump, and ginkgo/v2 changes and added two migration guides to it
  • For multi-arch support
  • Makefile scaffolding for --bin-dir $(LOCALBIN)
  1. Changelog for --component-config flag

  2. Changelog for Ansible scaffolding changes and added migration guide

  • Added migration guide for ansible molecule test change
  1. Changelog for Helm scaffolding changes

Signed-off-by: laxmikantbpandhare <[email protected]>

updated kb version to get ginkgo/v2 changes

Signed-off-by: laxmikantbpandhare <[email protected]>

added changelog

Signed-off-by: laxmikantbpandhare <[email protected]>

By() cleause used outside and it was  throwing error

updated go.mod depedencies

too many arguments  InstallCertManager and UnInstallCertManager

update kb go.mod

updated --leader-elec skip in the changes

kb changes fort envtest

updated testdata

update go version 1.19 and component config added to moulecule test

updated go version in github actions and docker sdk images

updated io/ioutil

updated all io/ioutil to io or os as it is deprecated

modified code for component config check

modified code for component config check

resolve conflicts

make generate updated

Signed-off-by: laxmikantbpandhare <[email protected]>

updated logic

Signed-off-by: laxmikantbpandhare <[email protected]>

updated milecule test

Signed-off-by: laxmikantbpandhare <[email protected]>

removed ginkgo old version and updated ansible molecule test

Signed-off-by: laxmikantbpandhare <[email protected]>

updated the changes with the help of Bryce and Jesus

Signed-off-by: laxmikantbpandhare <[email protected]>

updated manager.yaml removes space

Signed-off-by: laxmikantbpandhare <[email protected]>

removed --component-config=true from webhook testcase as well

Signed-off-by: laxmikantbpandhare <[email protected]>

updated testdata and added changelog with migration guide

Signed-off-by: laxmikantbpandhare <[email protected]>

lint error for header in migration guide

Signed-off-by: laxmikantbpandhare <[email protected]>

added pipe | in changelog
@jmrodri
Copy link
Member

jmrodri commented Oct 14, 2022

/hold

I'm still reviewing the latest changes.

Copy link
Member

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laxmikantbpandhare great work! Thanks for handling this big chunk of updates. Just a few changes in changeling fragments - It would be nice to include a snippet of git diff in migration sections, so that its easier for users to know what is getting added and/or deleted. Rest of the changes in SDK and plugins look good!

Copy link
Member

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog is meant to convey what things have changed that would affect a user's project. They don't care about changes we made to internal code.

How will go 1.19 update impact a users project? the io/ioutil is a good example.

How will ginkgo v2 affect them? They dont' care that we had to rename an internal variable like LabelsMap. They care that they might have to change their suite_test.go. So look at the difference of the testdata changes. THAT is usually what they care to see. So if the testdata changes the Makefile, what changed? That is what they will want to see.

Also, migrations are only important if it affects the scaffolded out project. If the change has no effect then no need for a migration.

I know it's not easy but you'll want to think about each of these as you write the changelogs. Usually the changelogs are easy because the changes in the PR aren't that big. But this is a HUGE PR and a lot changed :)

@jmrodri
Copy link
Member

jmrodri commented Oct 14, 2022

/hold cancel

I finished my review

Signed-off-by: laxmikantbpandhare <[email protected]>
Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged. release-blocker This issue blocks the parent release milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New changes in kubebuilder causing issue in SDK testcases

7 participants