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

Use new children-summary endpoint data to traverse job event tree #11944

Merged
merged 6 commits into from
Apr 6, 2022

Conversation

keithjgrant
Copy link
Member

@keithjgrant keithjgrant commented Mar 23, 2022

SUMMARY

Updates UI to use the new children-summary endpoint (#11928) to determine number of child events & position in the tree. This greatly reduces the number of network requests made by the job output page for playbook jobs while expand/collapse is enabled.

This also addresses certain job events (such as Warnings) that do not fit into the parent/child tree structure of job events the way normal events do, which was breaking the UI's event lookup algorithm. The problem is these events don't have an parent_uuid field even though they might occur between two other events that share a parent. The children-summary endpoint provides a "meta_event_nested_uuid" object to place these events under the correct parent node so the lookup algorithm can work as expected.

This depends on #11928 and should not be merged until that PR is also merged.

Addresses #11818, #11765, #11647

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • UI

@keithjgrant keithjgrant force-pushed the job-event-children-summary-ui branch from 8fe3dff to 4701571 Compare March 25, 2022 23:19
@keithjgrant keithjgrant force-pushed the job-event-children-summary-ui branch 2 times, most recently from 5abb792 to 27d54b8 Compare March 30, 2022 22:18
@nixocio nixocio self-requested a review March 31, 2022 12:54
@keithjgrant keithjgrant changed the title [WIP] Use new children-summary endpoint data to traverse job event tree Use new children-summary endpoint data to traverse job event tree Mar 31, 2022
Copy link
Contributor

@nixocio nixocio left a comment

Choose a reason for hiding this comment

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

hey @keithjgrant, I got this code locally. I did several tests.

I was not able to see the errors reported on the issues. Excellent job.

Also there was a big improvement on the number of requests being made.

Number of requests for job output using awx/devel.

image

Number of requests for job output using code.

image

@@ -1,4 +1,3 @@
/* eslint-disable max-len */
import React from 'react';
import { act } from 'react-dom/test-utils';
import { JobsAPI, JobEventsAPI } from 'api';
Copy link
Member

@marshmalien marshmalien Apr 5, 2022

Choose a reason for hiding this comment

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

We could remove the JobEventsAPI import from this test since we're no longer using it. What are your thoughts on removing the JobEventsAPI from our models completely? It doesn't look like we use that model now that we have this new /jobs/:id/job_events/children_summary/ endpoint.

@nixocio
Copy link
Contributor

nixocio commented Apr 5, 2022

I triggered the e2e tests.

@cypress
Copy link

cypress bot commented Apr 5, 2022



Test summary

639 2 860 0Flakiness 1


Run details

Project AWX - Functional
Status Failed
Commit 280d7f3
Started Apr 5, 2022 11:45 PM
Ended Apr 6, 2022 1:36 AM
Duration 51:11 💡
OS Linux Debian - 10.11
Browser Chrome 98

View run in Cypress Dashboard ➡️


Failures

organization-crud.spec.js Failed
1 Create Organization Galaxy credentials- further testing > Can create an org and reorg the credential order on edit
organization-operations.spec.js Failed
1 Add teams to Organization > can add teams to organization

Flakiness

cypress/integration/credentials/credential-crud.spec.js Flakiness
1 Credentials- Upload > can upload a json file that will clear out current values of all 3 fields and then add values from the file

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Contributor

@InnocentK InnocentK 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! The above failed tests are unrelated to this work so it should be fine to merge

@InnocentK InnocentK merged commit 7cbb783 into ansible:devel Apr 6, 2022
@kurokobo kurokobo mentioned this pull request Apr 11, 2022
6 tasks
@ryanmerolle
Copy link

Thanks for the fix! Do we know when a new release with this PR will be cut?

@AlexSCorey
Copy link
Member

The release cadence of AWX varies, however we try to release a new version of AWX every few weeks. If you feel comfortable running the HEAD of awx/devel then these changes will be immediately available.

@keithjgrant keithjgrant mentioned this pull request May 11, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants