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

fix(packagemanifest): Add InstallModes info from CSV to PackageManifest #697

Conversation

dinhxuanvu
Copy link
Member

PackageManifest is missing InstallModes information from CSV.
Each CSVDescription should have the spec.installModes from the
ClusterServiceVersion copied as well. This allows us to compare
PackageManifests to potential OperatorGroups that they would be
installed into and prevent errors.

Signed-off-by: Vu Dinh vdinh@redhat.com

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 1, 2019
Copy link
Member

@alecmerdler alecmerdler left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 1, 2019
@alecmerdler
Copy link
Member

@dinhxuanvu You probably have to run make vendor.

@dinhxuanvu dinhxuanvu force-pushed the add-installmodes-pkgm branch from 16eddef to 2a50f24 Compare February 1, 2019 19:46
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 1, 2019
@alecmerdler alecmerdler force-pushed the add-installmodes-pkgm branch from a559917 to 3abd541 Compare February 3, 2019 19:30
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 3, 2019
@alecmerdler
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 5, 2019
@dinhxuanvu
Copy link
Member Author

/retest

PackageManifest is missing InstallModes information from CSV.
Each CSVDescription should have the spec.installModes from the
ClusterServiceVersion copied as well. This allows us to compare
PackageManifests to potential OperatorGroups that they would be
installed into and prevent errors.

Signed-off-by: Vu Dinh <vdinh@redhat.com>
@jpeeler jpeeler force-pushed the add-installmodes-pkgm branch from 3abd541 to e31b28e Compare February 8, 2019 02:34
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2019
@jpeeler
Copy link

jpeeler commented Feb 8, 2019

/lgtm
(lost previous lgtm from clean rebase)

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2019
@dinhxuanvu dinhxuanvu force-pushed the add-installmodes-pkgm branch from e31b28e to 3ca040c Compare February 8, 2019 05:45
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2019
@jpeeler
Copy link

jpeeler commented Feb 8, 2019

time="2019-02-08T13:39:46Z" level=fatal msg="unable to setup API &{[packages.apps.redhat.com/v1alpha1] map[v1alpha1:map[packagemanifests:0xc420705bc0]] v1 0xc4204de000 {0xc4204de000 [{[application/json] application/json [json] true 0xc4204cc100 0xc4204cc240 [] {} 0xc4204cc100} {[application/yaml] application/yaml [yaml] true 0xc4204cd040 [] } {[application/vnd.kubernetes.protobuf] application/vnd.kubernetes.protobuf [pb] false 0xc4200fce10 [] {} 0xc4201d2ea0}] 0xc420352600 [{application/json true 0xc4204cc100 0xc4204cc240 0xc4201d2f00} {application/yaml true 0xc4204cd040 } {application/vnd.kubernetes.protobuf false 0xc4200fce10 0xc4201d2f30}] 0xc4204cc100} 0xc4200d2740}: error in registering resource: packagemanifests, unable to build openapi definitions for packages.apps.redhat.com/v1alpha1, Kind=PackageManifest: cannot find model definition for github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1.InstallMode. If you added a new type, you may need to add +k8s:openapi-gen=true to the package or type and run code-gen again"

I don't understand what's missing since the codegen was done.

@njhale
Copy link
Member

njhale commented Feb 9, 2019

time="2019-02-08T13:39:46Z" level=fatal msg="unable to setup API &{[packages.apps.redhat.com/v1alpha1] map[v1alpha1:map[packagemanifests:0xc420705bc0]] v1 0xc4204de000 {0xc4204de000 [{[application/json] application/json [json] true 0xc4204cc100 0xc4204cc240 [] {} 0xc4204cc100} {[application/yaml] application/yaml [yaml] true 0xc4204cd040 [] } {[application/vnd.kubernetes.protobuf] application/vnd.kubernetes.protobuf [pb] false 0xc4200fce10 [] {} 0xc4201d2ea0}] 0xc420352600 [{application/json true 0xc4204cc100 0xc4204cc240 0xc4201d2f00} {application/yaml true 0xc4204cd040 } {application/vnd.kubernetes.protobuf false 0xc4200fce10 0xc4201d2f30}] 0xc4204cc100} 0xc4200d2740}: error in registering resource: packagemanifests, unable to build openapi definitions for packages.apps.redhat.com/v1alpha1, Kind=PackageManifest: cannot find model definition for github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1.InstallMode. If you added a new type, you may need to add +k8s:openapi-gen=true to the package or type and run code-gen again"

I don't understand what's missing since the codegen was done.

Where did you find this - running the branch locally? in the pod logs for ci-operator?

@jpeeler
Copy link

jpeeler commented Feb 11, 2019

I ran it locally, specifically make e2e-local TEST=TestCreateInstallPlanWithPreExistingCRDOwners (don't know if that test is specifically necessary or not) and saw the package server pod was crashing. Ignore me, environment issues for me I guess.

Had to add openapi-gen tag in clusterserviceversion_types.go and
adjusted Makefile to pick it up.
@jpeeler jpeeler force-pushed the add-installmodes-pkgm branch from d856904 to d649858 Compare February 11, 2019 19:11
(in TestToPackageManifest only)
Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

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

/lgtm
🎉

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 11, 2019
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alecmerdler, dinhxuanvu, jpeeler, njhale

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 [alecmerdler,jpeeler,njhale]

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

@jpeeler
Copy link

jpeeler commented Feb 11, 2019

/retest
VPC errors...

@jpeeler
Copy link

jpeeler commented Feb 11, 2019

/retest

2 similar comments
@jpeeler
Copy link

jpeeler commented Feb 12, 2019

/retest

@njhale
Copy link
Member

njhale commented Feb 12, 2019

/retest

@openshift-merge-robot openshift-merge-robot merged commit 72dbe0d into operator-framework:master Feb 12, 2019
ecordell pushed a commit to ecordell/operator-lifecycle-manager that referenced this pull request Mar 8, 2019
…modes-pkgm

fix(packagemanifest): Add InstallModes info from CSV to PackageManifest
@ecordell ecordell added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 19, 2019
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants