You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Prab-27 (via GitHub)" <gi...@apache.org> on 2025/05/20 13:58:08 UTC

[PR] AIP-81: Update Transition of Jobs Command. [airflow]

Prab-27 opened a new pull request, #50837:
URL: https://github.com/apache/airflow/pull/50837

   closes: #45666 
   
   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
   


-- 
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-81: Update Transition of Jobs Command. [airflow]

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

   This is : 
   
   ```
   2025-05-26 16:42:46 [warning  ] Server error                   [airflowctl.api.client] extra={'detail': [{'type': 'int_parsing', 'loc': ['query', 'limit'], 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': ''}, {'type': 'bool_parsing', 'loc': ['query', 'is_alive'], 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': ''}]}
   Traceback (most recent call last):
     File "/usr/local/bin/airflowctl", line 10, in <module>
       sys.exit(main())
     File "/opt/airflow/airflow-ctl/src/airflowctl/__main__.py", line 34, in main
       safe_call_command(args.func, args=args)
     File "/opt/airflow/airflow-ctl/src/airflowctl/ctl/cli_config.py", line 64, in safe_call_command
       function(args)
     File "/opt/airflow/airflow-ctl/src/airflowctl/api/client.py", line 306, in wrapper
       return func(*args, api_client=api_client, **kwargs)
     File "/opt/airflow/airflow-ctl/src/airflowctl/ctl/cli_config.py", line 468, in _get_func
       rich.print(operation_method_object(**method_params))
     File "/opt/airflow/airflow-ctl/src/airflowctl/api/operations.py", line 114, in wrapped
       return _exit_if_server_response_error(response=func(self, *args, **kwargs))
     File "/opt/airflow/airflow-ctl/src/airflowctl/api/operations.py", line 509, in list
       raise e
     File "/opt/airflow/airflow-ctl/src/airflowctl/api/operations.py", line 506, in list
       self.response = self.client.get("jobs", params=params)  # type: ignore
     File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1054, in get
       return self.request(
     File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 827, in request
       return self.send(request, auth=auth, follow_redirects=follow_redirects)
     File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 914, in send
       response = self._send_handling_auth(
     File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 942, in _send_handling_auth
       response = self._send_handling_redirects(
     File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 999, in _send_handling_redirects
       raise exc
     File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 982, in _send_handling_redirects
       hook(response)
     File "/opt/airflow/airflow-ctl/src/airflowctl/api/client.py", line 98, in raise_on_4xx_5xx
       return get_json_error(response) or response.raise_for_status()
     File "/opt/airflow/airflow-ctl/src/airflowctl/api/client.py", line 94, in get_json_error
       raise err
   airflowctl.api.operations.ServerResponseError: Client error message: {'detail': [{'type': 'int_parsing', 'loc': ['query', 'limit'], 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': ''}, {'type': 'bool_parsing', 'loc': ['query', 'is_alive'], 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': ''}]}
   ```
   Could you please guide me on what we can do to solve this error ? 
   


-- 
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-81: Update Transition of Jobs Command. [airflow]

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

   > I have tried multiple times, but the pre-commit is not being added to the provider-ui commit file, and no changes are appearing in the YAML file after rebasing. Even though the new changes are updated, running pre-commit automatically modifies the files, and I am unable to restore them.
   > 
   > Could you please help me resolve this? 
   > Should I create a new PR for the Job operation?
   
   Can you try to do the following?
   Rebase, revert those files back and commit. Do `breeze down --cleanup-mypy-cache`. [Build your CI image](https://github.com/apache/airflow/blob/main/dev/breeze/doc/06_managing_docker_images.rst#building-ci-image) again. Then rerun pre-commit for all files and try to see if changes


-- 
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-81: Update Transition of Jobs Command. [airflow]

Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on code in PR #50837:
URL: https://github.com/apache/airflow/pull/50837#discussion_r2110404292


##########
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/pnpm-lock.yaml:
##########
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.

Review Comment:
   I don't kthinks this PR needs to update the pnpm-lock.yaml from core



##########
providers/fab/src/airflow/providers/fab/www/static/dist/743.1f45c836ec447657c06d.js:
##########
@@ -1,2 +0,0 @@
-/*! For license information please see 743.1f45c836ec447657c06d.js.LICENSE.txt */

Review Comment:
   I don't expect this to be deleted too in this pr



-- 
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-81: Update Transition of Jobs Command. [airflow]

Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on code in PR #50837:
URL: https://github.com/apache/airflow/pull/50837#discussion_r2098579139


##########
airflow-ctl/src/airflowctl/api/operations.py:
##########
@@ -502,7 +502,7 @@ def list(
     ) -> JobCollectionResponse | ServerResponseError:
         """List all jobs."""
         try:
-            params = {"limit": limit, "job_type": job_type, "hostname": hostname, "is_alive": is_alive}
+            params = {limit: limit, "job_type": job_type, "hostname": hostname, is_alive: is_alive}

Review Comment:
   ```suggestion
               params = {"limit": limit, "job_type": job_type, "hostname": hostname, "is_alive": is_alive}
   ```
   Key of `limit` shouldn't be an integer here, same for `is_alive` shouldn't be a bool. 
   We should include all the filters here 
   https://github.com/apache/airflow/blob/b566a0b57f48beefb5a6aa33c439c4630ff14197/airflow-core/src/airflow/api_fastapi/core_api/routes/public/job.py#L56-L102
   
   We shouldn't include the limit here since we should either filter or return the full result. See the above endpoint, it is very similar to all the list methods on the API side. It will be very similar to the return of all entities that you are working on. We shouldn't  



-- 
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-81: Update Transition of Jobs Command. [airflow]

Posted by "Prab-27 (via GitHub)" <gi...@apache.org>.
Prab-27 closed pull request #50837: AIP-81: Update Transition of Jobs Command.
URL: https://github.com/apache/airflow/pull/50837


-- 
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-81: Update Transition of Jobs Command. [airflow]

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

   > It shows me Server Error :
   > 
   > ```
   > 2025-05-26 16:42:46 [warning  ] Server error                   [airflowctl.api.client] extra={'detail': [{'type': 'int_parsing', 'loc': ['query', 'limit'], 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': ''}, {'type': 'bool_parsing', 'loc': ['query', 'is_alive'], 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': ''}]}
   > Traceback (most recent call last):
   >   File "/usr/local/bin/airflowctl", line 10, in <module>
   >     sys.exit(main())
   >   File "/opt/airflow/airflow-ctl/src/airflowctl/__main__.py", line 34, in main
   >     safe_call_command(args.func, args=args)
   >   File "/opt/airflow/airflow-ctl/src/airflowctl/ctl/cli_config.py", line 64, in safe_call_command
   >     function(args)
   >   File "/opt/airflow/airflow-ctl/src/airflowctl/api/client.py", line 306, in wrapper
   >     return func(*args, api_client=api_client, **kwargs)
   >   File "/opt/airflow/airflow-ctl/src/airflowctl/ctl/cli_config.py", line 468, in _get_func
   >     rich.print(operation_method_object(**method_params))
   >   File "/opt/airflow/airflow-ctl/src/airflowctl/api/operations.py", line 114, in wrapped
   >     return _exit_if_server_response_error(response=func(self, *args, **kwargs))
   >   File "/opt/airflow/airflow-ctl/src/airflowctl/api/operations.py", line 509, in list
   >     raise e
   >   File "/opt/airflow/airflow-ctl/src/airflowctl/api/operations.py", line 506, in list
   >     self.response = self.client.get("jobs", params=params)  # type: ignore
   >   File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1054, in get
   >     return self.request(
   >   File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 827, in request
   >     return self.send(request, auth=auth, follow_redirects=follow_redirects)
   >   File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 914, in send
   >     response = self._send_handling_auth(
   >   File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 942, in _send_handling_auth
   >     response = self._send_handling_redirects(
   >   File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 999, in _send_handling_redirects
   >     raise exc
   >   File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 982, in _send_handling_redirects
   >     hook(response)
   >   File "/opt/airflow/airflow-ctl/src/airflowctl/api/client.py", line 98, in raise_on_4xx_5xx
   >     return get_json_error(response) or response.raise_for_status()
   >   File "/opt/airflow/airflow-ctl/src/airflowctl/api/client.py", line 94, in get_json_error
   >     raise err
   > airflowctl.api.operations.ServerResponseError: Client error message: {'detail': [{'type': 'int_parsing', 'loc': ['query', 'limit'], 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': ''}, {'type': 'bool_parsing', 'loc': ['query', 'is_alive'], 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': ''}]}
   > ```
   > 
   > Could you please guide me on what we can do to solve this error ?
   
   That can stay for `is_alive`. We can handle that in a separate PR. You can include the `is_alive` and assume it will work. Let's not add the `limit` back since we will return everything in the feature you are working on. 


-- 
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-81: Update Transition of Jobs Command. [airflow]

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

   > @bugraoz93 I'm sorry, this will make things more complicated.
   
   There's no need to be sorry. That is also an option


-- 
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-81: Update Transition of Jobs Command. [airflow]

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

   Done!
   
   
   
   


-- 
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-81: Update Transition of Jobs Command. [airflow]

Posted by "Prab-27 (via GitHub)" <gi...@apache.org>.
Prab-27 commented on code in PR #50837:
URL: https://github.com/apache/airflow/pull/50837#discussion_r2105897589


##########
airflow-ctl/src/airflowctl/api/operations.py:
##########
@@ -502,7 +502,7 @@ def list(
     ) -> JobCollectionResponse | ServerResponseError:
         """List all jobs."""
         try:
-            params = {"limit": limit, "job_type": job_type, "hostname": hostname, "is_alive": is_alive}
+            params = {limit: limit, "job_type": job_type, "hostname": hostname, is_alive: is_alive}

Review Comment:
   Got it !!
   
   I'll update this tomorrow 



-- 
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-81: Update Transition of Jobs Command. [airflow]

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

   I have tried multiple times, but the pre-commit is not being added to the provider-ui commit file, and no changes are appearing in the YAML file after rebasing. Even though the new changes are updated, running pre-commit automatically modifies the files, and I am unable to restore them.
   
   Could you please help me resolve this? 
   Should I create a new PR for the Job operation?


-- 
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-81: Update Transition of Jobs Command. [airflow]

Posted by "Prab-27 (via GitHub)" <gi...@apache.org>.
Prab-27 commented on code in PR #50837:
URL: https://github.com/apache/airflow/pull/50837#discussion_r2107293555


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/job.py:
##########
@@ -78,6 +95,7 @@ def get_jobs(
                     "executor_class",
                     "hostname",
                     "unixname",

Review Comment:
   Do I need to add `is_alive` to `sort_param` ? 



-- 
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-81: Update Transition of Jobs Command. [airflow]

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

   If this` is_alive` and` limit` are present in prams then , 
   ```
       raise err
   airflowctl.api.operations.ServerResponseError: Client error message: {'detail': [{'type': 'int_parsing', 'loc': ['query', 'limit'], 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': ''}, {'type': 'bool_parsing', 'loc': ['query', 'is_alive'], 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': ''}]}
   ```


-- 
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-81: Update Transition of Jobs Command. [airflow]

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

   I'm sorry, this will make things more complicated.


-- 
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-81: Update Transition of Jobs Command. [airflow]

Posted by "Prab-27 (via GitHub)" <gi...@apache.org>.
Prab-27 commented on code in PR #50837:
URL: https://github.com/apache/airflow/pull/50837#discussion_r2105897589


##########
airflow-ctl/src/airflowctl/api/operations.py:
##########
@@ -502,7 +502,7 @@ def list(
     ) -> JobCollectionResponse | ServerResponseError:
         """List all jobs."""
         try:
-            params = {"limit": limit, "job_type": job_type, "hostname": hostname, "is_alive": is_alive}
+            params = {limit: limit, "job_type": job_type, "hostname": hostname, is_alive: is_alive}

Review Comment:
   Got it !!



-- 
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-81: Update Transition of Jobs Command. [airflow]

Posted by "Prab-27 (via GitHub)" <gi...@apache.org>.
Prab-27 commented on code in PR #50837:
URL: https://github.com/apache/airflow/pull/50837#discussion_r2107663968


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/job.py:
##########
@@ -44,9 +45,25 @@
 from airflow.jobs.job import Job
 from airflow.utils.state import JobState
 
+if TYPE_CHECKING:
+    from sqlalchemy.sql import Select
+
 job_router = AirflowRouter(tags=["Job"], prefix="/jobs")
 
 
+class IsAliveFilter(BaseParam[bool]):

Review Comment:
   Yes, I agree with you, but we don’t have any Filter class in parameters.py, so I implemented it. Since parameters.py contains common parameters, I added it here in Jobs, similar to how the OnlyActiveFilter class is used in assets. 
   
   I believe all parameters are passed through their related filters, as shown in the code you shared. So, I implemented it this way



-- 
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-81: Update Transition of Jobs Command. [airflow]

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

   > If this` is_alive` and` limit` are present in prams `airflowctl jobs list` will show me 
   > ```
   >     raise err
   > airflowctl.api.operations.ServerResponseError: Client error message: {'detail': [{'type': 'int_parsing', 'loc': ['query', 'limit'], 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': ''}, {'type': 'bool_parsing', 'loc': ['query', 'is_alive'], 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': ''}]}
   > ```
   
   Yeap, the limit shouldn't be there, but maybe we have a problem with boolean actions. I think that isn't related to command or api but the generation function. You can keep that out of scope, but is_alive should be there. 


-- 
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-81: Update Transition of Jobs Command. [airflow]

Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on code in PR #50837:
URL: https://github.com/apache/airflow/pull/50837#discussion_r2107620719


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/job.py:
##########
@@ -44,9 +45,25 @@
 from airflow.jobs.job import Job
 from airflow.utils.state import JobState
 
+if TYPE_CHECKING:
+    from sqlalchemy.sql import Select
+
 job_router = AirflowRouter(tags=["Job"], prefix="/jobs")
 
 
+class IsAliveFilter(BaseParam[bool]):

Review Comment:
   I am not sure we need this since we can filter with a boolean value :thinking: I don't think we need this, it can be a boolean filter on the CTL?
   Even if we need it should be under the `parameters.py`.
   https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/api_fastapi/common/parameters.py



##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/job.py:
##########
@@ -78,6 +95,7 @@ def get_jobs(
                     "executor_class",
                     "hostname",
                     "unixname",

Review Comment:
   I don't think this is needed, we don't have any sort of feature in the CTL, but good to add this to the CTL in the future after first release.



##########
airflow-ctl/src/airflowctl/api/operations.py:
##########
@@ -497,12 +497,10 @@ def create(
 class JobsOperations(BaseOperations):
     """Job operations."""
 
-    def list(
-        self, job_type: str, hostname: str, limit: int, is_alive: bool
-    ) -> JobCollectionResponse | ServerResponseError:
+    def list(self, job_type: str, hostname: str) -> JobCollectionResponse | ServerResponseError:

Review Comment:
   Why did we delete the is_alive param?



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