awx
awx copied to clipboard
Adding prevent_instance_group_fallback
SUMMARY
Adds a prevent_instnace_group_fallback
field to job templates and inventories and refactors preferred_instance_groups
too "short circuit" if it finds a flag in either location.
WIP status: Needs unit test updates.
ISSUE TYPE
- New or Enhanced Feature
COMPONENT NAME
- API
- UI
AWX VERSION
awx: 21.5.1.dev2+g1585f02bff.d20220824
ADDITIONAL INFORMATION
This is really great work. I realize this is a WIP but wanted to provide some feedback. We still need to update the details view for Job Templates, and for Inventory, along with the unit tests to reflect these new fields.
Thanks, the checkbox on inventories is a little wonky and I'll probably need some help getting it aligned a little better.
Needs QE tests to be created.
The only test case for integration tests is whether the Prevent fallback....
value shows up on the details page after save.
There are several other implementations of this method preferred_instance_groups
, and I don't think we can call this complete without updating those. For example, for ad hoc commands.
https://github.com/ansible/awx/blob/85a5b58d1882c683341573390b9213dc292f97ff/awx/main/models/ad_hoc_commands.py#L230-L242
If I set this flag for my inventory, I would expect that jobs will not fallback to organization instance groups. But why should I expect otherwise when running ad hoc commands against that inventory?
I think that's a pretty critical change needed here before merge. Otherwise I don't have any major objections. You could re-apply the pattern you have to those methods, or maybe delete some of the non-unified versions of that method if what you have is general enough.
@AlanCoding good feedback. I modified ad_hoc and inventory source updates as well. Please have a look and let me know what you think.
Test summary
Run details
Project | AWX - Functional |
Status | Failed |
Commit | 08bcc70b67 |
Started | Sep 28, 2022 5:46 PM |
Ended | Sep 28, 2022 9:15 PM |
Duration | 28:47 💡 |
OS | Linux Debian - 11.3 |
Browser | Chrome 100 ![]() |
View run in Cypress Dashboard ➡️
Failures
Flakiness
![]() |
cypress/e2e/integration/user-journeys/auditor-journey.cy.js ![]() |
1 ![]() |
|
---|---|---|---|
1 | Inventories > cannot Run command, add or disassociate related groups |
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
One of the big next steps I think we should take in this area (and notifications too) is to express the search criteria used in the UI... in some special place the user can drill down into, and have this self-document. Same for notification templates and other organization-fallback kind of things.
verified by QE