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

[AAP-25659] Show error if resources are missing in Schedule wizard #2551

Merged
merged 6 commits into from
Jul 8, 2024

Conversation

jerabekjiri
Copy link
Contributor

@jerabekjiri jerabekjiri commented Jun 20, 2024

Issue: AAP-25659

Screenshot from 2024-06-26 14-53-39

Don't let create schedule if resources are missing

empty state:
Screenshot from 2024-06-26 14-53-17
(custom icon requires #2585)

disabled button:
Screenshot from 2024-06-24 16-44-53

@github-actions github-actions bot added the AWX Label to indicate changes relevant to AWX label Jun 20, 2024
@jerabekjiri jerabekjiri force-pushed the schedule-wizard-missing-resources branch from e543a48 to dba419a Compare June 20, 2024 17:51
@AlexSCorey AlexSCorey self-requested a review June 21, 2024 13:20
Copy link
Member

@marshmalien marshmalien left a comment

Choose a reason for hiding this comment

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

We don't need to show an error when a workflow job template is missing an inventory. Only when the launch config inventory_needed_to_start is true AND the schedule is missing an inventory.

https://github.com/ansible/awx/blob/devel/awx/ui/src/components/Schedule/shared/ScheduleForm.js#L246-L260

  let missingInventory = false;
  if (
    launchConfig?.inventory_needed_to_start &&
    !schedule?.summary_fields?.inventory?.id
  ) {
    missingInventory = true;
  }
  return missingInventory;
}, [launchConfig, schedule]);

@jerabekjiri jerabekjiri force-pushed the schedule-wizard-missing-resources branch 6 times, most recently from 68d9581 to b0d714c Compare June 27, 2024 18:10
@jerabekjiri jerabekjiri force-pushed the schedule-wizard-missing-resources branch from b0d714c to 8e6056e Compare June 28, 2024 08:08
Copy link
Member

@marshmalien marshmalien left a comment

Choose a reason for hiding this comment

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

looks great to me!

@jerabekjiri jerabekjiri force-pushed the schedule-wizard-missing-resources branch 5 times, most recently from 1fadab0 to 592f61b Compare July 3, 2024 14:27
Copy link
Member

@AlexSCorey AlexSCorey left a comment

Choose a reason for hiding this comment

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

It seems that we have a difference in error handling for editing a resource with missing dependencies, and creating a schedule on a resource with missing dependencies.

The first image is for editing a schedule that is part of job template hj.
Screenshot 2024-07-03 at 11 36 55 AM

The second image is for creating a schedule that is part of job template hj even though the resource name isn't correct (that looks like another bug).
Screenshot 2024-07-03 at 11 38 02 AM

The methods of error handling should be the same in both cases. The in edit scenario we do not show the error message, and we should.

@h-kataria h-kataria added the release-blocker Release Blocker label Jul 3, 2024
@jerabekjiri jerabekjiri force-pushed the schedule-wizard-missing-resources branch from 592f61b to b412230 Compare July 4, 2024 21:48
@github-actions github-actions bot added the E2E End-to-end testing label Jul 4, 2024
Copy link
Member

@vidyanambiar vidyanambiar left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Member

@AlexSCorey AlexSCorey left a comment

Choose a reason for hiding this comment

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

All the issues I have found are resolved. Looks good to me. Well done!

@AlexSCorey
Copy link
Member

I file https://issues.redhat.com/browse/AAP-26667 in response to the bug I found about the name of the resource on the review step.

@jerabekjiri jerabekjiri force-pushed the schedule-wizard-missing-resources branch from c882a64 to 4eb0a05 Compare July 8, 2024 09:44
@jerabekjiri jerabekjiri force-pushed the schedule-wizard-missing-resources branch from 4eb0a05 to ad21465 Compare July 8, 2024 10:29
@jerabekjiri jerabekjiri merged commit 47070ef into main Jul 8, 2024
23 checks passed
@jerabekjiri jerabekjiri deleted the schedule-wizard-missing-resources branch July 8, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AWX Label to indicate changes relevant to AWX E2E End-to-end testing release-blocker Release Blocker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants