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

[resolution pt.5] olm variable source #99

Conversation

perdasilva
Copy link
Contributor

This PR adds the OLMVariableSource which orchestrates variable creation by using the other variables sources (e.g. RequiredPackage, BundlesAndDeps, and GlobalConstraints)

@perdasilva perdasilva force-pushed the resolution_pt5_olm_variable_source branch 2 times, most recently from ee1c20d to f228f35 Compare January 24, 2023 14:13
@perdasilva perdasilva changed the title [resolution pt5] olm variable source [resolution Pt5] olm variable source Jan 24, 2023
@perdasilva perdasilva changed the title [resolution Pt5] olm variable source [resolution pt.5] olm variable source Jan 24, 2023
@perdasilva perdasilva force-pushed the resolution_pt5_olm_variable_source branch from f228f35 to 86dcc2b Compare January 24, 2023 18:02
@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 26, 2023
@perdasilva perdasilva force-pushed the resolution_pt5_olm_variable_source branch from 86dcc2b to 21f0e5a Compare January 26, 2023 13:03
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 26, 2023
Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

Looks great!

Comment on lines +119 to +123
It("should return an errors when they occur", func() {
olmVariableSource := olm.NewOLMVariableSource("prometheus", "packageA")
_, err := olmVariableSource.GetVariables(context.Background(), FailEntitySource{})
Expect(err).To(HaveOccurred())
})
Copy link
Member

Choose a reason for hiding this comment

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

Does this sufficiently handle the case where an OLMVariableSource is provided that can't be fulfilled by the entity source?

Copy link
Member

Choose a reason for hiding this comment

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

I suppose deppy would just return an error if resolution failed so we're probably good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it should basically throw it's hand up in the air XD

Signed-off-by: perdasilva <perdasilva@redhat.com>
@perdasilva perdasilva force-pushed the resolution_pt5_olm_variable_source branch from 21f0e5a to 44f0bd3 Compare January 26, 2023 18:20
Signed-off-by: perdasilva <perdasilva@redhat.com>
@perdasilva perdasilva force-pushed the resolution_pt5_olm_variable_source branch from 44f0bd3 to 958d435 Compare January 26, 2023 18:24
@perdasilva perdasilva merged commit ad5d1ff into operator-framework:main Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants