-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 prebuild lookup for prebuilds run in reverse-chronological order #20360
Conversation
Before merging, I will investigate if our assumption of "commits are ordered in descending chronological order" holds. This will entail going through API docs of our SCM providers |
Update: I re-tested, and everything worked as expected. Not sure what went wrong yesterday; might have forgotten the |
@geropl I've pushed |
@filiptronicek Sorry for the confusion: I did not mean to argue against having a filter function, that certainly makes sense. Also, I realized when looking at your solution, that my idea from yesterday did not make sense. 🙄 Synthesizing our approaches, I took the liberty to push 29e6aa6. Happy to sync on this! 👋 |
@geropl that filter function was a bit redundant anyway, since we check for commit overlap in I think these two should be identical, is there anything in particular that made you add the warning? Either way, we should definitely unify which one we use in the code. gitpod/components/server/src/prebuilds/incremental-workspace-service.ts Lines 173 to 176 in 29e6aa6
|
I think so, too, but am not 💯 sure I'm not missing sth. So going with the log, and a follow-up to remove it if it does not show up the next week. 👍 |
29e6aa6
to
caa1f74
Compare
…tpod-io/gitpod into ft/fix-mixed-up-prebuild-runs
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.
Code LGTM, tests are green (+ looking great!): ✔️
Description
The following situation breaks Gitpod as it is today:
A
andB
tomain
B
(the current head ofmain
) and that triggers a prebuildA
(either by it being the head of another branch, or it being a directly opened commit). This in turn triggers a prebuild forA
.main
(commitB
) again as a new workspace, but now the prebuild forA
would get used, because it was created later than the one forB
and therefore returned first from the DB.How to test
See updates to DB tests.
/hold