Skip to content
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

Fix grid view log try numbers #26556

Merged
merged 2 commits into from Sep 22, 2022
Merged

Conversation

bbovenzi
Copy link
Contributor

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 #26194 (comment)
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 for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Sep 21, 2022
@bbovenzi
Copy link
Contributor Author

cc: @pierrejeambrun

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.

LGTM

@@ -99,12 +98,13 @@ const Logs = ({
tryNumber,
}: Props) => {
const [internalIndexes, externalIndexes] = getLinkIndexes(tryNumber);
const [selectedAttempt, setSelectedAttempt] = useState(1);
const [manuallySelectedAttempt, setSelectedAttempt] = useState<number | undefined>();
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to remove all use of "attempt" and use selectedTryNumber and taskTryNumber instead.

@bbovenzi bbovenzi merged commit 6a69ad0 into apache:main Sep 22, 2022
@bbovenzi bbovenzi deleted the fix-grid-logs-trynumber branch September 22, 2022 19:39
@jedcunningham jedcunningham added this to the Airflow 2.4.1 milestone Sep 26, 2022
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Sep 26, 2022
jedcunningham pushed a commit that referenced this pull request Sep 26, 2022
* redo how try numbers are displayed in grid view logs

* rename attempt -> tryNumber

(cherry picked from commit 6a69ad0)
jedcunningham pushed a commit that referenced this pull request Sep 27, 2022
* redo how try numbers are displayed in grid view logs

* rename attempt -> tryNumber

(cherry picked from commit 6a69ad0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extra entry for logs generated with 0 try number when clearing any task instances
4 participants