-
Notifications
You must be signed in to change notification settings - Fork 104
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
fix: delete graphs before deleting org #1326
base: main
Are you sure you want to change the base?
fix: delete graphs before deleting org #1326
Conversation
Pull request was closed
8bbaa60
to
862d419
Compare
limit: 0, | ||
offset: 0, | ||
}); | ||
const subgraphs = await subgraphRepo.list({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really necessary? Can't we delete all targets of the org?
keycloakClient, | ||
keycloakRealm: realm, | ||
}, | ||
blobStorage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why is this service dependency not part of he UserRepository constructor?
} = getConfig(); | ||
|
||
const userId = process.env.USER_ID || ''; | ||
|
||
const bucketName = extractS3BucketName(s3Storage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really necessary to put all the logic in here? Why don't we issue a job to the queue and the controlplane picks it up? In that way, we also leverage all benefits that the queue provides retry, history etc...
return this.db.transaction(async (tx) => { | ||
const oidcRepo = new OidcRepository(tx); | ||
const fedGraphRepo = new FederatedGraphRepository(this.logger, tx, organizationId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we go this road of deleting everything manuel, we need very good tests. Could you outline what is delete by constraints and what not?
Motivation and Context
Checklist