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.

Still needs more test coverage for types, but since we merged #3662 we can see this works properly for clusters and operations. Need to add coverage (in a separate PR first to prove it works) for nodepools and externalauths.

@deads2k
Copy link
Collaborator Author

deads2k commented Jan 7, 2026

/retest

@deads2k deads2k force-pushed the cs-76-standardize-metadata branch 4 times, most recently from c04ac35 to 2ac4245 Compare January 9, 2026 17:03
@deads2k
Copy link
Collaborator Author

deads2k commented Jan 9, 2026

/retest

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.
@deads2k deads2k force-pushed the cs-76-standardize-metadata branch from 2ac4245 to 80634a3 Compare January 9, 2026 22:55
@openshift-ci
Copy link

openshift-ci bot commented Jan 9, 2026

[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
Copy link

openshift-ci bot commented Jan 10, 2026

@deads2k: 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-parallel 80634a3 link true /test e2e-parallel

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.

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