kaxil opened a new pull request, #73054:
URL: https://github.com/apache/airflow/pull/73054

   `airflow info --file-io` uploaded the info report to file.io and printed a 
shareable link. It can no longer succeed, and when it fails it crashes instead 
of reporting the failure.
   
   **file.io stopped accepting anonymous uploads.** `POST https://file.io` 
returns a Cloudflare `301` to `https://www.file.io/`, which is a static site 
answering only `GET`/`HEAD`/`OPTIONS`, and the `POST` gets a `405`. That holds 
for the exact request file.io's own [developer 
docs](https://www.file.io/developers) still document (`multipart/form-data` 
with a `file` field), so that page describes an endpoint that is no longer 
wired up. The site's own uploader has moved to LimeWire: `www.file.io` loads 
`js/lw_upload.js`, which pulls 
`limewire.com/file-sharing-lib/file-sharing-lib.es.js`, posts to 
`api.limewire.com`, and sends users to `limewire.com/auth` for an account. 
Airflow posts anonymously with no credentials, so no request it can make will 
succeed.
   
   **The failure was also unhandled.** The error body is HTML, so `resp.json()` 
in the failure branch raised `json.JSONDecodeError` before reaching the 
intended `raise FileIoException(...)` on the next line. `tenacity` retried only 
`FileIoException` and `_send_report_to_fileio` caught only that, so the command 
ended in a traceback rather than the intended `Failed to send report to file.io 
service.` message.
   
   ## Design rationale
   
   **Why remove rather than deprecate**, which is what the issue thread 
proposed. A deprecation cycle buys users time to migrate off working behaviour 
onto something else. There is no working behaviour here and nothing to migrate 
to, so the cycle would only mean a release where the flag warns that it is 
deprecated and then crashes anyway. The CLI is also explicitly outside the 
compatibility promise that would otherwise require the cycle: 
`public-airflow-interface.rst` says the CLI may change "in details (such as 
output format and available flags)" and points programmatic users at the REST 
API.
   
   **Nothing replaces it.** Pointing the flag at another anonymous upload host 
reproduces exactly what broke: core would depend on a third-party pastebin that 
can disappear without notice. That it died silently, with the breakage 
surfacing only now, is the argument against having had the dependency at all.
   
   This also removes `render_text`, which existed only to produce the uploaded 
report body, along with the `httpx` and `tenacity` imports that 
`info_command.py` used only for the upload.
   
   ## Migration
   
   `airflow info --file-io` now exits with `unrecognized arguments: --file-io`. 
Redirect the report and share it yourself:
   
   ```console
   $ airflow info --anonymize > airflow-info.txt
   ```
   
   `--anonymize` is unchanged, but note it was applied *implicitly* by 
`--file-io`, so pass it explicitly when sharing a report.
   
   Closes #73045
   


-- 
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]

Reply via email to