Skip to content

Bug 1990850: Handle property and dependency values of type BLOB in ListBundles. #159

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

Merged
merged 1 commit into from
Aug 7, 2021

Conversation

benluddy
Copy link
Contributor

@benluddy benluddy commented Aug 6, 2021

Per https://www.sqlite.org/datatype3.html#type_affinity:

In order to maximize compatibility between SQLite and other database
engines, and so that the example above will work on SQLite as it
does on other SQL database engines, SQLite supports the concept of
"type affinity" on columns. The type affinity of a column is the
recommended type for data stored in that column. The important idea
here is that the type is recommended, not required. Any column can
still store any type of data. It is just that some columns, given
the choice, will prefer to use one storage class over another. The
preferred storage class for a column is called its "affinity".

Even though the properties and dependencies tables are created with
column affinity TEXT on both their "type" and "value" columns, SQLite
does not require values stored in those columns to have that type.

The query backing the registry.ListBundles API recently began using
the json_object function from the json1 SQLite
extension (https://www.sqlite.org/json1.html#jobj), which does not
support arguments of type BLOB. The docs state:

If any argument to json_object() is a BLOB then an error is thrown.

But it seems that no error is actually being returned. Instead, the
result set it empty. This may be an issue with the SQLite driver? It
seems to produce an error in sqlite3's interactive mode.

Per https://www.sqlite.org/datatype3.html#type_affinity:

> In order to maximize compatibility between SQLite and other database
> engines, and so that the example above will work on SQLite as it
> does on other SQL database engines, SQLite supports the concept of
> "type affinity" on columns. The type affinity of a column is the
> recommended type for data stored in that column. The important idea
> here is that the type is recommended, not required. Any column can
> still store any type of data. It is just that some columns, given
> the choice, will prefer to use one storage class over another. The
> preferred storage class for a column is called its "affinity".

Even though the properties and dependencies tables are created with
column affinity TEXT on both their "type" and "value" columns, SQLite
does not require values stored in those columns to have that type.

The query backing the registry.ListBundles API recently began using
the json_object function from the json1 SQLite
extension (https://www.sqlite.org/json1.html#jobj), which does not
support arguments of type BLOB. The docs state:

> If any argument to json_object() is a BLOB then an error is thrown.

But it seems that no error is actually being returned. Instead, the
result set it empty. This may be an issue with the SQLite driver? It
seems to produce an error in sqlite3's interactive mode.

Signed-off-by: Ben Luddy <[email protected]>
Upstream-repository: operator-registry
Upstream-commit: c2fc1fd45d64401b512969f83011868940d83a59
@openshift-ci openshift-ci bot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Aug 6, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 6, 2021

@benluddy: This pull request references Bugzilla bug 1990850, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @jianzhangbjz

In response to this:

Bug 1990850: Handle property and dependency values of type BLOB in ListBundles.

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 added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 6, 2021
@openshift-ci openshift-ci bot requested a review from jianzhangbjz August 6, 2021 12:40
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 6, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benluddy

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 requested review from exdx and joelanford August 6, 2021 12:40
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2021
@kevinrizza
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2021
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

4 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@benluddy
Copy link
Contributor Author

benluddy commented Aug 6, 2021

/retest

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci openshift-ci bot merged commit e6840f9 into openshift:master Aug 7, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 7, 2021

@benluddy: All pull requests linked via external trackers have merged:

Bugzilla bug 1990850 has been moved to the MODIFIED state.

In response to this:

Bug 1990850: Handle property and dependency values of type BLOB in ListBundles.

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.

timflannagan pushed a commit to timflannagan/operator-framework-olm that referenced this pull request Nov 30, 2021
Signed-off-by: Camila Macedo <[email protected]>

Upstream-repository: api
Upstream-commit: dd58de2b37096fb5fcd8b5538cf58cfc811b113a
timflannagan pushed a commit to timflannagan/operator-framework-olm that referenced this pull request Nov 30, 2021
Signed-off-by: Camila Macedo <[email protected]>

Upstream-repository: api
Upstream-commit: dd58de2b37096fb5fcd8b5538cf58cfc811b113a
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 4, 2022
Signed-off-by: Camila Macedo <[email protected]>

Upstream-repository: api
Upstream-commit: dd58de2b37096fb5fcd8b5538cf58cfc811b113a
perdasilva pushed a commit to perdasilva/operator-framework-olm that referenced this pull request Mar 4, 2022
Signed-off-by: Camila Macedo <[email protected]>

Upstream-repository: api
Upstream-commit: dd58de2b37096fb5fcd8b5538cf58cfc811b113a
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. bugzilla/severity-high Referenced Bugzilla bug's severity is high 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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants