Skip to content

error loading bundle into db: FOREIGN KEY constraint failed #952

@camilamacedo86

Description

@camilamacedo86

Description

Error: error loading bundle into db: FOREIGN KEY constraint failed
Usage:
  opm registry add [flags]

Steps to reproduce

opm registry add -d /database/index.db -b quay.io/operatorhubio/hive-operator:v2.5.3508-6cb94c6 --mode=semver --skip-tls-verify=false --use-http=false

What/Where it is causing an impact? (Context)

We have been facing issues with the operator-sdk run bundle and operator-idk run bundle-upgrade. These commands use OLM as dep/lib (version v1.21.0 latest release). The issue does not occur for all/any scenario, but it has been affecting SDK users and the CVP pipeline in some edge cases.

More info and details can be found in operator-framework/operator-sdk#5410

Where the error occurs

The error error loading bundle into db: FOREIGN KEY constraint failed came from: here. So, it is around here in the opm code. But, unfortunately, we are returning all errors without a context to know where it fails exactly.

Assumptions made so far

operators.operatorframework.io.bundle.channel.default.v1: alpha
operators.operatorframework.io.bundle.channels.v1: mce-2.0

From @joelanford : I'm guessing this is the issue. OPM puts the bundle in the mce-2.0 channel, but the bundle says "the default channel is alpha". except there is no alpha channel.

Issues related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions