Skip to content

Add system-wide solver constraint injection#2360

Closed
njhale wants to merge 2 commits intooperator-framework:masterfrom
njhale:di-constraints
Closed

Add system-wide solver constraint injection#2360
njhale wants to merge 2 commits intooperator-framework:masterfrom
njhale:di-constraints

Conversation

@njhale
Copy link
Copy Markdown
Member

@njhale njhale commented Sep 16, 2021

Description of the change:

  • Add injection point for system-wide solver constraints
  • Factor the content of the catalog-operator's main() function into an exported function in a non-main package

Motivation for the change:

Make it easier for platform-specific builds of OLM to perturb dependency resolution before "arbitrary runtime constraints" are available.

Factor the content of main() into an exported function in a separate
package so that it can be invoked externally.
Add an exported function that allows system-wide constraints -- i.e constraints
used by all solvers -- to be injected.
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Sep 16, 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 the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 16, 2021
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Sep 16, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: njhale

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

The pull request process is described here

Details 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 requested review from ecordell and exdx September 16, 2021 13:42
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 16, 2021
Comment on lines +147 to +149
func AddSystemConstraintProviders(providers ...ConstraintProvider) {
systemConstraintProviders.add(providers...)
}
Copy link
Copy Markdown
Member

@joelanford joelanford Sep 16, 2021

Choose a reason for hiding this comment

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

Is this the extension point where callers can add custom providers (e.g. from an init function)?

It might be good to add an example in the PR summary of how a caller would add a custom provider.

@njhale njhale changed the title WIP: Add system-wide solver constraint injection Add system-wide solver constraint injection Sep 17, 2021
@njhale
Copy link
Copy Markdown
Member Author

njhale commented Sep 23, 2021

we decided to carry a downstream-only patch that no longer requires this injection point.

@njhale njhale closed this Sep 23, 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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants