-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[server] Two startPrebuild
fixes
#10154
Conversation
startPrebuild
fixes
@@ -102,6 +102,12 @@ export class BitbucketServerApp { | |||
const cloneUrl = context.repository.cloneUrl; | |||
const commit = context.revision; | |||
const projectAndOwner = await this.findProjectAndOwner(cloneUrl, user); | |||
if (projectAndOwner.project) { | |||
/* tslint:disable-next-line */ | |||
/** no await */ this.projectDB.updateProjectUsage(projectAndOwner.project.id, { |
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.
👍🏻
@@ -102,6 +102,12 @@ export class BitbucketServerApp { | |||
const cloneUrl = context.repository.cloneUrl; | |||
const commit = context.revision; | |||
const projectAndOwner = await this.findProjectAndOwner(cloneUrl, user); | |||
if (projectAndOwner.project) { | |||
/* tslint:disable-next-line */ | |||
/** no await */ this.projectDB.updateProjectUsage(projectAndOwner.project.id, { |
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.
why no await here?
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.
Good question. This is how every other updateProjectUsage
call site does it -- the thought was something like: This is not important right now, so it's fine to do it async without delaying the current prebuild/workspace start.
863cd96
to
bb91bc7
Compare
bb91bc7
to
ed27a34
Compare
… no prebuild tasks configured
ed27a34
to
ff7248b
Compare
startPrebuild
fixesstartPrebuild
fixes
Description
Comparing all call-sites of
prebuildManager.startPrebuild
yielded interesting insights:(compare every call-site)
gitpod/components/server/ee/src/prebuilds/bitbucket-app.ts
Lines 98 to 131 in ed30d96
gitpod/components/server/ee/src/prebuilds/bitbucket-server-app.ts
Lines 104 to 123 in e8fa6d2
gitpod/components/server/ee/src/prebuilds/github-app.ts
Lines 244 to 288 in 5509d9e
gitpod/components/server/ee/src/prebuilds/github-enterprise-app.ts
Lines 120 to 148 in ed30d96
gitpod/components/server/ee/src/prebuilds/gitlab-app.ts
Lines 110 to 138 in ed30d96
d_b_project_usage
(fixed here).gitpod.yml
(!)The second point is actually quite bad, because users may accidentally:
Related Issue(s)
Fixes #
How to test
Release Notes
Documentation