Skip to content

[server] Delete prebuild records when purging workspaces #13152

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
Sep 23, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Sep 21, 2022

Description

When we delete Workspaces, we also need to delete corresponding prebuilds when the Workspace is based on a prebuild.

Related Issue(s)

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@easyCZ easyCZ requested a review from a team September 21, 2022 07:24
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Sep 21, 2022
@easyCZ easyCZ force-pushed the mp/gc-delete-prebuilds branch 2 times, most recently from da08869 to a20e0b7 Compare September 21, 2022 07:59
@roboquat roboquat added size/L and removed size/M labels Sep 21, 2022

@injectable()
export class MonitoringEndpointsAppEE extends WorkspaceHealthMonitoring {
@inject(WorkspaceHealthMonitoring) protected readonly workspaceHealthMonitoring: WorkspaceHealthMonitoring;

public create(): express.Application {
const registry = prometheusClient.register;
Copy link
Member

Choose a reason for hiding this comment

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

🧡


// This column triggers the db-sync deletion mechanism. It's not intended for public consumption.
@Column()
deleted?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

The migration for this field is still missing, right?

Are you still working on this PR/should if be in "draft" mode? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

This one actually has the field, just wasn't in the db model. Yes, for the other ones we need the migrations. I'm moving the PR to draft.

Copy link
Member

Choose a reason for hiding this comment

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

just wasn't in the db model

Oh really... 🙈

@easyCZ easyCZ marked this pull request as draft September 21, 2022 09:15
@easyCZ easyCZ force-pushed the mp/gc-delete-prebuilds branch from 3765d1c to ee39803 Compare September 21, 2022 10:14
@easyCZ
Copy link
Member Author

easyCZ commented Sep 21, 2022

/werft run

👍 started the job as gitpod-build-mp-gc-delete-prebuilds.5
(with .werft/ from main)

@easyCZ easyCZ force-pushed the mp/gc-delete-prebuilds branch 2 times, most recently from 12ddbc7 to 92b2399 Compare September 22, 2022 09:51
@easyCZ easyCZ marked this pull request as ready for review September 22, 2022 09:55
@easyCZ easyCZ force-pushed the mp/gc-delete-prebuilds branch 2 times, most recently from ccab82d to a84edd1 Compare September 22, 2022 10:32
@easyCZ easyCZ force-pushed the mp/gc-delete-prebuilds branch from a84edd1 to 45d866c Compare September 22, 2022 10:35
@easyCZ easyCZ requested a review from geropl September 22, 2022 11:15
const registry = prometheusClient.register;

prometheusClient.collectDefaultMetrics({ register: registry });
registerDBMetrics(registry);
Copy link
Member Author

Choose a reason for hiding this comment

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

This change was needed to keep the metrics defined in the gitpod-db package, but bind it to server.

@easyCZ easyCZ requested a review from a team September 22, 2022 14:03
Copy link
Member

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

LGTM

@roboquat roboquat merged commit 6c40c53 into main Sep 23, 2022
@roboquat roboquat deleted the mp/gc-delete-prebuilds branch September 23, 2022 07:26
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Sep 26, 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/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants