Skip to content

OCPBUGS-12263: cherry-pick pull request refactor FBC caching (#1051) f…#482

Merged
openshift-merge-robot merged 2 commits intoopenshift:release-4.11from
grokspawn:cherry-pick-opm-caching
Apr 26, 2023
Merged

OCPBUGS-12263: cherry-pick pull request refactor FBC caching (#1051) f…#482
openshift-merge-robot merged 2 commits intoopenshift:release-4.11from
grokspawn:cherry-pick-opm-caching

Conversation

@grokspawn
Copy link
Copy Markdown
Contributor

…rom openshift/master

refactor FBC caching (#1051)

This commit improves maintainability and extensibility of the FBC caching used to serve the GRPC API.

It:

  • introduces a new cache package and interface, which defines primitives for checking cache integrity, building the cache, and loading the cache.
  • moves the existing registry.Querier to an implementation of the cache interface, called cache.JSON

This refactor also resolves two outstanding issues:

  1. The current code contains a bug that causes panics when certain failures occur loading the cache.
  2. The current code is hardcoded to always rebuild the cache if it is unreadable or its digest doesn't contain the expected value.

This commit:

  1. Refactors and removes the cases the led to the panic situation
  2. Adds a new flag, --cache-enforce-integrity, that causes opm serve to exit with a failure if the cache is unreadable or its digest doesn't contain the expected value. This is useful in production contexts when one always expects the cache to be pre-populated correctly.

Upstream-repository: operator-registry
Upstream-commit: 7db6517

…rom openshift/master

refactor FBC caching (#1051)

This commit improves maintainability and extensibility of the FBC
caching used to serve the GRPC API.

It:
- introduces a new cache package and interface, which defines
  primitives for checking cache integrity, building the cache, and
  loading the cache.
- moves the existing registry.Querier to an implementation of the cache
  interface, called cache.JSON

This refactor also resolves two outstanding issues:
1. The current code contains a bug that causes panics when certain
   failures occur loading the cache.
2. The current code is hardcoded to always rebuild the cache if it is
   unreadable or its digest doesn't contain the expected value.

This commit:
1. Refactors and removes the cases the led to the panic situation
2. Adds a new flag, --cache-enforce-integrity, that causes `opm serve`
   to exit with a failure if the cache is unreadable or its digest
   doesn't contain the expected value. This is useful in production
   contexts when one always expects the cache to be pre-populated
   correctly.

Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
Upstream-repository: operator-registry
Upstream-commit: 7db6517
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 21, 2023
@openshift-ci-robot
Copy link
Copy Markdown

@grokspawn: This pull request references Jira Issue OCPBUGS-7086, which is invalid:

  • expected the bug to be open, but it isn't
  • expected the bug to target the "4.11.z" version, but it targets "4.12.z" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Closed (Done) instead
  • expected dependent Jira Issue OCPBUGS-6741 to target a version in 4.12.0, 4.12.z, but it targets "4.13.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

…rom openshift/master

refactor FBC caching (#1051)

This commit improves maintainability and extensibility of the FBC caching used to serve the GRPC API.

It:

  • introduces a new cache package and interface, which defines primitives for checking cache integrity, building the cache, and loading the cache.
  • moves the existing registry.Querier to an implementation of the cache interface, called cache.JSON

This refactor also resolves two outstanding issues:

  1. The current code contains a bug that causes panics when certain failures occur loading the cache.
  2. The current code is hardcoded to always rebuild the cache if it is unreadable or its digest doesn't contain the expected value.

This commit:

  1. Refactors and removes the cases the led to the panic situation
  2. Adds a new flag, --cache-enforce-integrity, that causes opm serve to exit with a failure if the cache is unreadable or its digest doesn't contain the expected value. This is useful in production contexts when one always expects the cache to be pre-populated correctly.

Upstream-repository: operator-registry
Upstream-commit: 7db6517

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/test-infra repository.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 21, 2023

@grokspawn: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

Details

In response to this:

OCPBUGS-7086: cherry-pick pull request refactor FBC caching (#1051) f…

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/test-infra repository.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 21, 2023
@openshift-ci openshift-ci Bot requested review from anik120 and awgreene April 21, 2023 18:54
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 21, 2023
@grokspawn grokspawn changed the title OCPBUGS-7086: cherry-pick pull request refactor FBC caching (#1051) f… OCPBUGS-12263: cherry-pick pull request refactor FBC caching (#1051) f… Apr 21, 2023
@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 21, 2023
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 21, 2023

@grokspawn: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

Details

In response to this:

OCPBUGS-12263: cherry-pick pull request refactor FBC caching (#1051) f…

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/test-infra repository.

@openshift-ci-robot
Copy link
Copy Markdown

@grokspawn: This pull request references Jira Issue OCPBUGS-12263, which is valid. The bug has been moved to the POST state.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.11.z) matches configured target version for branch (4.11.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-7086 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE))
  • dependent Jira Issue OCPBUGS-7086 targets the "4.12.z" version, which is one of the valid target versions: 4.12.0, 4.12.z
  • bug has dependents

Requesting review from QA contact:
/cc @Xia-Zhao-rh

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

…rom openshift/master

refactor FBC caching (#1051)

This commit improves maintainability and extensibility of the FBC caching used to serve the GRPC API.

It:

  • introduces a new cache package and interface, which defines primitives for checking cache integrity, building the cache, and loading the cache.
  • moves the existing registry.Querier to an implementation of the cache interface, called cache.JSON

This refactor also resolves two outstanding issues:

  1. The current code contains a bug that causes panics when certain failures occur loading the cache.
  2. The current code is hardcoded to always rebuild the cache if it is unreadable or its digest doesn't contain the expected value.

This commit:

  1. Refactors and removes the cases the led to the panic situation
  2. Adds a new flag, --cache-enforce-integrity, that causes opm serve to exit with a failure if the cache is unreadable or its digest doesn't contain the expected value. This is useful in production contexts when one always expects the cache to be pre-populated correctly.

Upstream-repository: operator-registry
Upstream-commit: 7db6517

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/test-infra repository.

@openshift-ci openshift-ci Bot requested a review from Xia-Zhao-rh April 21, 2023 18:58
@grokspawn
Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@grokspawn: This pull request references Jira Issue OCPBUGS-12263, which is valid.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.11.z) matches configured target version for branch (4.11.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-7086 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE))
  • dependent Jira Issue OCPBUGS-7086 targets the "4.12.z" version, which is one of the valid target versions: 4.12.0, 4.12.z
  • bug has dependents

Requesting review from QA contact:
/cc @Xia-Zhao-rh

Details

In response to this:

/jira refresh

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/test-infra repository.

@Xia-Zhao-rh
Copy link
Copy Markdown
Contributor

/label qe-approved
/label cherry-pick-approved

@openshift-ci openshift-ci Bot added qe-approved Signifies that QE has signed off on this PR cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. labels Apr 24, 2023
@grokspawn
Copy link
Copy Markdown
Contributor Author

/retest

3 similar comments
@grokspawn
Copy link
Copy Markdown
Contributor Author

/retest

@grokspawn
Copy link
Copy Markdown
Contributor Author

/retest

@grokspawn
Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 25, 2023

@grokspawn: The following test 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/e2e-gcp-olm-flaky 7b2a63d link false /test e2e-gcp-olm-flaky

Full PR test history. Your PR dashboard.

Details

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/test-infra repository. I understand the commands that are listed here.

@dtfranz
Copy link
Copy Markdown
Contributor

dtfranz commented Apr 25, 2023

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 25, 2023
@joelanford
Copy link
Copy Markdown
Member

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 26, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grokspawn, joelanford

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 26, 2023
@oceanc80
Copy link
Copy Markdown
Contributor

/label backport-risk-assessed

@openshift-ci openshift-ci Bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Apr 26, 2023
@openshift-merge-robot openshift-merge-robot merged commit 3a667ec into openshift:release-4.11 Apr 26, 2023
@openshift-ci-robot
Copy link
Copy Markdown

@grokspawn: Jira Issue OCPBUGS-12263: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-12263 has been moved to the MODIFIED state.

Details

In response to this:

…rom openshift/master

refactor FBC caching (#1051)

This commit improves maintainability and extensibility of the FBC caching used to serve the GRPC API.

It:

  • introduces a new cache package and interface, which defines primitives for checking cache integrity, building the cache, and loading the cache.
  • moves the existing registry.Querier to an implementation of the cache interface, called cache.JSON

This refactor also resolves two outstanding issues:

  1. The current code contains a bug that causes panics when certain failures occur loading the cache.
  2. The current code is hardcoded to always rebuild the cache if it is unreadable or its digest doesn't contain the expected value.

This commit:

  1. Refactors and removes the cases the led to the panic situation
  2. Adds a new flag, --cache-enforce-integrity, that causes opm serve to exit with a failure if the cache is unreadable or its digest doesn't contain the expected value. This is useful in production contexts when one always expects the cache to be pre-populated correctly.

Upstream-repository: operator-registry
Upstream-commit: 7db6517

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/test-infra repository.

@grokspawn grokspawn deleted the cherry-pick-opm-caching branch April 26, 2023 12:39
@openshift-merge-robot
Copy link
Copy Markdown
Contributor

Fix included in accepted release 4.11.0-0.nightly-2023-04-26-214109

openshift-bot pushed a commit to openshift-bot/operator-framework-olm that referenced this pull request Mar 27, 2026
Bumps the k8s-dependencies group with 4 updates: [k8s.io/api](https://github.com/kubernetes/api), [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver), [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) and [k8s.io/client-go](https://github.com/kubernetes/client-go).

Updates `k8s.io/api` from 0.35.2 to 0.35.3
- [Commits](kubernetes/api@v0.35.2...v0.35.3)

Updates `k8s.io/apiextensions-apiserver` from 0.35.2 to 0.35.3
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](kubernetes/apiextensions-apiserver@v0.35.2...v0.35.3)

Updates `k8s.io/apimachinery` from 0.35.2 to 0.35.3
- [Commits](kubernetes/apimachinery@v0.35.2...v0.35.3)

Updates `k8s.io/client-go` from 0.35.2 to 0.35.3
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](kubernetes/client-go@v0.35.2...v0.35.3)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-version: 0.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-version: 0.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apimachinery
  dependency-version: 0.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/client-go
  dependency-version: 0.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Upstream-repository: api
Upstream-commit: 3b53b73a2db5e3f023c6ba3430a3368d638dfe93
openshift-bot pushed a commit to openshift-bot/operator-framework-olm that referenced this pull request Mar 29, 2026
Bumps the k8s-dependencies group with 4 updates: [k8s.io/api](https://github.com/kubernetes/api), [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver), [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) and [k8s.io/client-go](https://github.com/kubernetes/client-go).

Updates `k8s.io/api` from 0.35.2 to 0.35.3
- [Commits](kubernetes/api@v0.35.2...v0.35.3)

Updates `k8s.io/apiextensions-apiserver` from 0.35.2 to 0.35.3
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](kubernetes/apiextensions-apiserver@v0.35.2...v0.35.3)

Updates `k8s.io/apimachinery` from 0.35.2 to 0.35.3
- [Commits](kubernetes/apimachinery@v0.35.2...v0.35.3)

Updates `k8s.io/client-go` from 0.35.2 to 0.35.3
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](kubernetes/client-go@v0.35.2...v0.35.3)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-version: 0.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-version: 0.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apimachinery
  dependency-version: 0.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/client-go
  dependency-version: 0.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Upstream-repository: api
Upstream-commit: 3b53b73a2db5e3f023c6ba3430a3368d638dfe93
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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.