Skip to content

Fix OpenAPI schema for get_log API #50547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jason810496
Copy link
Member

related: #50333, #49470

Why

The #50333 PR require the Content-Type to be application/x-ndjson for the get_log endpoint to generate correct frontend query.

accept?: "application/json" | "text/plain" | "*/*";

What

Since PR #46827 sets the Content-Type to application/x-ndjson, this change explicitly aligns with that behavior by using application/x-ndjson to ensure consistency and correctness:

https://github.com/apache/airflow/pull/46827/files#diff-18e153220119c0579d8b8030d13daaa04a623b38f9854ffff8702a2bbe68f4f8R123-R130

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels May 13, 2025
@jason810496
Copy link
Member Author

Thanks to @guan404ming for raising this issue during our offline discussion.

@guan404ming
Copy link
Contributor

Lightning speed ⚡️ Thanks for the PR.

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thanks.

I guess we need to wait for #49470 before merging.

@pierrejeambrun pierrejeambrun added this to the Airflow 3.1.0 milestone May 13, 2025
@jason810496 jason810496 force-pushed the refactor/AIP-84/fix-get-log-openapi branch from 83e53e9 to 9217985 Compare May 14, 2025 02:01
@jason810496
Copy link
Member Author

jason810496 commented May 14, 2025

Looks good thanks.

I guess we need to wait for #49470 before merging.

This PR does not depend on #49470 (the log reading refactor).
Since #46827 (structured log support, merged before the 3.0 release) already added support for application/x-ndjson, this PR simply ports a portion of the changes from #49470 to unblock #50333 (the UI refactor).

https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py#L156

@jason810496 jason810496 merged commit 08cc57d into apache:main May 15, 2025
95 checks passed
pierrejeambrun pushed a commit to astronomer/airflow that referenced this pull request Jun 3, 2025
* Fix openapi schema for get_log API

* Fix test_log

(cherry picked from commit 08cc57d)
@pierrejeambrun
Copy link
Member

Backport pr #51357

kaxil pushed a commit that referenced this pull request Jun 3, 2025
* Fix openapi schema for get_log API

* Fix test_log

(cherry picked from commit 08cc57d)

Co-authored-by: LIU ZHE YOU <68415893+jason810496@users.noreply.github.com>
kaxil pushed a commit that referenced this pull request Jun 3, 2025
…50746) (#51202)

* Fix OpenAPI schema for `get_log` API (#50547)

* Fix openapi schema for get_log API

* Fix test_log

(cherry picked from commit 08cc57d)

* [v3-0-test] Update `TaskLogContent` to support virtualized rendering (#50746)

* Update TaskLogContent to support virtualized rendering

* Update TaskLogPreview and Logs to handle undefined parsedLogs
(cherry picked from commit 813f3e3)

Co-authored-by: Guan Ming(Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>

---------

Co-authored-by: LIU ZHE YOU <68415893+jason810496@users.noreply.github.com>
Co-authored-by: Guan Ming(Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
kaxil pushed a commit that referenced this pull request Jun 3, 2025
* Fix openapi schema for get_log API

* Fix test_log

(cherry picked from commit 08cc57d)

Co-authored-by: LIU ZHE YOU <68415893+jason810496@users.noreply.github.com>
kaxil pushed a commit that referenced this pull request Jun 3, 2025
…50746) (#51202)

* Fix OpenAPI schema for `get_log` API (#50547)

* Fix openapi schema for get_log API

* Fix test_log

(cherry picked from commit 08cc57d)

* [v3-0-test] Update `TaskLogContent` to support virtualized rendering (#50746)

* Update TaskLogContent to support virtualized rendering

* Update TaskLogPreview and Logs to handle undefined parsedLogs
(cherry picked from commit 813f3e3)

Co-authored-by: Guan Ming(Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>

---------

Co-authored-by: LIU ZHE YOU <68415893+jason810496@users.noreply.github.com>
Co-authored-by: Guan Ming(Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
* Fix openapi schema for get_log API

* Fix test_log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy