29803 Commits

Author SHA1 Message Date
Shane McDonald
239f20ede5
Bump to Ansible Runner alpha 5 release 2021-06-04 12:22:53 -04:00
softwarefactory-project-zuul[bot]
12f2975809
Merge pull request #10358 from jakemcdermott/fix-credlink
Make IG credential linkable

SUMMARY
Make the instance group credential detail link to the cred

Reviewed-by: Kersom <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-04 15:12:03 +00:00
softwarefactory-project-zuul[bot]
945125454b
Merge pull request #10357 from jakemcdermott/fix-inventory-host-search-config
Add search config for inventory hosts

SUMMARY
Adds search config for inventory hosts.
(includes default icontains, etc.)

Reviewed-by: Kersom <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-04 15:05:25 +00:00
softwarefactory-project-zuul[bot]
ea67c70437
Merge pull request #10257 from mabashian/6073-typeahead-lookup
Adds support for typing values into single select lookups

SUMMARY
link #6073
This adds support for typing values into single select lookups.  Multi-select lookups (credentials on the JT form, instance groups, etc) will remain unchanged.
An input is now rendered next to the lookup button which will allow users to type a value in.
Here's the button (which opens the modal):

Here's the input (which lets users type a value in):

There's a debounce on the input so that we only make a request to check to see if the name is valid after a second of no typing.
The tricky part of this implementation was handling validation on the lookup fields.  If a user types in a string that does not exactly match a value that they can use then we want to show an error indicating that no matching value was found:

but this was tricky because some of these fields are required so the validation functions would need to change a bit.
Since the typed text and the actual underlying value of the lookup are different the validation function would need to have access to both values whenever it runs for this to work.  This meant either storing the typed text up at the form level or pushing the validation down into the lookup(s).  After talking with @keithjgrant we decided to go down the route of pushing the validation down to the lookups.
You can now pass an optional validation function down to the various lookups that will get combined with the typeahead validation via the useField hook.
Here's the whole thing in action:

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

UI

Reviewed-by: Kersom <None>
Reviewed-by: Keith Grant <keithjgrant@gmail.com>
Reviewed-by: Michael Abashian <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-04 15:03:53 +00:00
Jake McDermott
88ff68295b
Make IG credential linkable 2021-06-04 10:27:14 -04:00
Jake McDermott
d93f62c030
Add search config for inventory hosts 2021-06-04 09:51:43 -04:00
softwarefactory-project-zuul[bot]
c34fa30ea7
Merge pull request #10342 from mabashian/10338-checkbox-double-select
Fixes bug where checkbox list item was selecting things twice

SUMMARY
Resolves #10338
There was a click event on the row and the underlying checkbox.  I got rid of the underlying click event so now its only handled at the row level.

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-03 21:37:05 +00:00
softwarefactory-project-zuul[bot]
3e5ee9d57a
Merge pull request #10322 from jbradberry/show-ee-resolver
Expose the EE resolver to the API

SUMMARY
This change exposes the output of .resolve_execution_environment() for job templates as a new summary field in the API.  Note that this is only exposed for the detail views, not the list views.  Also, there is the caveat for job templates that may be run under workflows that the workflow EE might override the results of this value.
related #10210
ISSUE TYPE

Feature Pull Request

COMPONENT NAME


API

AWX VERSION

Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
Reviewed-by: Chris Meyers <None>
Reviewed-by: Jeff Bradberry <None>
2021-06-03 21:11:33 +00:00
softwarefactory-project-zuul[bot]
c7dd3996df
Merge pull request #10351 from AlanCoding/sliced_ee
Skip sliced jobs from the workflow EE logic

Addressing some unanticipated fallout from #10305
Sliced jobs rely on creating a workflow job, but they do not have a workflow_job_template, so in those cases, that was causing a traceback.
2021-06-03 20:10:52,319 ERROR    [a17ebd7f] awx.main.dispatch Worker failed to run task awx.main.tasks.RunJob(*[341], **{}
Traceback (most recent call last):
  File "/awx_devel/awx/main/dispatch/worker/task.py", line 90, in perform_work
    result = self.run_callable(body)
  File "/awx_devel/awx/main/dispatch/worker/task.py", line 65, in run_callable
    return _call(*args, **kwargs)
  File "/awx_devel/awx/main/tasks.py", line 759, in _wrapped
    return f(self, *args, **kwargs)
  File "/awx_devel/awx/main/tasks.py", line 1264, in run
    self.instance = self.update_model(self.instance.pk, execution_environment=self.instance.resolve_execution_environment())
  File "/awx_devel/awx/main/models/mixins.py", line 477, in resolve_execution_environment
    if wf_template.execution_environment is not None:
AttributeError: 'NoneType' object has no attribute 'execution_environment'

that is fixed with this, at least for my one simple test case
This left jobs hanging out in "waiting" status, which is really not good.

Reviewed-by: Jeff Bradberry <None>
2021-06-03 21:02:01 +00:00
softwarefactory-project-zuul[bot]
e342919735
Merge pull request #10323 from wenottingham/look-over-there
Add additional controller directory for collections for inventory update

SUMMARY
This may be present in some scenarios with additional collections for inventory usage.

Reviewed-by: Alan Rominger <arominge@redhat.com>
2021-06-03 20:42:04 +00:00
Jeff Bradberry
d0991bab9e Expose the EE resolver to the job template detail API endpoints 2021-06-03 16:35:50 -04:00
Alan Rominger
efcbea1fc5
Skip sliced jobs from the workflow EE logic 2021-06-03 16:20:47 -04:00
softwarefactory-project-zuul[bot]
30b7535ca2
Merge pull request #10348 from rooftopcellist/container_groups_error
Fix error msg wording and sdb docs

SUMMARY

Fixes wording in container groups error message
Updates ports for sdb debugging docs

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-06-03 19:02:34 +00:00
Christian M. Adams
fe02c0b157
Fix error msg wording and sdb docs 2021-06-03 14:24:18 -04:00
mabashian
177901eca6 Adds assertion to ensure that only one chip is shown when a checkbox list item is selected 2021-06-03 14:01:04 -04:00
mabashian
c2c93e7a66 Fix unit test failures 2021-06-03 13:50:26 -04:00
Bill Nottingham
00e60d2698 Add additional controller directory for collections for inventory update 2021-06-03 13:26:23 -04:00
softwarefactory-project-zuul[bot]
23c3e62211
Merge pull request #10345 from sarabrajsingh/bugfix/bump-ansible-runner-version
updated ansible-runner version from 2.0.0a2 -> 2.0.0a4 in requirement…

SUMMARY
version bump (ansible-runner 2.0.0a2 -> 2.0.0a4)
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

API

AWX VERSION

awx: 19.2.0

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-06-03 16:49:38 +00:00
Sarabraj Singh
383c2bba58
updated ansible-runner version from 2.0.0a2 -> 2.0.0a4 in requirements files 2021-06-03 11:53:57 -04:00
softwarefactory-project-zuul[bot]
8adb53b5a8
Merge pull request #10292 from mabashian/8824-role-modal
Fixes bug where user/team role add modal state is not cleared on close

SUMMARY
link #8824
I modeled these changes after the pattern that existed between ResourceAccessList and AddResourceRole.  The key to fixing this bug is that the component that renders the wizard needs to be unmounted when the wizard closes so that the state, etc get cleared out before the next time the wizard is opened.  In order to achieve that I needed to decouple the add button from the wizard.
The sort of weird part of this pattern (and this exists in the ResourceAccessList as well) is error handling.  We pass the error back and set that to state before rendering the modal which isn't quite as clean as having the request made out at the list level and leveraging our hooks for error handling but I decided to just get in and get out and not worry about trying to refactor too much.
Here it is in action:

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Kersom <None>
2021-06-03 15:52:40 +00:00
softwarefactory-project-zuul[bot]
92401e5328
Merge pull request #10301 from kdelee/unqualified_images
Force fully qualified image names

If we try and pull an unqualified image name, jobs hang on a podman
prompt.
I set the permissions as 644 because thats what worked for me because rootless podman needs to be able to read the file, but maybe there is another way to achieve that

Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
2021-06-03 15:45:24 +00:00
softwarefactory-project-zuul[bot]
d360fb212e
Merge pull request #10258 from kdelee/ee_singular_awx_cli
allow singular execution_environment for cli

this makes "execution_environments" or "execution_environment" work
which is helpful
Now these both work:
awx execution_environments create --name foobar --image quay.io/ansible/awx-ee:latest

awx execution_environment create --name foobar1 --image quay.io/ansible/awx-ee:latest

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Jeff Bradberry <None>
2021-06-03 14:11:27 +00:00
mabashian
4c1b0297e7 Fixes bug where checkbox list item was selecting things twice 2021-06-03 09:48:20 -04:00
softwarefactory-project-zuul[bot]
a0b14b994d
Merge pull request #8763 from wenottingham/licenses-to-kill
Restore UI license checker

27219d3 removed the license checker for UI dependencies as part of removing the UI. We actually still need it, just pointed at the new UI.
This brings it back, and updates it to do so. It also removes no longer needed license files.
It doesn't pass yet, as I haven't added licenses for the new UI dependencies in this PR. Hi @jakemcdermott.

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-06-02 23:48:52 +00:00
softwarefactory-project-zuul[bot]
168c022d3e
Merge pull request #10329 from keithjgrant/6853-select-all-quirks
Clear list selections on pagination/search/sort

SUMMARY
Updates nearly every list* so that URL param changes (pagination, search, or sort) clear the selection. This prevents the list of selected items in state from including items that may no longer appear on screen — preventing the user from accidentally deleting or otherwise altering an item they may not realize they still have selected.
This also updates the useSelected hook to provide selectAll and clearSelected functions. Any lists that weren't yet already using this hook have been updated to do so.
Addresses #6853 and #7509
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

ADDITIONAL INFORMATION
*Lists that do not include this change are modals where the user is expected to paginate through screens and make several selections along the way (e.g. Multi Credential select modal), and lists that still use PaginatedDataList and are yet to be converted to PaginatedTable
Note: I originally wanted to make the clearSelected prop on PaginatedTable required, so any lists that don't have this fix applied would fail loudly. Unfortunately that wasn't possible, as there were a few lists that should not have this behavior, so I had to leave it as an optional prop.

Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-06-02 23:11:41 +00:00
Shane McDonald
5adfacba64
Merge pull request #10321 from kdelee/management_cmd_ee_creds
Create default EE in seperate awx-managment cmd
2021-06-02 18:37:52 -04:00
Shane McDonald
52eeace20f
Register default EEs when booting dev env 2021-06-02 18:19:41 -04:00
Keith J. Grant
21ff1d714d add useSelected tests for new functions 2021-06-02 14:48:53 -07:00
Keith J. Grant
eeca5512be update remaining lists to clear selection on pagination/search/sort 2021-06-02 14:41:20 -07:00
Keith J. Grant
143a4a61b3 clear list selection on navigate (first batch) 2021-06-02 14:41:20 -07:00
softwarefactory-project-zuul[bot]
fef24355ab
Merge pull request #9908 from marshmalien/session-work
Add Session context and redirects

SUMMARY
Issues:
#8272 #9197 #8155 #9311

When user is logged out due to inactivity, redirect to the Login Page with a warning alert stating that their session expired.
When a user logs in on one tab, redirect from login page to home on the other tabs.
Clear session state when it expires and/or when a user logs out.
Redirect users to direct link destination after authentication

@AlexSCorey is looking at possibly rolling #9915 (SSO login redirect override URL is not working) into this PR
ISSUE TYPE


Feature Pull Request

COMPONENT NAME


UI

Reviewed-by: Kersom <None>
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Keith Grant <keithjgrant@gmail.com>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Marliana Lara <marliana.lara@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-02 21:17:47 +00:00
softwarefactory-project-zuul[bot]
d70dfec6b6
Merge pull request #10215 from keithjgrant/9218-sort-in-modal
fix namespaced url params

SUMMARY
Fixes issues when multiple lists are on the page (generally only occurs now when on a list page with an open modal that contains a second list) — Navigating within the modal list currently wipes out URL parameters for the main list, causing the page to reload, which closes the modal. The fix prevents changes to one set of namespaced URL parameters from wiping out URL parameters from another namespace

Refactors query string utils to consolidate a lot of repeated logic from components into a new util, updateQueryString. Use this function to modify query string parameters while maintaining params for multiple namespaces at the same time.
QS utils that are no longer needed have been deleted: replaceParams and encodeNonDefaultQueryString

Addresses #10181 and #9218
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Keith Grant <keithjgrant@gmail.com>
Reviewed-by: John Mitchell <None>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
2021-06-02 21:01:49 +00:00
softwarefactory-project-zuul[bot]
49eccfb19f
Merge pull request #10335 from mabashian/10129-multi-choice-survey
Properly validate multiple choice survey questions

SUMMARY
link #10129
In action:

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Kersom <None>
2021-06-02 20:41:20 +00:00
Shane McDonald
223c5bdaf6
Tweaks to register_default_execution_environments command
- The credential will always be updated. I dont think we want to decrypt the password here for comparison
- Preserve newlines in help text
2021-06-02 16:26:58 -04:00
Elijah DeLee
e740cfcb52 revert change to serializer and use get_or_create
still need to fix up the handling of the verify-ssl bool, since
it is not being respected
2021-06-02 16:16:36 -04:00
softwarefactory-project-zuul[bot]
65b03174ea
Merge pull request #10304 from akus062381/add-ouia-to-yaml-jason-buttons
Adds ouiaId to YAML and JSON buttons in Variables Detail

small change to add a better locator to these buttons. if we do not do this, our locators for our visual tests are not good and will eventually break tests

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-06-02 19:51:31 +00:00
mabashian
134d84ded9 Adds unique ouiaId to MultiButtonToggle 2021-06-02 14:48:37 -04:00
akus062381
5707d65d0f fix 2021-06-02 14:48:10 -04:00
akus062381
9956538224 yay 2021-06-02 14:48:10 -04:00
Elijah DeLee
7818b2008f Allow modifications of managed_by_tower creds
Sysadmins may need to modify managed_by_tower credentials, the
only known case of which is a default container registry credential
for use by the default execution environments, which are also managed_by_tower
and allow modifications.
2021-06-02 13:05:02 -04:00
Elijah DeLee
043aff6a8c Create default EE in seperate awx-managment cmd
Create EE at a seperate time and also attach a registry credential if
auth information provided

This command can be run multiple times on the same instance and should be
idempotent.
2021-06-02 12:23:01 -04:00
softwarefactory-project-zuul[bot]
7725c6f18f
Merge pull request #10305 from jbradberry/resolve-workflow-ee
Include the EE set on a workflow template in the resolver hierarchy

SUMMARY
This step comes immediately after checking the actual job/template for
an explicitly set EE.
Note that now, because of how jobs are spawned off of workflow nodes,
the call to .resolve_execution_environment() no longer happens in
.create_unified_job().  The job instance within .create_unified_job()
doesn't yet have access to the node that it will be attached to,
making it impossible to use this information in the resolver if called
there.
related #9560
ISSUE TYPE


Feature Pull Request
Bugfix Pull Request

COMPONENT NAME

API

AWX VERSION

Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
2021-06-02 16:22:39 +00:00
mabashian
16a3f7c2df Properly validate multiple choice survey questions 2021-06-02 10:38:11 -04:00
softwarefactory-project-zuul[bot]
896d895934
Merge pull request #10326 from chrismeyersfsu/fix-iso_path_sharing
when sharing paths use little z

AWX_ISOLATION_SHOW_PATHS will be shared between containers. Strange
file not found error can crop up when concurrently accessing shared
directories between multiple containers that are bind mounted with big
Z. So make sure we use little z.

Fixes errors like below:
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/bin/git ls-remote file:///opt/tmpawx/at_DrunkMail525450112299457413919634186288881628802211907645041298254_test/ -h refs/heads/HEAD", "msg": "fatal: '/opt/tmpawx/at_DrunkMail525450112299457413919634186288881628802211907645041298254_test/' does not appear to be a git repository\\nfatal: Could not read from remote repository.\\n\\nPlease make sure you have the correct access rights\\nand the repository exists.", "rc": 128, "stderr": "fatal: '/opt/tmpawx/at_DrunkMail525450112299457413919634186288881628802211907645041298254_test/' does not appear to be a git repository\\nfatal: Could not read from remote repository.\\n\\nPlease make sure you have the correct access rights\\nand the repository exists.\\n", "stderr_lines": ["fatal: '/opt/tmpawx/at_DrunkMail525450112299457413919634186288881628802211907645041298254_test/' does not appear to be a git repository", "fatal: Could not read from remote repository.", "", "Please make sure you have the correct access rights", "and the repository exists."], "stdout": "", "stdout_lines": []}```

Reviewed-by: Shane McDonald <me@shanemcd.com>
19.2.0
2021-06-01 19:55:14 +00:00
Chris Meyers
067e6a5163 when sharing paths use little z
* AWX_ISOLATION_SHOW_PATHS will be shared between containers. Strange
file not found error can crop up when concurrently accessing shared
directories between multiple containers that are bind mounted with big
Z. So make sure we use little z.
2021-06-01 15:11:25 -04:00
Marliana Lara
92f567539f
Update .po strings 2021-06-01 14:43:11 -04:00
Marliana Lara
951f6d4636
Redirect user after authenticating through social auth 2021-06-01 13:28:33 -04:00
Marliana Lara
811fa514d2
Remove useMemo from session context 2021-06-01 13:28:33 -04:00
Marliana Lara
a097602d7f
Add Session context and redirect on auth 2021-06-01 13:28:29 -04:00
softwarefactory-project-zuul[bot]
a286324ab7
Merge pull request #10313 from YoungjuWang/patch-1
Update README.md

SUMMARY
Guide for running docker-compose with detached mode
ISSUE TYPE


Docs Pull Request

AWX VERSION

19.1.0

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-06-01 16:16:08 +00:00