Skip to content

Activitylog event handler split - #3241

Open
butonic wants to merge 11 commits into
mainfrom
activitylog-event-handler-split
Open

Activitylog event handler split#3241
butonic wants to merge 11 commits into
mainfrom
activitylog-event-handler-split

Conversation

@butonic

@butonic butonic commented Aug 4, 2026

Copy link
Copy Markdown
Member

As part of #1312 we can now disable the event handler or http handler part of the activitylog service.

Unfortunately, the code was very intertwined. The http handler was started as a go routine of the event handler. Cleaning that up took quite a bit of work.

@butonic butonic self-assigned this Aug 4, 2026
@butonic butonic added Type:Bug Type:Maintenance E.g. technical debt, packaging, etc. labels Aug 4, 2026
@github-project-automation github-project-automation Bot moved this to Qualification in OpenCloud Team Board Aug 4, 2026
@butonic butonic moved this from Qualification to In Progress in OpenCloud Team Board Aug 4, 2026
@codacy-production

codacy-production Bot commented Aug 4, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 344 complexity · -65 duplication

Metric Results
Complexity 344
Duplication -65

View in Codacy

🟢 Coverage 27.37% diff coverage · -0.10% coverage variation

Metric Results
Coverage variation -0.10% coverage variation (-1.00%)
Diff coverage 27.37% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6f5f993) 84041 19349 23.02%
Head commit (b2fb6b8) 84180 (+139) 19298 (-51) 22.92% (-0.10%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3241) 771 211 27.37%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@butonic
butonic marked this pull request as draft August 4, 2026 17:37
@butonic
butonic force-pushed the activitylog-event-handler-split branch from 500cccc to f3dfc80 Compare August 5, 2026 15:04
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic
butonic force-pushed the activitylog-event-handler-split branch from f3dfc80 to 6cc2dc2 Compare August 13, 2026 07:04
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic
butonic force-pushed the activitylog-event-handler-split branch from 6cc2dc2 to ee31636 Compare August 13, 2026 07:30
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic

butonic commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

@v-scharf There sems to be a race condition with authentication: https://ci.opencloud.rocks/repos/3/pipeline/1441/166

  Scenario Outline: user tries to generate GDPR report of other users                                              # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/apiGraph/userGDPRExport.feature:497
    Given user "Brian" has been created with default attributes                                                    # FeatureContext::userHasBeenCreatedWithDefaultAttributes()
    And the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API                  # GraphContext::theAdministratorHasGivenTheRoleUsingTheGraphApi()
    And the administrator has assigned the role "<new-user-role>" to user "Brian" using the Graph API              # GraphContext::theAdministratorHasGivenTheRoleUsingTheGraphApi()
    When user "Alice" tries to export GDPR report of user "Brian" to "/.personal_data_export.json" using Graph API # GraphContext::userTriesToExportGdprReportOfAnotherUserUsingGraphApi()
    Then the HTTP status code should be "400"                                                                      # FeatureContext::thenTheHTTPStatusCodeShouldBe()

    Examples:
      | user-role   | new-user-role |
      | Space Admin | Space Admin   |
      | Space Admin | User          |
      | Space Admin | User Light    |
      | Space Admin | Admin         |
      | User        | Space Admin   |
        Failed step: Given user "Alice" has been created with default attributes
        cURL error 18: SSL certificate OpenSSL verify result: self-signed certificate (18) (see https://curl.se/libcurl/c/libcurl-errors.html) for https://opencloud-server:9200/konnect/v1/token (GuzzleHttp\Exception\RequestException)
      | User        | User          |
      | User        | User Light    |
      | User        | Admin         |
      | User Light  | Space Admin   |
      | User Light  | User          |
      | User Light  | User Light    |
      | User Light  | Admin         |
      | Admin       | Space Admin   |
      | Admin       | User          |
      | Admin       | User Light    |
      | Admin       | Admin         |

@butonic
butonic marked this pull request as ready for review August 14, 2026 11:03
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic

butonic commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

@aduffeck @rhafer I stopped myself from also switching to pull based streams with manual ack in this PR, which is where all the commits come from. I will try to add test cases for the http and event servies that now wrap the activitylog service which implements the 'business logic' of this service.

@butonic
butonic requested review from aduffeck and rhafer August 14, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type:Bug Type:Maintenance E.g. technical debt, packaging, etc.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant