rusackas commented on code in PR #40860:
URL: https://github.com/apache/superset/pull/40860#discussion_r3376484905


##########
superset/databases/api.py:
##########
@@ -1726,6 +1726,7 @@ def upload_metadata(self) -> Response:
             parameters = UploadFileMetadataPostSchema().load(request_form)
         except ValidationError as error:
             return self.response_400(message=error.messages)
+        UploadCommand.validate_file_size(parameters["file"])

Review Comment:
   This is already handled correctly. `DatabaseUploadFileTooLarge` carries 
`status = 413`, and Superset has an app-level 
`@app.errorhandler(CommandException)` (in `superset/views/error_handling.py`) 
that returns `json_error_response(..., status=ex.status)` — so the JSON API 
response is HTTP 413, not 500. The `upload` endpoint relies on this same 
mechanism (it does not catch `DatabaseUploadFileTooLarge` either), so adding a 
manual try/except here would be inconsistent with the rest of the file. No 
change needed.



##########
superset/translations/pl/LC_MESSAGES/messages.po:
##########
@@ -4797,6 +4797,9 @@ msgstr "Ustawienia bazy danych zaktualizowane"
 msgid "Database type does not support file uploads."
 msgstr "Typ bazy danych nie obsługuje przesyłania plików."
 
+msgid "Database upload file exceeds the maximum allowed size."
+msgstr ""

Review Comment:
   This is expected and correct for Superset's i18n workflow. PRs add new 
user-facing strings with `_()` and regenerate the `.po` catalogs, which 
intentionally land with empty `msgstr ""`. Translations are supplied separately 
by the translator community (via Crowdin), not hand-written in the source PR — 
committing a machine-generated translation here would bypass that review 
process. Leaving `msgstr ""` is the standard, intended state for a new string.



##########
superset/translations/ru/LC_MESSAGES/messages.po:
##########
@@ -4553,6 +4553,9 @@ msgstr "Настройки базы данных обновлены"
 msgid "Database type does not support file uploads."
 msgstr "База данных не поддерживает загрузку файлов"
 
+msgid "Database upload file exceeds the maximum allowed size."
+msgstr ""

Review Comment:
   This is expected and correct for Superset's i18n workflow. PRs add new 
user-facing strings with `_()` and regenerate the `.po` catalogs, which 
intentionally land with empty `msgstr ""`. Translations are supplied separately 
by the translator community (via Crowdin), not hand-written in the source PR — 
committing a machine-generated translation here would bypass that review 
process. Leaving `msgstr ""` is the standard, intended state for a new string.



##########
superset/translations/ca/LC_MESSAGES/messages.po:
##########
@@ -4655,6 +4655,9 @@ msgstr "Configuració de base de dades actualitzada"
 msgid "Database type does not support file uploads."
 msgstr "El tipus de base de dades no suporta pujades de fitxers."
 
+msgid "Database upload file exceeds the maximum allowed size."
+msgstr ""

Review Comment:
   This is expected and correct for Superset's i18n workflow. PRs add new 
user-facing strings with `_()` and regenerate the `.po` catalogs, which 
intentionally land with empty `msgstr ""`. Translations are supplied separately 
by the translator community (via Crowdin), not hand-written in the source PR — 
committing a machine-generated translation here would bypass that review 
process. Leaving `msgstr ""` is the standard, intended state for a new string.



##########
superset/translations/ko/LC_MESSAGES/messages.po:
##########
@@ -4542,6 +4542,9 @@ msgstr "데이터베이스를 업데이트할 수 없습니다."
 msgid "Database type does not support file uploads."
 msgstr ""
 
+msgid "Database upload file exceeds the maximum allowed size."
+msgstr ""

Review Comment:
   This is expected and correct for Superset's i18n workflow. PRs add new 
user-facing strings with `_()` and regenerate the `.po` catalogs, which 
intentionally land with empty `msgstr ""`. Translations are supplied separately 
by the translator community (via Crowdin), not hand-written in the source PR — 
committing a machine-generated translation here would bypass that review 
process. Leaving `msgstr ""` is the standard, intended state for a new string.



##########
superset/translations/fi/LC_MESSAGES/messages.po:
##########
@@ -8152,6 +8152,9 @@ msgstr "Tietokannan asetukset päivitetty"
 msgid "Database type does not support file uploads."
 msgstr "Tietokantityyppi ei tue tiedostojen lataamista."
 
+msgid "Database upload file exceeds the maximum allowed size."
+msgstr ""

Review Comment:
   This is expected and correct for Superset's i18n workflow. PRs add new 
user-facing strings with `_()` and regenerate the `.po` catalogs, which 
intentionally land with empty `msgstr ""`. Translations are supplied separately 
by the translator community (via Crowdin), not hand-written in the source PR — 
committing a machine-generated translation here would bypass that review 
process. Leaving `msgstr ""` is the standard, intended state for a new string.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to