Skip to content

Conversation

@deads2k
Copy link
Collaborator

@deads2k deads2k commented Dec 18, 2025

This change performs a data migration on read to switch from reading based on a cosmos search of fields matching a pattern to direct item reads based on key. On a failure to lookup by cosmosID and success reading based on existing search, we create a new item and delete the original.

Since old frontends use the cosmosUID as fully opaque, the new ID doesn't cause problems for old frontends even on rollback.

When the frontend starts, we find all subscriptions, then search for all resources in each subscription using the untyped client listRecursive, then read each item to trigger the migration.

If the create succeeds and the delete fails, then resulting GETs will produce an ambiguous result error (a pre-existing handled error, so old frontends are ok) and we'll have to resolve the conflict manually.

This change performs a data migration on read to switch from reading
based on a cosmos search of fields matching a pattern to direct item
reads based on key.  On a failure to lookup by cosmosID and success
reading based on existing search, we create a new item and delete the
original.

Since old frontends use the cosmosUID as fully opaque, the new ID
doesn't cause problems for old frontends even on rollback.

When the frontend starts, we find all subscriptions, then search for all
resources in each subscription using the untyped client listRecursive,
then read each item to trigger the migration.
@openshift-ci
Copy link

openshift-ci bot commented Dec 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k

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 geoberle and mbarnes December 18, 2025 00:58
@openshift-ci
Copy link

openshift-ci bot commented Dec 18, 2025

@deads2k: The following tests 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/test-unit 4f8d363 link true /test test-unit
ci/prow/frontend-simulation 4f8d363 link true /test frontend-simulation
ci/prow/e2e-parallel 4f8d363 link true /test e2e-parallel
ci/prow/baseimage-generator-images 4f8d363 link true /test baseimage-generator-images

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

@deads2k deads2k mentioned this pull request Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants