workers: revision worker implementation - #224
Draft
zzzeid wants to merge 1 commit into
Draft
Conversation
zzzeid
marked this pull request as ready for review
November 15, 2022 14:41
zzzeid
force-pushed
the
zeid/bug-1744327-refactor-workers
branch
3 times, most recently
from
November 16, 2022 14:16
61a474e to
306ca99
Compare
zzzeid
commented
Nov 16, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
zzzeid
commented
Nov 24, 2022
cgsheeh
requested changes
Nov 24, 2022
Comment on lines
+353
to
+320
| try: | ||
| warnings, errors = self.process(revision) | ||
| except Exception as e: | ||
| logger.info(f"Exception encountered while processing {revision}") | ||
| revision.status = RS.PROBLEM | ||
| revision.update_data(error="".join(e.args)) | ||
| logger.exception(e) | ||
| db.session.commit() | ||
| continue |
Member
There was a problem hiding this comment.
I think we should catch a different exception here.
Contributor
Author
There was a problem hiding this comment.
I will look into this one.
cgsheeh
requested changes
Dec 14, 2022
cgsheeh
left a comment
Member
There was a problem hiding this comment.
A few more comments, questions etc.
cgsheeh
requested changes
Dec 22, 2022
cgsheeh
left a comment
Member
There was a problem hiding this comment.
Please don't use single letter variable names.
Comment on lines
+69
to
+72
| statuses = statuses or [ | ||
| "draft", | ||
| "needs-review", | ||
| "accepted", | ||
| "published", | ||
| "changes-planned", | ||
| ] |
Member
There was a problem hiding this comment.
What is the significance of this list as the default? If you could give this a :sort too that would be great.
Contributor
Author
There was a problem hiding this comment.
It limits how many revisions we are synchronizing based on those that we need. The list will probably be tweaked in the future (e.g., maybe we don't sync drafts, or changes-planned, since those won't be landable anyway.)
zzzeid
force-pushed
the
zeid/bug-1791807-upgrade-cache
branch
from
February 28, 2023 14:45
c1be7fe to
47de8d0
Compare
zzzeid
force-pushed
the
zeid/bug-1791807-upgrade-cache
branch
2 times, most recently
from
March 13, 2023 12:29
9fea31a to
295c589
Compare
zzzeid
force-pushed
the
zeid/bug-1744327-refactor-workers
branch
from
March 22, 2023 01:17
bd0c611 to
c3ec081
Compare
zzzeid
marked this pull request as draft
March 22, 2023 12:12
zzzeid
commented
Apr 27, 2023
zzzeid
commented
Apr 27, 2023
zzzeid
force-pushed
the
zeid/bug-1744327-refactor-workers
branch
4 times, most recently
from
May 11, 2023 19:02
fcfd98b to
30b64e9
Compare
zzzeid
force-pushed
the
zeid/bug-1825277-landing-job-revisions
branch
4 times, most recently
from
May 17, 2023 19:24
0c15645 to
e093d5f
Compare
zzzeid
force-pushed
the
zeid/bug-1744327-refactor-workers
branch
5 times, most recently
from
May 24, 2023 19:12
3225339 to
8e73e5a
Compare
zzzeid
force-pushed
the
zeid/bug-1744327-refactor-workers
branch
4 times, most recently
from
May 29, 2023 17:27
00ba1c3 to
f3ededa
Compare
zzzeid
changed the base branch from
main
to
zeid/bug-1835678-add-lando-revision-to-api
May 29, 2023 17:28
zzzeid
force-pushed
the
zeid/bug-1744327-refactor-workers
branch
2 times, most recently
from
May 29, 2023 17:45
0e58aeb to
18abe99
Compare
Base automatically changed from
zeid/bug-1835678-add-lando-revision-to-api
to
main
May 29, 2023 20:35
zzzeid
force-pushed
the
zeid/bug-1744327-refactor-workers
branch
3 times, most recently
from
May 30, 2023 19:24
0fb50f6 to
5240202
Compare
zzzeid
commented
May 30, 2023
| for r in revision.predecessors + [revision]: | ||
| try: | ||
| hgrepo.apply_patch(io.BytesIO(r.patch_bytes)) | ||
| except Exception as e: |
NOTE: original branch name references the wrong bug. WIP DO NOT MERGE - implement base RevisionWorker (bug 1788728) - implement Supervisor worker (bug 1835861) - implement Processor worker (bug 1835862) - add repo.use_revision_worker feature flag (bug 1788732) - add main worker flag and capacity/throttle flags - add method to parse diff and list affected files <******* - add test coverage for revision_worker.py - add new start/stop commands to manage workers - add new flags to stop workers gracefully (*_WORKER_STOPPED) - refactor dependency and stack fetching and parsing using networkx <******** - rename old command lando-cli landing-worker to lando-cli start-landing-worker TODO: - detect stack change on page load - add tests for new warnings
zzzeid
force-pushed
the
zeid/bug-1744327-refactor-workers
branch
from
May 31, 2023 18:24
5240202 to
dd677b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: original branch name references the wrong bug.
WIP DO NOT MERGE
TODO: