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

Osc operator #6990

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

Osc operator #6990

wants to merge 4 commits into from

Conversation

xiangchunfu
Copy link

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci openshift-ci bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 13, 2024
@openshift-ci openshift-ci bot added the api-review Categorizes an issue or PR as actively needing an API review. label Nov 13, 2024
sourceNamespace: openshift-marketplace
name: {{.OPERATOR_SOURCE_NAME}}
installPlanApproval: Automatic
startingCSV: startingCSV: sandboxed-containers-operator.v1.7.0
Copy link
Contributor

Choose a reason for hiding this comment

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

there is a typo here - but I perfer if we don't have static versions - this can break it later releases
so we can remove the statingCSV

Suggested change
startingCSV: startingCSV: sandboxed-containers-operator.v1.7.0
startingCSV: sandboxed-containers-operator.v1.7.0

}

func (o *operator) GetDependencies(cluster *common.Cluster) ([]string, error) {
return []string{cnv.Operator.Name}, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

this will enforce CNV installation when selecting osc

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

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 74.69880% with 42 lines in your changes missing coverage. Please review.

Project coverage is 68.24%. Comparing base (d8cdc34) to head (fa68f19).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
internal/operators/osc/operator.go 69.89% 22 Missing and 6 partials ⚠️
internal/operators/osc/manifest.go 74.35% 5 Missing and 5 partials ⚠️
internal/featuresupport/features_olm_operators.go 85.71% 3 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6990      +/-   ##
==========================================
+ Coverage   68.21%   68.24%   +0.02%     
==========================================
  Files         273      275       +2     
  Lines       39079    39244     +165     
==========================================
+ Hits        26659    26781     +122     
- Misses      10008    10038      +30     
- Partials     2412     2425      +13     
Files with missing lines Coverage Δ
internal/cluster/statemachine.go 99.65% <100.00%> (+<0.01%) ⬆️
internal/cluster/validation_id.go 92.30% <ø> (ø)
internal/featuresupport/feature_support_level.go 96.49% <ø> (ø)
internal/featuresupport/features_platforms.go 92.81% <100.00%> (+0.63%) ⬆️
internal/host/statemachine.go 100.00% <100.00%> (ø)
internal/host/validation_id.go 90.90% <100.00%> (ø)
internal/operators/builder.go 100.00% <100.00%> (ø)
internal/featuresupport/features_olm_operators.go 81.30% <85.71%> (+0.42%) ⬆️
internal/operators/osc/manifest.go 74.35% <74.35%> (ø)
internal/operators/osc/operator.go 69.89% <69.89%> (ø)

... and 1 file with indirect coverage changes

---- 🚨 Try these New Features:

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 14, 2024
@xiangchunfu xiangchunfu force-pushed the osc-operator branch 5 times, most recently from 5c98524 to 66bfe9c Compare November 19, 2024 06:59
}

func (o *operator) GetDependencies(cluster *common.Cluster) ([]string, error) {
return []string{Operator.Name}, nil

Choose a reason for hiding this comment

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

Should be

return make([]string, 0), nil

return models.SupportLevelUnavailable
}

return models.SupportLevelSupported
Copy link
Contributor

Choose a reason for hiding this comment

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

should be tech preview

Copy link

Choose a reason for hiding this comment

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

Hello @eifrach , we plan to support OSC operator in this PR. The OSC operator has been GA from OCP4.10. So the "Supported" is expected here. Thanks.

Comment on lines 601 to 603
func (feature *OSCFeature) getId() models.FeatureSupportLevelID {
return models.FeatureSupportLevelIDOSC
}
Copy link
Contributor

Choose a reason for hiding this comment

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

func (feature *OSCFeature) getId() models.FeatureSupportLevelID {
return models.FeatureSupportLevelIDOSC
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm missing two functions

func (o *operator) GetClusterValidationID() string
func (o *operator) GetHostValidationID() string 

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm missing more than just two
can you go over it and check that we have implement all the methods in the interface?

Copy link

Choose a reason for hiding this comment

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

Hello @eifrach , the interface type is SupportLevelFeature. Following https://github.com/openshift/assisted-service/blob/master/internal/featuresupport/support_level_feature.go, all the methods have been implemented here. Thanks.

Comment on lines 15 to 19
MasterMemory int64 = 1
MasterCPU int64 = 1
// Memory value provided in GIB
WorkerMemory int64 = 1
WorkerCPU int64 = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

those are not in use

return nil, err
}

return preflightRequirements.Requirements.Master.Quantitative, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

is the requirement the same for Master and workers?
OSC workloads runs on all nodes?

Copy link

Choose a reason for hiding this comment

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

@eifrach The requirements should be different for master and worker nodes. The OSC workloads run on worker nodes. And when starting a OSC pod, the default VM size is: 2G memory and 1 CPU. I will discuss with Xiangchun to set a new value here. Thanks.

Expect(err).To(BeNil())

Expect(extractData(controllerData, "metadata.namespace")).To(Equal(Namespace))
})
Copy link
Contributor

Choose a reason for hiding this comment

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

missing checkes for getLayeredImageDeployConfigMap

Expect(operator.GetName()).To(Equal(Name))
Expect(operator.GetFullName()).To(Equal(FullName))
Copy link
Contributor

Choose a reason for hiding this comment

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

this can never fail

Copy link

Choose a reason for hiding this comment

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

Yes, I agree. We can remove this function. Thanks.

Expect(requirements).To(BeEquivalentTo(expectedRequirements))

},
Entry("min requirements", models.HostRoleMaster, newRequirements(minCpu, minRamMib)),
Copy link
Contributor

Choose a reason for hiding this comment

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

need more tests
role.master, not enough memory or CPU

It("should return the dependencies", func() {
preflightRequirements, err := operator.GetPreflightRequirements(context.TODO(), &cluster)
Expect(err).To(BeNil())
Expect(preflightRequirements.Dependencies).To(Equal([]string{cnv.Operator.Name}))
Copy link
Contributor

Choose a reason for hiding this comment

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

cnv?

})

It("host should be valid", func() {
host := models.Host{Role: models.HostRoleMaster, Inventory: getInventory(int64(1024))}
Copy link
Contributor

Choose a reason for hiding this comment

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

testing only role master?

Copy link

openshift-ci bot commented Nov 24, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: xiangchunfu
Once this PR has been reviewed and has the lgtm label, please ask for approval from eifrach. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

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

Signed-off-by: xiangchun Fu <xfu@redhat.com>
Signed-off-by: xiangchun Fu <xfu@redhat.com>
Signed-off-by: xiangchun Fu <xfu@redhat.com>
Signed-off-by: xiangchun Fu <xfu@redhat.com>
Copy link

openshift-ci bot commented Nov 25, 2024

@xiangchunfu: The following tests 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/edge-e2e-metal-assisted-cnv-4-17 fa68f19 link true /test edge-e2e-metal-assisted-cnv-4-17
ci/prow/edge-e2e-metal-assisted-odf-4-17 fa68f19 link true /test edge-e2e-metal-assisted-odf-4-17
ci/prow/edge-e2e-metal-assisted-lvm fa68f19 link true /test edge-e2e-metal-assisted-lvm
ci/prow/edge-e2e-ai-operator-disconnected-capi fa68f19 link false /test edge-e2e-ai-operator-disconnected-capi
ci/prow/edge-e2e-ai-operator-ztp-capi fa68f19 link false /test edge-e2e-ai-operator-ztp-capi

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.

},
},
},
}, nil
Copy link

Choose a reason for hiding this comment

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

@xiangchunfu Here we should consider the SNO scenario. Let's discuss offline about the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants