You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "anmolxlight (via GitHub)" <gi...@apache.org> on 2026/07/16 07:42:58 UTC

[PR] [AIP-94] airflowctl tasks: add logs command [airflow]

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

   ## Description
   
   Adds `airflowctl tasks logs` — fetch a task instance's logs for a given try number, mirroring the existing Core REST API endpoint `GET /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/logs/{try_number}`.
   
   ### Changes
   
   - **operations.py**: Adds `TasksOperations` class with `logs()` method that calls the REST API
   - **client.py**: Wires `TasksOperations` into `Client.tasks` property
   - **help_texts.yaml**: Registers help text for the auto-generated CLI
   - **test_operations.py**: Adds `TestTasksOperations.test_logs` verifying request path/params and response parsing
   
   ### Usage
   
   ```bash
   airflowctl tasks logs <dag_id> <dag_run_id> <task_id> <try_number> [--full-content] [--map-index]
   ```
   
   - `--try-number` is required and positional
   - `--full-content` (bool, optional, default False) — get full log content
   - `--map-index` (int, optional, default -1) — for mapped task instances
   
   ### Notes
   
   - `--try-number` defaults to the latest attempt if omitted (matches webserver UI behavior).
   - Only calls the primary `logs/{try_number}` endpoint. The separate `externalLogUrl` endpoint (Elasticsearch/OpenSearch) can be a follow-up.
   
   Closes: #69947


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [AIP-94] airflowctl tasks: add logs command [airflow]

Posted by "anmolxlight (via GitHub)" <gi...@apache.org>.
anmolxlight commented on PR #69953:
URL: https://github.com/apache/airflow/pull/69953#issuecomment-5021256506

   Thanks for the review @potiuk. Fixed the ts-compile-lint-ui ordering issue and rebased onto latest main. Let's see if CI passes now.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [AIP-94] airflowctl tasks: add logs command [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #69953:
URL: https://github.com/apache/airflow/pull/69953#issuecomment-5021169263

   @anmolxlight This PR has a few issues that need to be addressed before it can be reviewed — please see our [Pull Request quality criteria](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-quality-criteria).
   
   **Issues found:**
   - :x: **Pre-commit / static checks**: Failing: `CI image checks / Static checks`. Run `prek run --from-ref main --stage pre-commit` locally to reproduce and fix.
   
   > **Note:** Your branch is **79 commits behind `main`**. Some check failures may be caused by changes in the base branch rather than by your PR. Please rebase your branch and push again to get up-to-date CI results.
   
   **What to do next:**
   - Fix each issue listed above.
   - Make sure static checks pass locally (`prek run --from-ref main --stage pre-commit`).
   - Mark the PR as "Ready for review" when you're done.
   
   There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the [Airflow Slack](https://s.apache.org/airflow-slack).
   
   ---
   
   _Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this [two-stage triage process](https://github.com/apache/airflow/blob/main/contributing-docs/25_maintainer_pr_triage.md#why-the-first-pass-is-automated) so that our maintainers' limited time is spent where it matters most: the conversation with you._


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [AIP-94] airflowctl tasks: add logs command [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun closed pull request #69953: [AIP-94] airflowctl tasks: add logs command
URL: https://github.com/apache/airflow/pull/69953


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org