Skip to content
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

OADP-5245: Operator SDK update guidelines #1613

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mateusoliveira43
Copy link
Contributor

Why the changes were made

Fix #1540

Changes were made following documentation about how to upgrade Operator SDK version, from 1.23.0 to 1.34.2.

Changes are necessary to allow creation of webhooks for NAC CRDs.

How to test the changes made

Run commands to confirm that after the changes they still work. For example

make help
make generate
make bundle
make lint
make test
make deploy-olm
make test-e2e

Read documentation about how to upgrade Operator SDK version and check if it is clear.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 5, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 5, 2025

@mateusoliveira43: This pull request references OADP-5245 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set.

In response to this:

Why the changes were made

Fix #1540

Changes were made following documentation about how to upgrade Operator SDK version, from 1.23.0 to 1.34.2.

Changes are necessary to allow creation of webhooks for NAC CRDs.

How to test the changes made

Run commands to confirm that after the changes they still work. For example

make help
make generate
make bundle
make lint
make test
make deploy-olm
make test-e2e

Read documentation about how to upgrade Operator SDK version and check if it is clear.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from mrnold and sseago January 5, 2025 01:47
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 5, 2025
@mateusoliveira43

This comment was marked as resolved.

@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 Jan 5, 2025
@mateusoliveira43

This comment was marked as resolved.

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 5, 2025
Copy link

openshift-ci bot commented Jan 5, 2025

@mateusoliveira43: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/4.15-e2e-test-aws d1f6ee8 link true /test 4.15-e2e-test-aws

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-sigs/prow repository. I understand the commands that are listed here.

@@ -41,7 +41,7 @@ func isObjectOurs(scheme *runtime.Scheme, object client.Object) bool {
return false
}
gvk := objGVKs[0]
if gvk.Group == oadpv1alpha1.GroupVersion.Group && gvk.Version == oadpv1alpha1.GroupVersion.Version && gvk.Kind == oadpv1alpha1.Kind {
if gvk.Group == oadpv1alpha1.GroupVersion.Group && gvk.Version == oadpv1alpha1.GroupVersion.Version && gvk.Kind == "DataProtectionApplication" {
Copy link
Member

Choose a reason for hiding this comment

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

is this string not available somewhere as const/var already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was in api/ folder

since it was only referenced here, I removed it

Copy link

openshift-ci bot commented Jan 9, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai, mateusoliveira43

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [kaovilai,mateusoliveira43]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@shubham-pampattiwar shubham-pampattiwar left a comment

Choose a reason for hiding this comment

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

Overall changes look sane to me, except the dir changes for controllers and main.go . Also, just because we have some csv updates and refactoring I would test the PR on various OCP favors (ROSA, OCP-AWS etc), just to be cautious. Thank you @mateusoliveira43

@@ -1,4 +1,4 @@
package controllers

Choose a reason for hiding this comment

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

IMO controllers (plural) is more apt that controller (singular) as we have multiple controllers in our project.
Ref: https://sdk.operatorframework.io/docs/overview/project-layout/#golang

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -18,6 +18,7 @@ package main

Choose a reason for hiding this comment

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

Similarly IMO main.go at root level seems more apt, I am unsure about moving it to cmd
Ref: https://sdk.operatorframework.io/docs/overview/project-layout/#golang

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -31,31 +47,21 @@ const (
oadpCloudStorageDeleteAnnotation = "oadp.openshift.io/cloudstorage-delete"
)

// VeleroReconciler reconciles a Velero object
type BucketReconciler struct {
// CloudStorageReconciler reconciles a CloudStorage object

Choose a reason for hiding this comment

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

++ this always bugged me :)

@weshayutin
Copy link
Contributor

@weshayutin please test install on rosa x86 and aws arm

@weshayutin
Copy link
Contributor

ROSA 4.17 x86_64 install and test: https://termbin.com/uq5x
looks good

@weshayutin
Copy link
Contributor

weshayutin commented Jan 14, 2025

hrm.. @mateusoliveira43 arm install is hitting an issue. Not clear to me yet if it's the cluster or code changes. Issue is on make deploy-olm

INFO[0038] Approved InstallPlan install-vwm7k for the Subscription: oadp-operator-v99-0-0-sub 
INFO[0038] Waiting for ClusterServiceVersion "openshift-adp/oadp-operator.v99.0.0" to reach 'Succeeded' phase 
INFO[0039]   Found ClusterServiceVersion "openshift-adp/oadp-operator.v99.0.0" phase: Pending 
INFO[0043]   Found ClusterServiceVersion "openshift-adp/oadp-operator.v99.0.0" phase: InstallReady 
INFO[0044]   Found ClusterServiceVersion "openshift-adp/oadp-operator.v99.0.0" phase: Installing 
FATA[0120] Failed to run bundle: error waiting for CSV to install: deployment openshift-adp-controller-manager has error: client rate limiter Wait returned an error: context deadline exceeded

ARM is not yet built..

openshift-adp-controller-manager-69569dd9c4-j9wmt manager exec /manager: exec format error

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 15, 2025
@openshift-merge-robot
Copy link

PR needs rebase.

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-sigs/prow repository.

@mateusoliveira43
Copy link
Contributor Author

@weshayutin this error seems platform error (it was not built for ARM architecture)

do you have the whole make deploy-olm output or the architecture of the container images?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create operator-sdk update guidelines
6 participants