Activitylog event handler split - #3241
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 445 |
🟢 Coverage 37.18% diff coverage
Metric Results Coverage variation Report missing for 81536bb1 Diff coverage ✅ 37.18% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (81536bb) Report Missing Report Missing Report Missing Head commit (cfefb83) 88465 20903 23.63% 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) 772 287 37.18% 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%1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.
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.
500cccc to
f3dfc80
Compare
6cc2dc2 to
ee31636
Compare
|
@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 | |
48f3116 to
6d37cc9
Compare
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>
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>
a3fa4f4 to
cfefb83
Compare
|
@butonic overall looks good, just a small thing, in previous merged PRs we introduced a validation to prevent a case when all service components are disabled, I believe it will be good to use it in this PR as well to keep things consistent |
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.