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

feat(resolver): olm.constraint property and compound constraints #2418

Conversation

estroz
Copy link
Member

@estroz estroz commented Oct 11, 2021

Description of the change:

Motivation for the change: compound dependency constraints (see operator-framework/enhancements#97).

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive

/kind feature

@openshift-ci
Copy link

openshift-ci bot commented Oct 11, 2021

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. labels Oct 11, 2021
@openshift-ci openshift-ci bot requested review from dinhxuanvu and njhale October 11, 2021 19:58
@estroz
Copy link
Member Author

estroz commented Oct 11, 2021

/cc @joelanford

@openshift-ci openshift-ci bot requested a review from joelanford October 11, 2021 19:59
@estroz estroz force-pushed the feat/compound-constraint-gated branch from e12a395 to be8bd26 Compare October 13, 2021 18:37
@estroz estroz force-pushed the feat/compound-constraint-gated branch 4 times, most recently from 46b0733 to 693d013 Compare December 3, 2021 19:05
@estroz estroz changed the title feat(resolver): resolve compound dep constraints from bundle properties feat(resolver): olm.constraint property and compound constraints Dec 3, 2021
@estroz estroz marked this pull request as ready for review December 3, 2021 19:07
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 3, 2021
@estroz
Copy link
Member Author

estroz commented Dec 3, 2021

I'm in the process of adding resolver unit tests for compound constraints.

@estroz estroz force-pushed the feat/compound-constraint-gated branch from 693d013 to e09bd8e Compare December 3, 2021 19:27
Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

Just took a quick glance. Will do further review later.

pkg/controller/registry/resolver/resolver.go Show resolved Hide resolved
@estroz estroz force-pushed the feat/compound-constraint-gated branch 2 times, most recently from c9e0398 to 0a2da9c Compare December 10, 2021 00:06
@estroz estroz force-pushed the feat/compound-constraint-gated branch 2 times, most recently from fc37004 to 2060d89 Compare December 10, 2021 22:19
@@ -733,10 +736,14 @@ func sortChannel(bundles []*cache.Entry) ([]*cache.Entry, error) {
return chains[0], nil
}

func DependencyPredicates(properties []*api.Property) ([]cache.Predicate, error) {
// predicateConverter configures olm.constraint value -> predicate conversion for the resolver.
type predicateConverter struct{}
Copy link
Member Author

Choose a reason for hiding this comment

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

This will contain fields when CEL is added.

@estroz estroz force-pushed the feat/compound-constraint-gated branch from 2060d89 to ba9f369 Compare December 10, 2021 22:30
Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

The PR looks good.
/approve

@openshift-ci
Copy link

openshift-ci bot commented Dec 14, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinhxuanvu, estroz

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 14, 2021
@kevinrizza
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 14, 2021
@openshift-merge-robot openshift-merge-robot merged commit 7a9e1af into operator-framework:master Dec 14, 2021
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants