WIP: generalize for Gerrit / Floral #3

Draft
raito wants to merge 61 commits from vcs-generalization into main
Owner

Not for public eyes, or ping me for now.

TODO:

  • cancellation support
  • pastebin-web
  • statcheck-worker
  • statcheck-api
  • implement the status & check server with diesel queries for real
  • implement the stat check client API
  • generalize the check run state to account for failures and other non-running states.
  • reuse commit status structure and turn around things for api handles
  • transform check runs as a sql table
  • check run states as a sql enum
  • simplify further the frontend plugin
  • mTLS auth for mutations on the statcheck API
  • redo evaluation strategy with generalized data
  • VCS trait
  • get rid of hubcaps somehow, done by K900
  • introduce reqwest, done by K900
  • introduce gerrit-stream-events worker

Signed-off-by: Raito Bezarius masterancpp@gmail.com

Not for public eyes, or ping me for now. TODO: - [ ] cancellation support - [ ] pastebin-web - [ ] statcheck-worker - [x] statcheck-api - [x] implement the status & check server with diesel queries for real - [x] implement the stat check client API - [x] generalize the check run state to account for failures and other non-running states. - [x] reuse commit status structure and turn around things for api handles - [ ] transform check runs as a sql table - [ ] check run states as a sql enum - [ ] simplify further the frontend plugin - [x] mTLS auth for mutations on the statcheck API - [x] redo evaluation strategy with generalized data - [x] VCS trait - [x] get rid of hubcaps somehow, done by K900 - [x] introduce reqwest, done by K900 - [x] introduce gerrit-stream-events worker Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito added 1 commit 2024-10-28 19:31:06 +00:00
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed vcs-generalization from 584659e727 to e9b6e99328 2024-10-29 23:36:10 +00:00 Compare
raito changed title from WIP: treewide: remove GitHub, generalize, introduce Gerrit to WIP: generalize for Gerrit / Floral 2024-10-29 23:36:32 +00:00
raito added 1 commit 2024-10-30 17:42:39 +00:00
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed vcs-generalization from cccaf78059 to 3e8152fe99 2024-10-30 19:37:20 +00:00 Compare
raito added 3 commits 2024-10-30 21:08:12 +00:00
To test all our microservices and more!

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito added 1 commit 2024-10-30 22:12:33 +00:00
This is a full fledged internal pastebin service that no one can view
yet!

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito added 2 commits 2024-11-01 12:24:32 +00:00
Bye bye, one piece of GitHub!

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed vcs-generalization from 050c96ea83 to 326cf58e14 2024-11-01 12:43:49 +00:00 Compare
raito force-pushed vcs-generalization from 326cf58e14 to 37a58b7ab4 2024-11-01 12:50:19 +00:00 Compare
raito force-pushed vcs-generalization from 37a58b7ab4 to ae9e48630d 2024-11-02 10:48:50 +00:00 Compare
raito added 1 commit 2024-11-04 11:50:36 +00:00
This generalizes all the GitHub specific API in a minimal amount of
changes.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed vcs-generalization from dba0c9a7ed to 8f87d41636 2024-11-04 16:07:40 +00:00 Compare
raito force-pushed vcs-generalization from 8f87d41636 to 9c3794f718 2024-11-04 16:09:22 +00:00 Compare
raito force-pushed vcs-generalization from 9c3794f718 to 5b9e6cfc2a 2024-11-05 09:50:48 +00:00 Compare
raito force-pushed vcs-generalization from 5b9e6cfc2a to 68f88d40dc 2024-11-05 22:05:31 +00:00 Compare
raito force-pushed vcs-generalization from 68f88d40dc to ecdd6d52a6 2024-11-14 17:38:32 +00:00 Compare
raito force-pushed vcs-generalization from ecdd6d52a6 to 8ba1132c17 2024-11-14 17:53:40 +00:00 Compare
raito force-pushed vcs-generalization from 8ba1132c17 to 705adbb8e4 2024-11-14 18:04:42 +00:00 Compare
raito added 3 commits 2024-11-14 21:19:42 +00:00
Make also the event-streamer use it.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This should be piped into `ofborgctl listen gerrit-events` or something
later on.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed vcs-generalization from 3265bef2eb to c922e6e455 2024-11-14 21:58:11 +00:00 Compare
k900 added 7 commits 2024-11-16 14:55:19 +00:00
k900 added 4 commits 2024-11-16 16:51:57 +00:00
k900 added 2 commits 2024-11-16 20:53:06 +00:00
Tracing actually works now. Me and clippy have signed a non-aggression pact.
raito added 4 commits 2024-12-14 19:43:31 +00:00
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed vcs-generalization from 3b42806038 to 3af7e6976b 2024-12-14 19:45:38 +00:00 Compare
raito added 5 commits 2024-12-15 22:39:33 +00:00
Drop the logging, use a proper routing key, add error reporting for
error cases.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This worker transforms a native Gerrit stream event into a OfBorg VCS
generic stream event.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Those are very crude basic generalization of Gerrit specific events.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Simplified to the maximum, it consumes from VCSEvents in the case of
creation & update.

It does not handle cancellation yet.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed vcs-generalization from bb08c8cb97 to a7075182c2 2024-12-15 22:51:18 +00:00 Compare
raito added 1 commit 2024-12-15 23:07:20 +00:00
Otherwise, it's pretty weird!

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito added 1 commit 2024-12-15 23:37:22 +00:00
Otherwise, it's hard to debug.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed vcs-generalization from 74a066e887 to 133fc46d0a 2024-12-16 00:00:46 +00:00 Compare
raito force-pushed vcs-generalization from 133fc46d0a to e998fabf13 2024-12-16 00:02:45 +00:00 Compare
raito added 1 commit 2024-12-16 00:25:40 +00:00
We were catching nothing with that key.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito added 3 commits 2024-12-16 23:28:37 +00:00
useful for many reasons, like testing!

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Let's replace it with BLAKE3 because I'm a BLAKE fan.

Enjoy.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This way, we can plug any VCS and just leave it to the Git reference
converter.

We implement a very simple one for Gerrit.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito added 1 commit 2024-12-16 23:30:40 +00:00
If you come by this message, thank you for that tool and codebase. It's
also now time for it to evolve into something less personal… :).

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito added 2 commits 2024-12-17 00:21:24 +00:00
This is a basic server that returns mocked data.

Next steps are persistence, client support in the rest of the code, etc.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
It uses imaginary APIs for now, but it's OK.

This has showed up a bunch of generalizations we will need in our own
API.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed vcs-generalization from 2c086a6d78 to 00c55f40bf 2024-12-24 00:37:59 +00:00 Compare
raito force-pushed vcs-generalization from 00c55f40bf to cb592d78a3 2024-12-24 16:29:32 +00:00 Compare
raito added 1 commit 2024-12-25 14:02:50 +00:00
CommitStatus was too rigid for GitHub legacy usecases. It is replaced by
a more flexible ChangeStatus tailored for Gerrit richer features.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito added 2 commits 2024-12-29 02:24:05 +00:00
This was an artifact of GitHub who needs you to use the issue API on
PRs.

We don't have this limitation and this is an implementation detail of
GitHub.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
delete commit status, make it compile, etc.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
raito force-pushed vcs-generalization from a1359a5d0a to 582a893aed 2025-01-01 03:12:40 +00:00 Compare
raito force-pushed vcs-generalization from 582a893aed to 82c12dfa67 2025-01-01 03:46:47 +00:00 Compare
raito force-pushed vcs-generalization from 82c12dfa67 to 89f60cfde1 2025-01-01 16:33:37 +00:00 Compare
raito force-pushed vcs-generalization from 89f60cfde1 to 207f6c1393 2025-01-01 16:39:28 +00:00 Compare
raito force-pushed vcs-generalization from 207f6c1393 to b23794207d 2025-01-03 21:28:50 +00:00 Compare
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin vcs-generalization:vcs-generalization
git checkout vcs-generalization

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff vcs-generalization
git checkout vcs-generalization
git rebase main
git checkout main
git merge --ff-only vcs-generalization
git checkout vcs-generalization
git rebase main
git checkout main
git merge --no-ff vcs-generalization
git checkout main
git merge --squash vcs-generalization
git checkout main
git merge --ff-only vcs-generalization
git checkout main
git merge vcs-generalization
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: the-distro/ofborg#3
No description provided.