stable
Clone or download
Tracker administrators can now upload a module. This contribution only focus on the upload, administrators cannot know if there is already an existing module yet. To test, go to a tracker ยป admin ยป workflow ยป custom code execution Upload a WASM module. There is a test module in the source of the plugin: ``` cd plugins/tracker_cce/wasm_modules/post-action-add-comment nix-shell cargo build --target wasm32-wasi --release ``` Then you can upload the generated file: `plugins/tracker_cce/wasm_modules/post-action-add-comment/target/wasm32-wasi/release/post-action-add-comment.wasm` Now update an artifact of this tracker, you should see logs in `/var/log/tuleap/worker_log` if you have redis and workers. The uploaded file is moved in /var/lib/tuleap/tracker_cce/<id>/post-action.wasm. Delete this file and now upload a non WASM module (a png image for example). The upload succeeds and updating the artifact will generate errors in worker_log. If you try to upload a too big file, then an error message is displayed. If you submit the form without choosing a file, then an error message is displayed (we might need to add `required` attribute to prevent form submission, but I prefer to wait for mockup to know what to do). Part of story #35093: execute custom code as artifact post action Change-Id: I992c36b97299a0a61b24bcff7c502ae00f3c4b1c
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/tracker_cce/include/TrackerCCE/Administration/ActiveTrackerRetrieverMiddleware.php | +53 | โ0 | Go to diff View file |
M | plugins/tracker_cce/include/TrackerCCE/Administration/AdministrationController.php | +14 | โ1 | Go to diff View file |
A | plugins/tracker_cce/include/TrackerCCE/Administration/AdministrationPresenter.php | +34 | โ0 | Go to diff View file |
A | plugins/tracker_cce/include/TrackerCCE/Administration/CheckTrackerCSRFMiddleware.php | +47 | โ0 | Go to diff View file |
A | plugins/tracker_cce/include/TrackerCCE/Administration/RejectNonTrackerAdministratorMiddleware.php | +54 | โ0 | Go to diff View file |
A | plugins/tracker_cce/include/TrackerCCE/Administration/TrackerCSRFTokenProvider.php | +28 | โ0 | Go to diff View file |
A | plugins/tracker_cce/include/TrackerCCE/Administration/UpdateModuleCSRFTokenProvider.php | +33 | โ0 | Go to diff View file |
A | plugins/tracker_cce/include/TrackerCCE/Administration/UpdateModuleController.php | +151 | โ0 | Go to diff View file |
M | plugins/tracker_cce/include/TrackerCCE/Administration/administration.mustache | +17 | โ3 | Go to diff View file |
M | plugins/tracker_cce/include/tracker_ccePlugin.php | +32 | โ6 | Go to diff View file |
M | plugins/tracker_cce/site-content/fr_FR/LC_MESSAGES/tuleap-tracker_cce.po | +33 | โ0 | Go to diff View file |
M | plugins/tracker_cce/site-content/pt_BR/LC_MESSAGES/tuleap-tracker_cce.po | +33 | โ0 | Go to diff View file |
A | plugins/tracker_cce/tests/unit/TrackerCCE/Administration/ActiveTrackerRetrieverMiddlewareTest.php | +92 | โ0 | Go to diff View file |
M | plugins/tracker_cce/tests/unit/TrackerCCE/Administration/AdministrationControllerTest.php | +3 | โ0 | Go to diff View file |
A | plugins/tracker_cce/tests/unit/TrackerCCE/Administration/CheckTrackerCSRFMiddlewareTest.php | +55 | โ0 | Go to diff View file |
A | plugins/tracker_cce/tests/unit/TrackerCCE/Administration/RejectNonTrackerAdministratorMiddlewareTest.php | +97 | โ0 | Go to diff View file |
A | plugins/tracker_cce/tests/unit/TrackerCCE/Administration/UpdateModuleControllerTest.php | +198 | โ0 | Go to diff View file |
A | plugins/tracker_cce/tests/unit/TrackerCCE/Stubs/Administration/TrackerCSRFTokenProviderStub.php | +43 | โ0 | Go to diff View file |
A | plugins/tracker_cce/tests/unit/TrackerCCE/Stubs/Administration/UploadedFileStub.php | +88 | โ0 | Go to diff View file |