WIP: forgejo - gotosocial federation testing #664

Closed
famfo wants to merge 2 commits from famfo/end-to-end:gts-testing into main
Member

What is being tested:

  • gts -> forgejo following
    • actual follow request (webfinger, public key verification)
    • federating activities (currently: creating a repository, creating an issue, also tests the public key verification). This needs more tests for other types of activities and private activities. Further, I think the code is not ideal for this, this will fall apart too easily on small forgejo changes to the way these activities are structured.
  • forgejo -> gts following:
    • following gts users (again: webfinger, public key verification)
    • federating activities (more concrete: Notes) from gts -> forgejo
  • gts -> forgejo unfollowing

CI output to testcases

Dependencies

This largely depends on https://codeberg.org/forgejo/forgejo/pulls/4767. I again, have some local fixes ontop of that, which are at https://codeberg.org/meissa/forgejo/pulls/19.

TODOs:

  • currently, the tests exit after making the follow request from forgejo to gotosocial, this is incomplete
  • getting the gotosocial PR merged and preferably also new release
  • I'm not happy with the run.sh script, I want to get rid of it once the gts PR has been merged
## What is being tested: - gts -> forgejo following - actual follow request (webfinger, public key verification) - federating activities (currently: creating a repository, creating an issue, also tests the public key verification). This needs more tests for other types of activities and private activities. Further, I think the code is not ideal for this, this will fall apart too easily on small forgejo changes to the way these activities are structured. - forgejo -> gts following: - following gts users (again: webfinger, public key verification) - federating activities (more concrete: `Note`s) from gts -> forgejo - gts -> forgejo unfollowing ## CI output to testcases - [following the forgejo account](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L88) - [webfinger search](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L91) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1214> - [following the account](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L113) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1219> - creating and federating activities to gotosocial - [creating a repository](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L141) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1247> - [creating an issue](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L155) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1256> - federating activities to forgejo - [following the gotosocial account](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L169) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1265> - [federating a gotosocial note](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L195) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1278> - unfollowing and refollowing - [unfollowing the forgejo user](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L215) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1290> - [creating an issue that should not federate](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L231) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1299> - [refollowing the forgejo user](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L236) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1301> - [creating an issue that should federate](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L240) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1327> - [check that issue 2 did not federate](https://code.forgejo.org/forgejo/end-to-end/src/commit/7ecb188d47d6f4b0e7ecd1a4cfe1a45e34f8e14c/federation/scenario-gotosocial/run.sh#L251) - <https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/3#jobstep-6-1337> ## Dependencies This largely depends on <https://codeberg.org/forgejo/forgejo/pulls/4767>. I again, have some local fixes ontop of that, which are at <https://codeberg.org/meissa/forgejo/pulls/19>. ## TODOs: - [x] currently, the tests exit after making the follow request from forgejo to gotosocial, this is incomplete - [x] getting the gotosocial PR merged and preferably also new release - [x] I'm not happy with the `run.sh` script, I want to get rid of it once the gts PR has been merged
@ -0,0 +27,4 @@
-v "$tmpdir:/mount" \
-p "8080:8080" \
--entrypoint "/mount/gotosocial" \
docker.io/superseriousbusiness/gotosocial:latest \
Contributor

It would be fine here to use an image of your own that includes your patch.

It would be fine here to use an image of your own that includes your patch.
earl-warren marked this conversation as resolved
@ -0,0 +41,4 @@
--password "verysecurepassword"
echo "waiting 5"
sleep 5
Contributor

speed can vary widely, instead of sleeping loop over a command that checks it is done (retry(1) is available)

speed can vary widely, instead of sleeping loop over a command that checks it is done (retry(1) is available)
earl-warren marked this conversation as resolved
run.sh Outdated
@ -0,0 +4,4 @@
#patchelf ../forgejo/forgejo --set-interpreter /lib64/ld-linux-x86-64.so.2
podman run \
-it --privileged \
-v ../forgejo/gitea:/srv/forgejo-binaries/forgejo-11.0 \
Contributor

For testing purposes you can build from a designated repository. All you need to do is something like:

#662/files

and end-to-end/lib/build.sh will compile into forgejo v12.0 which you can then use.

For testing purposes you can build from a designated repository. All you need to do is something like: https://code.forgejo.org/forgejo/end-to-end/pulls/662/files#diff-7fe7b79e623c4f173073dbd52a11dcfa5eb741f8 and `end-to-end/lib/build.sh` will compile into forgejo v12.0 which you can then use.
earl-warren marked this conversation as resolved
Contributor

I will refrain from commenting on details before it is actually working. But it looks like it is going in the right direction, from a distance.

You can move the Dockerfile into a function in lib/lib.sh that installs podman (it will be used in other contexts I'm sure) and call that function from federation/federation.sh. This way all you've done can assume podman is already installed and that should simplify the setup a bit.

The log patches are good to merge right away, of course.

I will refrain from commenting on details before it is actually working. But it looks like it is going in the right direction, from a distance. You can move the Dockerfile into a function in `lib/lib.sh` that installs podman (it will be used in other contexts I'm sure) and call that function from `federation/federation.sh`. This way all you've done can assume podman is already installed and that should simplify the setup a bit. The log patches are good to merge right away, of course.
lib/lib.sh Outdated
@ -74,0 +76,4 @@
$SUDO apt-get update -qq
$SUDO apt-get install -y -qq podman
fi
}
Contributor

It would be fine to always install podman in function dependency() { at $SUDO apt-get install -y -qq make curl daemon git-lfs jq sqlite3 skopeo

It would be fine to always install podman in `function dependency() {` at `$SUDO apt-get install -y -qq make curl daemon git-lfs jq sqlite3 skopeo`
earl-warren marked this conversation as resolved
famfo changed title from WIP: forgejo - gotosocial federation testing to forgejo - gotosocial federation testing 2025-06-01 16:22:30 +00:00
Contributor

Can you please update the description with:

  • links to the forgejo & gts PR that need merging before that can be merged
  • links to the output of the CI run that shows which part works and which test covers that specific feature

I see you are using a gts release, does that mean the PR you were waiting for was merged already?

Can you please update the description with: - links to the forgejo & gts PR that need merging before that can be merged - links to the output of the CI run that shows which part works and which test covers that specific feature I see you are using a gts release, does that mean the PR you were waiting for was merged already?
Contributor

For the sake of clarity you should

  • add WIP: to show it is waiting on dependency PRs to be merged
  • squash everything in a single commit and move the "build from source" in a separate commit that you will remove once the forgejo PR is merged, because it will no longer be necessary (and it would also run all tests against your forgejo branch which is not something you want)
For the sake of clarity you should - add WIP: to show it is waiting on dependency PRs to be merged - squash everything in a single commit and move the "build from source" in a separate commit that you will remove once the forgejo PR is merged, because it will no longer be necessary (and it would also run all tests against your forgejo branch which is not something you want)
Author
Member

I see you are using a gts release, does that mean the PR you were waiting for was merged already?

The commit was merged, the gts tag I'm using is built from the latest main commit.

squash everything in a single commit

How are commits squashed together on merge? Is it just all a single commits or should I subdivide them a bit more?

> I see you are using a gts release, does that mean the PR you were waiting for was merged already? The commit was merged, the gts tag I'm using is built from the latest main commit. > squash everything in a single commit How are commits squashed together on merge? Is it just all a single commits or should I subdivide them a bit more?
famfo changed title from forgejo - gotosocial federation testing to WIP: forgejo - gotosocial federation testing 2025-06-01 17:29:46 +00:00
famfo force-pushed gts-testing from 649d4b5b78
Some checks failed
/ build (pull_request) Successful in 1m50s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Failing after 1m28s
/ federation (pull_request) Successful in 1m38s
/ packages (pull_request) Successful in 1m53s
/ actions (pull_request) Successful in 33m57s
to e24c44800f
Some checks failed
/ build (pull_request) Successful in 1m33s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ federation (pull_request) Successful in 1m35s
/ packages (pull_request) Successful in 1m42s
/ upgrade and storage (pull_request) Failing after 1m34s
/ actions (pull_request) Successful in 29m50s
2025-06-02 00:25:46 +00:00
Compare
Contributor

@famfo wrote in #664 (comment):

squash everything in a single commit

How are commits squashed together on merge? Is it just all a single commits or should I subdivide them a bit more?

They will be merged if they are nicely organized or squashed if they are not. It is up to you which way you prefer. What you've done now is good.

@famfo wrote in https://code.forgejo.org/forgejo/end-to-end/pulls/664#issuecomment-41390: > > squash everything in a single commit > > How are commits squashed together on merge? Is it just all a single commits or should I subdivide them a bit more? They will be merged if they are nicely organized or squashed if they are not. It is up to you which way you prefer. What you've done now is good.
Contributor

Relevant CI output: https://code.forgejo.org/forgejo/end-to-end/actions/runs/3152/jobs/3#jobstep-5-15

Could you point to the relevant lines in the full log? this line and above. This is to make it easier for me (or another reviewer) to know where to look to check this is not a false positive and that the assertions are meaningful. 🙏

> Relevant CI output: https://code.forgejo.org/forgejo/end-to-end/actions/runs/3152/jobs/3#jobstep-5-15 Could you point to the relevant lines in the full log? [this line and above](https://code.forgejo.org/forgejo/end-to-end/actions/runs/3152/jobs/3#jobstep-6-1501). This is to make it easier for me (or another reviewer) to know where to look to check this is not a false positive and that the assertions are meaningful. 🙏
Contributor

@famfo wrote in #664 (comment):

I see you are using a gts release, does that mean the PR you were waiting for was merged already?

The commit was merged, the gts tag I'm using is built from the latest main commit.

Congratulations on that 🎉

@famfo wrote in https://code.forgejo.org/forgejo/end-to-end/pulls/664#issuecomment-41390: > > I see you are using a gts release, does that mean the PR you were waiting for was merged already? > > The commit was merged, the gts tag I'm using is built from the latest main commit. Congratulations on that 🎉
famfo force-pushed gts-testing from e24c44800f
Some checks failed
/ build (pull_request) Successful in 1m33s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ federation (pull_request) Successful in 1m35s
/ packages (pull_request) Successful in 1m42s
/ upgrade and storage (pull_request) Failing after 1m34s
/ actions (pull_request) Successful in 29m50s
to c71e61e2b8
Some checks failed
/ build (pull_request) Successful in 1m39s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ federation (pull_request) Successful in 1m36s
/ upgrade and storage (pull_request) Failing after 1m33s
/ packages (pull_request) Successful in 1m50s
/ actions (pull_request) Successful in 29m56s
2025-06-02 14:46:07 +00:00
Compare
Author
Member

Changed the branch to the one used in https://codeberg.org/forgejo/forgejo/pulls/4767, I could also use the ref from forgejo/forgejo directly if that is more desirable :)

Changed the branch to the one used in <https://codeberg.org/forgejo/forgejo/pulls/4767>, I could also use the ref from `forgejo/forgejo` directly if that is more desirable :)
Contributor

@famfo it is fine as it is.

@famfo it is fine as it is.
Contributor

@earl-warren wrote in #664 (comment):

Relevant CI output: https://code.forgejo.org/forgejo/end-to-end/actions/runs/3152/jobs/3#jobstep-5-15

Could you point to the relevant lines in the full log? this line and above. This is to make it easier for me (or another reviewer) to know where to look to check this is not a false positive and that the assertions are meaningful. 🙏

I see you have added a link to the description. However this is not quite what I meant. Could you please help by matching the most relevant output lines (out of hundreds of output lines) with the corresponding lines in the scenario to help me with the review? It will otherwise make it more difficult for me. It is easier for you because you know what to look at and can explain: "this works (link to script) because it shows this output (link to output)".

Also note that there are no notifications when you edit the description or when you add an emoticon. Reason why I did not reply right away. Please post a comment to draw my attention 🙏

@earl-warren wrote in https://code.forgejo.org/forgejo/end-to-end/pulls/664#issuecomment-41474: > > Relevant CI output: https://code.forgejo.org/forgejo/end-to-end/actions/runs/3152/jobs/3#jobstep-5-15 > > Could you point to the relevant lines in the full log? [this line and above](https://code.forgejo.org/forgejo/end-to-end/actions/runs/3152/jobs/3#jobstep-6-1501). This is to make it easier for me (or another reviewer) to know where to look to check this is not a false positive and that the assertions are meaningful. :pray: I see you have added a link to the description. However this is not quite what I meant. Could you please help by matching the most relevant output lines (out of hundreds of output lines) with the corresponding lines in the scenario to help me with the review? It will otherwise make it more difficult for me. It is easier for you because you know what to look at and can explain: "this works (link to script) because it shows this output (link to output)". Also note that there are no notifications when you edit the description or when you add an emoticon. Reason why I did not reply right away. Please post a comment to draw my attention 🙏
Author
Member

I have tried to link the CI output and test cases in a readable manner :)

I have tried to link the CI output and test cases in a readable manner :)
@ -0,0 +29,4 @@
server start
)"
function wait_forgejo_migrations() {
Contributor

you mean wait_gts_ready here or am I misreading this?

you mean `wait_gts_ready` here or am I misreading this?
earl-warren marked this conversation as resolved
earl-warren left a comment
Contributor

This is a very fine and simple end-to-end test ❤️ With the guidance provided, the review is very simple. I will do the same manually on my local machine today. Exciting times.

This is a very fine and simple end-to-end test ❤️ With the guidance provided, the review is very simple. I will do the same manually on my local machine today. Exciting times.
Contributor

If you rebase all checks shoudl pass. The upgrade failure is a false negative.

If you rebase all checks shoudl pass. The upgrade failure is a false negative.
Contributor

Could you split out the Dockerfile + podman installation in a separate PR? It can be merged right away and will reduce the scope of this PR.

Could you split out the Dockerfile + podman installation in a separate PR? It can be merged right away and will reduce the scope of this PR.
famfo force-pushed gts-testing from c71e61e2b8
Some checks failed
/ build (pull_request) Successful in 1m39s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ federation (pull_request) Successful in 1m36s
/ upgrade and storage (pull_request) Failing after 1m33s
/ packages (pull_request) Successful in 1m50s
/ actions (pull_request) Successful in 29m56s
to a4a0c5f49a
Some checks failed
/ build (pull_request) Successful in 2m48s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ federation (pull_request) Failing after 3m23s
/ upgrade and storage (pull_request) Failing after 3m19s
/ packages (pull_request) Successful in 4m0s
/ actions (pull_request) Successful in 34m24s
2025-06-07 10:38:18 +00:00
Compare
Author
Member

Split off docker and logger updates, not sure if the logger update is maybe a bit too ambitious for older versions :)

Edit: logger update tests pass, all good :D

Split off docker and logger updates, not sure if the logger update is maybe a bit too ambitious for older versions :) Edit: logger update tests pass, all good :D
Author
Member

2025/06/07 10:44:32 error executing command: error creating dbConn: db migration error: sqlite3: SQL logic error: duplicate column name: edits (code=1 extended=1)

GoToSocial currently seems to have a broken main. I'd potentially hold this PR until gts has a new tagged release as well.

> `2025/06/07 10:44:32 error executing command: error creating dbConn: db migration error: sqlite3: SQL logic error: duplicate column name: edits (code=1 extended=1)` GoToSocial currently seems to have a broken `main`. I'd potentially hold this PR until gts has a new tagged release as well.
@ -81,3 +89,2 @@
for scenario in star; do
run federation_verify_scenario $scenario
if [[ -z "${setup[$version[1]]}" ]]; then
Contributor

Please remove the if: all versions are different now so it won't make a difference. If there is a need to optimize later on, it can be done when that problem shows.

Please remove the if: all versions are different now so it won't make a difference. If there is a need to optimize later on, it can be done when that problem shows.
earl-warren marked this conversation as resolved
famfo force-pushed gts-testing from a4a0c5f49a
Some checks failed
/ build (pull_request) Successful in 2m48s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ federation (pull_request) Failing after 3m23s
/ upgrade and storage (pull_request) Failing after 3m19s
/ packages (pull_request) Successful in 4m0s
/ actions (pull_request) Successful in 34m24s
to 1672db8d30
Some checks failed
/ build (pull_request) Successful in 1m38s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Failing after 1m35s
/ federation (pull_request) Successful in 1m51s
/ packages (pull_request) Successful in 2m22s
/ actions (pull_request) Successful in 30m9s
2025-06-08 13:04:26 +00:00
Compare
Contributor

The upgrade test failure is related

https://code.forgejo.org/forgejo/end-to-end/actions/runs/3179/jobs/6#jobstep-3-1137

it needs fixing in the migration of the corresponding PR.

The upgrade test failure is related https://code.forgejo.org/forgejo/end-to-end/actions/runs/3179/jobs/6#jobstep-3-1137 it needs fixing in the migration of the corresponding PR.
Contributor

You did not implement a test for unfollowing a user. Is it because it is not implemented yet in the Forgejo pull request or because you did not get to it yet?

You did not implement a test for unfollowing a user. Is it because it is [not implemented](https://codeberg.org/forgejo/forgejo/pulls/4767/files#issuecomment-5055807) yet in the Forgejo pull request or because you did not get to it yet?
Author
Member

gts -> forgejo unfollowing should work, the other way around is still missing an API endpoint iirc. I'll ad that to the tests

gts -> forgejo unfollowing should work, the other way around is still missing an API endpoint iirc. I'll ad that to the tests
famfo force-pushed gts-testing from 1672db8d30
Some checks failed
/ build (pull_request) Successful in 1m38s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Failing after 1m35s
/ federation (pull_request) Successful in 1m51s
/ packages (pull_request) Successful in 2m22s
/ actions (pull_request) Successful in 30m9s
to d982518ac6
Some checks failed
/ build (pull_request) Successful in 1m43s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Failing after 1m46s
/ packages (pull_request) Successful in 2m5s
/ actions (pull_request) Successful in 30m0s
/ federation (pull_request) Successful in 3m29s
2025-06-09 14:03:06 +00:00
Compare
Contributor

Well, this test is good for symmetry but (unless I'm mistaken) it does not imply any action Forgejo side, it is merely GtS side updates. Is that correct?

Well, this test is good for symmetry but (unless I'm mistaken) it does not imply any action Forgejo side, it is merely GtS side updates. Is that correct?
Contributor

Side question: have you tried following Forgejo from Mastodon or just from GtS? If you did, do you remember why it did not work?

Side question: have you tried following Forgejo from Mastodon or just from GtS? If you did, do you remember why it did not work?
Author
Member

So far, I have only tested with gotosocial because that has been the easiest to test with and hack on. I'd like to try Mastodon or other software eg. Akkoma as well in the future.

Well, this test is good for symmetry but (unless I'm mistaken) it does not imply any action Forgejo side, it is merely GtS side updates. Is that correct?

There should be action on the forgejo side https://codeberg.org/forgejo/forgejo/pulls/4767/files#diff-4dd164c79af275bd2ae3e3a011cf1758fb597d06

I just didn't look at it in the new testcase 😅

So far, I have only tested with gotosocial because that has been the easiest to test with and hack on. I'd like to try Mastodon or other software eg. Akkoma as well in the future. > Well, this test is good for symmetry but (unless I'm mistaken) it does not imply any action Forgejo side, it is merely GtS side updates. Is that correct? There should be action on the forgejo side <https://codeberg.org/forgejo/forgejo/pulls/4767/files#diff-4dd164c79af275bd2ae3e3a011cf1758fb597d06> I just didn't look at it in the new testcase 😅
Author
Member

Both the followers and the following forgejo API endpoints do not seem to list federated follows so they can't be used for verification yet

Both the `followers` and the `following` forgejo API endpoints do not seem to list federated follows so they can't be used for verification yet
Contributor

It is fine that those are not implemented yet. There however is a need to assert the side effect is happening. 🤔 @jerger do you have a suggestion?

What about this

  • GtS follow user U
  • do action A1 as user U
  • GtS unfollow user U
  • do action A2 as user U
  • GtS follow user U
  • do action A3 as user U

Get all status from GtS and find only A1 and A3. This is very high level but would show that unfollow worked because of the missing note that reflects something that happened while the user was not followed.

It is fine that those are not implemented yet. There however is a need to assert the side effect is happening. 🤔 @jerger do you have a suggestion? What about this - GtS follow user U - do action A1 as user U - GtS unfollow user U - do action A2 as user U - GtS follow user U - do action A3 as user U Get all status from GtS and find only A1 and A3. This is very high level but would show that unfollow worked because of the missing note that reflects something that happened while the user was not followed.
Contributor

Note: it is possible that what I propose won't work because that's not how activitypub works....

Note: it is possible that what I propose won't work because that's not how activitypub works....
Author
Member

Only A1 and A3 should be explicitly found in the inbox of U. I can try to test with this a bit later today :)

Only A1 and A3 should be explicitly found in the inbox of U. I can try to test with this a bit later today :)
Contributor

That's good news. It will also verify that re-following the same user works, which confirms unfollowing does not leave leftovers behind.

That's good news. It will also verify that re-following the same user works, which confirms unfollowing does not leave leftovers behind.
Author
Member

Hm, a thought I have on the potential test scenario of following unfollowing and following again: if backfill of posts would be implemented this isn't a reliable test case anymore

I'll try to think about this a bit more

Hm, a thought I have on the potential test scenario of following unfollowing and following again: if backfill of posts would be implemented this isn't a reliable test case anymore I'll try to think about this a bit more
Contributor

This is a problem for the future though and I would not mind something that works now. In the future tests will also be able to rely on the list of followers / followings which are not available at the moment so it won't be an issue.

It would really be great to get in a state where this feature can be documented to be available for everyone to use and it seems there is very little required to make that happen in the following days.

This is a problem for the future though and I would not mind something that works now. In the future tests will also be able to rely on the list of followers / followings which are not available at the moment so it won't be an issue. It would really be great to get in a state where this feature can be documented to be available for everyone to use and it seems there is very little required to make that happen in the following days.
Contributor
Restarted [the federation test only](https://code.forgejo.org/forgejo/end-to-end/actions/runs/3191/jobs/3) so that it runs out of the [latest commit from the associated pull request](https://codeberg.org/forgejo/forgejo/pulls/8078).
Contributor

Will you have time to add the unfollowing test? It would help a lot with the final review of the pull request, to confirm it does what it should 🙏

Will you have time to add the unfollowing test? It would help a lot with the final review of the pull request, to confirm it does what it should 🙏
Author
Member

Been a bit busy the last few days, I'll try to get something together this evening hopefully :)

Been a bit busy the last few days, I'll try to get something together this evening hopefully :)
Contributor

That would be great ❤️

That would be great ❤️
famfo force-pushed gts-testing from d982518ac6
Some checks failed
/ build (pull_request) Successful in 1m43s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Failing after 1m46s
/ packages (pull_request) Successful in 2m5s
/ actions (pull_request) Successful in 30m0s
/ federation (pull_request) Successful in 3m29s
to 7ecb188d47
All checks were successful
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ build (pull_request) Successful in 1m55s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ federation (pull_request) Successful in 2m11s
/ packages (pull_request) Successful in 2m20s
/ upgrade and storage (pull_request) Successful in 4m7s
/ actions (pull_request) Successful in 32m56s
2025-06-16 17:29:17 +00:00
Compare
Author
Member

Added the test case and updated the CI output match

Added the test case and updated the CI output match
Contributor
Excellent. ping @jerger [the upgrade failure](https://code.forgejo.org/forgejo/end-to-end/actions/runs/3226/jobs/6#jobstep-5-1531) at https://codeberg.org/forgejo/forgejo/pulls/4767#issuecomment-5416143.
Contributor

Could you please give it a spin to figure out if it still works given the changes in the past three weeks?

Could you please give it a spin to figure out if it still works given the changes in the past three weeks?
famfo force-pushed gts-testing from 7ecb188d47
All checks were successful
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ build (pull_request) Successful in 1m55s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ federation (pull_request) Successful in 2m11s
/ packages (pull_request) Successful in 2m20s
/ upgrade and storage (pull_request) Successful in 4m7s
/ actions (pull_request) Successful in 32m56s
to 25d7ae405f
Some checks failed
/ build (pull_request) Successful in 1m26s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ packages (pull_request) Successful in 1m50s
/ upgrade and storage (pull_request) Successful in 3m45s
/ actions (pull_request) Successful in 35m47s
/ federation (pull_request) Failing after 3m10s
2025-07-11 10:19:47 +00:00
Compare
Author
Member

Rebased and had to remove the --quiet from grep, not sure why curl did not like it.

Anyways, the tests still pass against the latest changes on the PR (the CI should also run again now :>)

Rebased and had to remove the `--quiet` from grep, not sure why curl did not like it. Anyways, the tests still pass against the latest changes on the PR (the CI should also run again now :>)
Author
Member

Hm the CI did fail, I'll do some more debugging on this later

Hm the CI did fail, I'll do some more debugging on this later
Author
Member

Later turned into 5 days, something is either up with the CI or inconsistent at best. The test consistently passes locally but forgejo and gotosocial fail to properly communicate inside the CI

Later turned into 5 days, something is either up with the CI or inconsistent at best. The test consistently passes locally but forgejo and gotosocial fail to properly communicate inside the CI
famfo force-pushed gts-testing from 25d7ae405f
Some checks failed
/ build (pull_request) Successful in 1m26s
/ actions-docs (map[branch:next forgejo:https://codeberg.org owner:forgejo-experimental version:11.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org owner:forgejo version:10.0]) (pull_request) Has been skipped
/ packages (pull_request) Successful in 1m50s
/ upgrade and storage (pull_request) Successful in 3m45s
/ actions (pull_request) Successful in 35m47s
/ federation (pull_request) Failing after 3m10s
to 40a26b4596
Some checks failed
/ packages (pull_request) Has been cancelled
/ federation (pull_request) Has been cancelled
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been cancelled
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been cancelled
/ upgrade and storage (pull_request) Has been cancelled
/ build (pull_request) Has been cancelled
/ actions (pull_request) Has been cancelled
2025-07-26 14:52:46 +00:00
Compare
famfo force-pushed gts-testing from 40a26b4596
Some checks failed
/ packages (pull_request) Has been cancelled
/ federation (pull_request) Has been cancelled
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been cancelled
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been cancelled
/ upgrade and storage (pull_request) Has been cancelled
/ build (pull_request) Has been cancelled
/ actions (pull_request) Has been cancelled
to 793eef2845
Some checks failed
/ packages (pull_request) Has been cancelled
/ federation (pull_request) Has been cancelled
/ actions (pull_request) Has been cancelled
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been cancelled
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been cancelled
/ upgrade and storage (pull_request) Has been cancelled
/ build (pull_request) Has been cancelled
2025-07-26 14:54:15 +00:00
Compare
Author
Member

Moved the build from source to 13.0 and set the minimum for the scenario to run to 13.0 as well

Moved the build from source to 13.0 and set the minimum for the scenario to run to 13.0 as well
famfo force-pushed gts-testing from 793eef2845
Some checks failed
/ packages (pull_request) Has been cancelled
/ federation (pull_request) Has been cancelled
/ actions (pull_request) Has been cancelled
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been cancelled
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been cancelled
/ upgrade and storage (pull_request) Has been cancelled
/ build (pull_request) Has been cancelled
to a8feea96e3
Some checks failed
/ build (pull_request) Successful in 2m26s
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Has been cancelled
/ packages (pull_request) Has been cancelled
/ actions (pull_request) Has been cancelled
/ federation (pull_request) Has been cancelled
2025-07-26 16:09:59 +00:00
Compare
famfo force-pushed gts-testing from a8feea96e3
Some checks failed
/ build (pull_request) Successful in 2m26s
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been skipped
/ upgrade and storage (pull_request) Has been cancelled
/ packages (pull_request) Has been cancelled
/ actions (pull_request) Has been cancelled
/ federation (pull_request) Has been cancelled
to 48b12a0ff8
Some checks failed
/ build (pull_request) Successful in 1m28s
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been skipped
/ packages (pull_request) Successful in 1m43s
/ federation (pull_request) Failing after 3m0s
/ upgrade and storage (pull_request) Successful in 3m48s
/ actions (pull_request) Successful in 34m39s
2025-07-26 16:10:14 +00:00
Compare
famfo force-pushed gts-testing from 48b12a0ff8
Some checks failed
/ build (pull_request) Successful in 1m28s
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been skipped
/ packages (pull_request) Successful in 1m43s
/ federation (pull_request) Failing after 3m0s
/ upgrade and storage (pull_request) Successful in 3m48s
/ actions (pull_request) Successful in 34m39s
to 1c3ee9eb1b
All checks were successful
/ build (pull_request) Successful in 1m24s
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been skipped
/ packages (pull_request) Successful in 1m45s
/ federation (pull_request) Successful in 1m55s
/ upgrade and storage (pull_request) Successful in 3m40s
/ actions (pull_request) Successful in 33m45s
2025-07-29 11:53:16 +00:00
Compare
Author
Member

Removed the --quiet from grep and curl can write it's output again. I'm slightly confused.

For better log readability I can maybe just redirect the grep output to /dev/null again.

Removed the `--quiet` from grep and curl can write it's output again. I'm slightly confused. For better log readability I can maybe just redirect the grep output to /dev/null again.
Author
Member

Ah, the output is not shown in the log anyways. Good enough then :D

Ah, the output is not shown in the log anyways. Good enough then :D
famfo force-pushed gts-testing from 1c3ee9eb1b
All checks were successful
/ build (pull_request) Successful in 1m24s
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been skipped
/ packages (pull_request) Successful in 1m45s
/ federation (pull_request) Successful in 1m55s
/ upgrade and storage (pull_request) Successful in 3m40s
/ actions (pull_request) Successful in 33m45s
to 643004fdc0
All checks were successful
/ build (pull_request) Successful in 1m29s
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been skipped
/ packages (pull_request) Successful in 1m44s
/ federation (pull_request) Successful in 1m58s
/ upgrade and storage (pull_request) Successful in 3m36s
/ actions (pull_request) Successful in 35m47s
2025-08-08 10:56:21 +00:00
Compare
Author
Member

There has been a new gotosocial release which includes my changes for testing, I'll rebase onto it in a few days when I have time to hack on forgejo again.

There has been a new gotosocial release which includes my changes for testing, I'll rebase onto it in a few days when I have time to hack on forgejo again.
famfo force-pushed gts-testing from 643004fdc0
All checks were successful
/ build (pull_request) Successful in 1m29s
/ actions-docs (map[branch:next forgejo:https://codeberg.org name:latest owner:forgejo-experimental version:12.0]) (pull_request) Has been skipped
/ actions-docs (map[forgejo:https://codeberg.org name:previous owner:forgejo version:11.0]) (pull_request) Has been skipped
/ packages (pull_request) Successful in 1m44s
/ federation (pull_request) Successful in 1m58s
/ upgrade and storage (pull_request) Successful in 3m36s
/ actions (pull_request) Successful in 35m47s
to 57649677d4
Some checks failed
/ build (pull_request) Successful in 1m40s
/ packages (pull_request) Successful in 2m28s
/ federation (pull_request) Failing after 2m59s
/ upgrade and storage (pull_request) Successful in 4m34s
/ actions (pull_request) Successful in 36m2s
2025-10-14 10:14:43 +00:00
Compare
Author
Member

Finally updated gts to latest, aka 0.20 which has been released now :)

Finally updated gts to `latest`, aka 0.20 which has been released now :)
Contributor

@famfo I canceled & re-ran the CI (reboot of the instance)

@famfo I canceled & re-ran the CI (reboot of the instance)
Author
Member

The UI is no longer wonkey :D

Hm not sure why the tests failed, I'll look at it in the next few days

The UI is no longer wonkey :D Hm not sure why the tests failed, I'll look at it in the next few days
Author
Member

federation_verify_scenario.out:/home/debian/.cache/act/317c2e7f18c7794f/hostexecutor/federation/scenario-gotosocial/run.sh:164: : /tmp/forgejo-end-to-end/forgejo-ONE/forgejo-curl.sh api_json --data '{"target":"http://localhost:8080/users/test"}' 10.48.21.97:3001/api/v1/user/activitypub/follow
federation_verify_scenario.out:curl: (22) The requested URL returned error: 404

Oh no, what the hell

> federation_verify_scenario.out:/home/debian/.cache/act/317c2e7f18c7794f/hostexecutor/federation/scenario-gotosocial/run.sh:164: : /tmp/forgejo-end-to-end/forgejo-ONE/forgejo-curl.sh api_json --data '{"target":"http://localhost:8080/users/test"}' 10.48.21.97:3001/api/v1/user/activitypub/follow > federation_verify_scenario.out:curl: (22) The requested URL returned error: 404 Oh no, what the hell
Author
Member

I will close this as all changes picked from here have been merged in some form.

I will close this as all changes picked from here have been merged in some form.
famfo closed this pull request 2026-01-05 18:02:59 +00:00
Some checks failed
/ build (pull_request) Successful in 1m40s
Required
Details
/ packages (pull_request) Successful in 2m28s
Required
Details
/ federation (pull_request) Failing after 2m59s
/ upgrade and storage (pull_request) Successful in 4m34s
Required
Details
/ actions (pull_request) Successful in 36m2s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
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
forgejo/end-to-end!664
No description provided.