You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/21 15:07:45 UTC

[GitHub] [airflow] bbovenzi opened a new pull request, #26556: Fix grid view log try numbers

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

   The try numbers shown in the grid view logs were showing an extra count and just not consistent with how the regular logs page works.
   
   Fixes https://github.com/apache/airflow/issues/26194#issuecomment-1249183346
   Other fixes:
   - Default selection to the latest try number
   - Count try number at 1 instead of 0
   
   
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.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 [newsfragments](https://github.com/apache/airflow/tree/main/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


[GitHub] [airflow] bbovenzi commented on pull request #26556: Fix grid view log try numbers

Posted by GitBox <gi...@apache.org>.
bbovenzi commented on PR #26556:
URL: https://github.com/apache/airflow/pull/26556#issuecomment-1253848347

   cc: @pierrejeambrun 


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


[GitHub] [airflow] pierrejeambrun commented on a diff in pull request #26556: Fix grid view log try numbers

Posted by GitBox <gi...@apache.org>.
pierrejeambrun commented on code in PR #26556:
URL: https://github.com/apache/airflow/pull/26556#discussion_r976778067


##########
airflow/www/static/js/dag/details/taskInstance/Logs/index.tsx:
##########
@@ -99,12 +98,13 @@ const Logs = ({
   tryNumber,
 }: Props) => {
   const [internalIndexes, externalIndexes] = getLinkIndexes(tryNumber);
-  const [selectedAttempt, setSelectedAttempt] = useState(1);
+  const [manuallySelectedAttempt, setSelectedAttempt] = useState<number | undefined>();

Review Comment:
   Not: Should we rename also the setter ? (Not a big fan of having the state and its setter with different names)



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


[GitHub] [airflow] bbovenzi merged pull request #26556: Fix grid view log try numbers

Posted by GitBox <gi...@apache.org>.
bbovenzi merged PR #26556:
URL: https://github.com/apache/airflow/pull/26556


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


[GitHub] [airflow] bbovenzi commented on a diff in pull request #26556: Fix grid view log try numbers

Posted by GitBox <gi...@apache.org>.
bbovenzi commented on code in PR #26556:
URL: https://github.com/apache/airflow/pull/26556#discussion_r977597938


##########
airflow/www/static/js/dag/details/taskInstance/Logs/index.tsx:
##########
@@ -99,12 +98,13 @@ const Logs = ({
   tryNumber,
 }: Props) => {
   const [internalIndexes, externalIndexes] = getLinkIndexes(tryNumber);
-  const [selectedAttempt, setSelectedAttempt] = useState(1);
+  const [manuallySelectedAttempt, setSelectedAttempt] = useState<number | undefined>();

Review Comment:
   I decided to remove all use of "attempt" and use `selectedTryNumber` and `taskTryNumber` instead.



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


[GitHub] [airflow] pierrejeambrun commented on a diff in pull request #26556: Fix grid view log try numbers

Posted by GitBox <gi...@apache.org>.
pierrejeambrun commented on code in PR #26556:
URL: https://github.com/apache/airflow/pull/26556#discussion_r976778067


##########
airflow/www/static/js/dag/details/taskInstance/Logs/index.tsx:
##########
@@ -99,12 +98,13 @@ const Logs = ({
   tryNumber,
 }: Props) => {
   const [internalIndexes, externalIndexes] = getLinkIndexes(tryNumber);
-  const [selectedAttempt, setSelectedAttempt] = useState(1);
+  const [manuallySelectedAttempt, setSelectedAttempt] = useState<number | undefined>();

Review Comment:
   nit: Should we rename also the setter ? (Not a big fan of having the state and its setter with different names)



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