Skip to content

[db-sync] Add extra columns to d_b_volume_snapshot table to allow sync #13348

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 2 commits into from
Sep 28, 2022

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented Sep 27, 2022

Description

Make the db_volume_snapshot table able to be synced between clusters.

  • Add a migration so that the table has _lastModified and deleted fields.

Records are currently hard-deleted from this table, so the deleted field will not be used in practice:

public async deleteVolumeSnapshot(volumeSnapshotId: string): Promise<void> {
const volumeSnapshots = await this.getVolumeSnapshotRepo();
await volumeSnapshots.delete(volumeSnapshotId);
}

Related Issue(s)

Part of #9198

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

Andrew Farries added 2 commits September 26, 2022 15:21
Add a migration to add `_lastModified` and `deleted` columns to the
`d_b_volume_snapshot` table so that it can be synced by `db-sync`.
@andrew-farries andrew-farries requested a review from a team September 27, 2022 06:51
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Sep 27, 2022
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-sync-snapshots-table.6 because the annotations in the pull request description changed
(with .werft/ from main)

@@ -47,6 +47,12 @@ export class GitpodSessionTableDescriptionProvider implements TableDescriptionPr
export class GitpodTableDescriptionProvider implements TableDescriptionProvider {
readonly name = "gitpod";
protected readonly tables: TableDescription[] = [
{
Copy link
Member

Choose a reason for hiding this comment

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

Feels a bit risky to include this in the same PR as the migration. Are you happy with the risks involved in case the migration doesn't go through but db-sync gets rolled out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point - I'll leave the migration + config change in this PR for ease of review but I can split it into two before merging.

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 removed the db-sync config change from this PR and I'll add it in a follow up.

Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

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

LGTM

/hold for Q on risk

@geropl
Copy link
Member

geropl commented Sep 27, 2022

@andrew-farries Did you engage with @sagor999 before doing this? He's leading the PVC effort in Team Workspace. We definitely need to do this before deploying this.

/hold

@andrew-farries
Copy link
Contributor Author

@andrew-farries Did you engage with @sagor999 before doing this?

I've requested a review from @sagor999.

Copy link
Contributor

@sagor999 sagor999 left a comment

Choose a reason for hiding this comment

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

LGTM
(I was under impression that this table already should have been db-synced but I guess it was not? So good catch! 🙏 )

@andrew-farries
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit 37908b4 into main Sep 28, 2022
@roboquat roboquat deleted the af/sync-snapshots-table branch September 28, 2022 06:42
@andrew-farries andrew-farries changed the title [db-sync] Sync d_b_volume_snapshot table [db-sync] Add extra columns to d_b_volume_snapshot table to allow sync Sep 28, 2022
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants