Repository navigation
fix: require authentication for log downloads - #232
Open
Jozsef Damokos (jozsefdamokos) wants to merge 3 commits into
Open
Jozsef Damokos (jozsefdamokos) wants to merge 3 commits into
Jozsef Damokos (jozsefdamokos) wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #232 +/- ##
=========================================
Coverage 65.36% 65.36%
Complexity 4786 4786
=========================================
Files 654 654
Lines 21758 21758
=========================================
Hits 14222 14222
Misses 7536 7536 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Jozsef Damokos (jozsefdamokos)
requested review from
a team,
Dennis Garding (DennisGarding),
Pierre02,
Juri Himmelreich (jc-sw-git) and
Nikolas Evers (vintagesucks)
October 8, 2026 15:47
Jozsef Damokos (jozsefdamokos)
marked this pull request as ready for review
October 8, 2026 15:52
Nikolas Evers (vintagesucks)
approved these changes
Oct 9, 2026
| }); | ||
| async onContextDownloadLogFile(runId: string): Promise<void> { | ||
| try { | ||
| const blob = await this.migrationApiService.downloadLogsOfRun(runId); |
There was a problem hiding this comment.
Downloading the logs of a run with 50k log entries fails for me after 30 s with "Failed downloading log file.", while the server was still streaming the file. Could the admin client's 30 s timeout cause this? The form post had no client-side limit, core sets it here:
Until that error appeared, nothing showed that the download was in progress.
Seed for a run with 50k log entries
SET @conn = UNHEX('0199c8a0000070008000000000000001');
SET @run = UNHEX('0199c8a0000070008000000000000002');
DELETE FROM swag_migration_logging WHERE run_id = @run;
DELETE FROM swag_migration_run WHERE id = @run;
DELETE FROM swag_migration_connection WHERE id = @conn;
INSERT INTO swag_migration_connection (id, name, profile_name, gateway_name, created_at)
VALUES (@conn, 'Log download repro', 'shopware55', 'local', NOW(3));
INSERT INTO swag_migration_run (id, connection_id, environment_information, step, created_at)
VALUES (@run, @conn, '{"sourceSystemName":"Shopware","sourceSystemVersion":"5.7.18"}', 'finished', NOW(3));
INSERT INTO swag_migration_logging (id, level, code, run_id, created_at, profile_name, gateway_name, user_fixable, entity_name, source_data)
SELECT UNHEX(REPLACE(UUID(), '-', '')), 'error', 'SWAG_MIGRATION__LOG_DOWNLOAD_REPRO', @run, NOW(3), 'shopware55', 'local', 0, 'customer',
JSON_OBJECT(
'column_1', 'some source value', 'column_2', 'some source value', 'column_3', 'some source value', 'column_4', 'some source value',
'column_5', 'some source value', 'column_6', 'some source value', 'column_7', 'some source value', 'column_8', 'some source value',
'column_9', 'some source value', 'column_10', 'some source value', 'column_11', 'some source value', 'column_12', 'some source value',
'column_13', 'some source value', 'column_14', 'some source value', 'column_15', 'some source value', 'column_16', 'some source value',
'column_17', 'some source value', 'column_18', 'some source value', 'column_19', 'some source value', 'column_20', 'some source value'
)
FROM (SELECT 0 d UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4) a
CROSS JOIN (SELECT 0 d UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) b
CROSS JOIN (SELECT 0 d UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) c
CROSS JOIN (SELECT 0 d UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) e
CROSS JOIN (SELECT 0 d UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) f;| return new JsonResponse([ | ||
| 'total' => \count($cleanResult), | ||
| 'items' => $cleanResult, | ||
| 'downloadUrl' => $this->generateUrl( |
There was a problem hiding this comment.
Do we still need this?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes: https://github.com/shopware/shopware-private/issues/458