Skip to content

Conversation

@davidangb
Copy link
Contributor

@davidangb davidangb commented Nov 12, 2025

Note the branches involved in this PR:

  • feature/quicksilver_mitigation is dc7d69a. This is an older commit of Rawls before we removed the non-Quicksilver code. I need the non-Quicksilver code to access the data in the pre-migration database tables.
  • da_CORE-746_migrationValidation is branched from dc7d69a and contains the custom code to perform the re-migration.

Also note this branch has two distinct classes of code:

  • code to implement a /api/workspaces/{workspaceNamespace}/{workspaceName}/submissions/validate API. I suggest you ignore all this code. This is a work-in-progress attempt to validate how many discrepancies we have in the already-migrated data.
  • code to correctly re-migrate list attributes. This is the code that needs attention.

The plan is to run this in a separate environment, parallel to prod. The existing prod Rawls service and database will remain untouched for this effort.

responses:
200:
description: Stuff.
content: { }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore; this is for ad-hoc validation of the existing migrations

Comment on lines +26 to +35
def mostRecentMigration: ReadAction[Timestamp] =
sql"""select max(LAST_UPDATED)
from WORKSPACE_SETTINGS
where SETTING_TYPE='CompactDataTables'""".as[Timestamp].head

def getRecentlyMigratedWorkspaces(maxDate: Timestamp, hours: Int): ReadAction[Seq[UUID]] =
sql"""select WORKSPACE_ID
from WORKSPACE_SETTINGS
where SETTING_TYPE='CompactDataTables'
and LAST_UPDATED > DATE_SUB($maxDate, INTERVAL $hours HOUR)""".as[UUID]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore; this is for ad-hoc validation of the existing migrations


import AuditJsonSupport._
logger.info("Entity operation audit", StructuredArguments.raw("audit", auditInfo.toJson.compactPrint))
logger.trace("Entity operation audit", StructuredArguments.raw("audit", auditInfo.toJson.compactPrint))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this just reduces log volume for the re-migration. Since this is all happening in a new instance with a new database we don't need the audit logging.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking - we have other logging that will give us insight into what is happening with the migrations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've improved the logging in the most recent commits to (try to) make sure we have enough insight!

}
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some helper code to get exactly the provider we want, regardless of the state of the workspace

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore this entire file; this is for ad-hoc validation of the existing migrations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this special Rawls instance, which is dedicated to re-migrating entities, I've turned off ALL back-rawls boot monitors ... and then started the new QuicksilverMigrationMonitor.

// (GoogleBilling, checkGoogleBilling(googleServicesDAO)),
// (GoogleBuckets, checkGoogleBuckets(googleServicesDAO, bucketsToCheck)),
// (GooglePubSub, checkGooglePubsub(googlePubSubDAO, topicsToCheck)),
// (Sam, checkSam(samDAO))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this special Rawls instance, which is dedicated to re-migrating entities, no need for any of these other health checks. This also helps to reduce logging volume.

@@ -0,0 +1,210 @@
package org.broadinstitute.dsde.rawls.monitor
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main coding effort for re-migrating entities!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore this entire file; this is for ad-hoc validation of the existing migrations

@davidangb davidangb changed the title Da core 746 migration validation CORE-746 Quicksilver re-migration Nov 14, 2025
Copy link
Contributor

@calypsomatic calypsomatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - are the test failures due to mixing and matching branches or do they need to be looked into?

@davidangb
Copy link
Contributor Author

are the test failures due to mixing and matching branches or do they need to be looked into?

@calypsomatic yeah - test failures can be ignored. I have turned off a bunch of functionality (like health checks) and didn't update the tests. I suppose I could just go and update the tests too to make sure this returns cleanly ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants