30179 Commits

Author SHA1 Message Date
Jeff Bradberry
9e7f004ca6 Add a signal handler to invalidate sessions and tokens for local users
when this setting gets turned on.
2021-05-13 13:55:44 -04:00
Jeff Bradberry
5c664eadf9 Write a thin wrapper around the standard Django auth backend 2021-05-13 13:55:44 -04:00
Jeff Bradberry
26b7e9de40 Add a new setting, DISABLE_LOCAL_AUTH
and expose it in the settings UI.
2021-05-13 13:55:44 -04:00
softwarefactory-project-zuul[bot]
09801d0a9a
Merge pull request #10159 from AlanCoding/inventory_ig
Add instance_group to inventory update serializer

SUMMARY
Inventory updates run remotely, in the execution plane. This adds the instance_group field to the inventory update serializer to help clarify this reality.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

API

Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>
Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-05-13 17:50:45 +00:00
softwarefactory-project-zuul[bot]
a332f46f31
Merge pull request #10171 from jakemcdermott/remove-job-isolated-settings
Remove all AWX_ISOLATED* fields

I believe this should address #10123. The issue mentions a worker-json.js 404 and, while we should fix that at some point, I don't think it's actually related to the save not working.
SUMMARY
I noticed the job settings form wasn't saving on devel.
After some debugging, I found that removing the AWX_ISOLATED_CHECK_INTERVAL and AWX_ISOLATED_LAUNCH_TIMEOUT made the form saveable again.
It doesn't seem like we use any of the AWX_ISOLATED* fields anymore (not to be confused with AWX_ISOLATION* fields, which we do use) so this PR removes them all.
cc @wenottingham @shanemcd @marshmalien  @gamuniz @tiagodread @jbradberry

Reviewed-by: Jeff Bradberry <None>
Reviewed-by: Bill Nottingham <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-13 17:32:15 +00:00
Jake McDermott
6f6d9e2f15
Update dependency update examples
There's no need to make a production build when updating dependencies,
just reiinstall
2021-05-13 13:09:30 -04:00
Jake McDermott
cd7c85490b
Handle and document potential memory limit issues
* Increase node memory limit
* Add note to docs that you may need to increase container memory thresholds
imposed by docker-for-mac and similar tools if you're using them
2021-05-13 12:55:37 -04:00
Jake McDermott
a9ec7038de
Use npm ci as default package installation command
We don't want to generate new package.json and package-lock.json
files unless we're explicitly updating new dependencies.
2021-05-13 12:55:28 -04:00
Jake McDermott
795e3c84fc
Use development container when updating dependencies 2021-05-13 12:55:22 -04:00
softwarefactory-project-zuul[bot]
f2b2e64426
Merge pull request #10190 from jbradberry/fix-precommit-for-macs
Remove the shebang line from pre-commit.sh

SUMMARY

since bash isn't available by default on OS X.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

AWX VERSION



  
    
    

    
    

  


ADDITIONAL INFORMATION

Reviewed-by: Kersom <None>
Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>
2021-05-13 15:24:24 +00:00
Chris Meyers
9b7bc5109a close db and cache connection in new threads 2021-05-13 11:13:26 -04:00
Jeff Bradberry
d07887bd91 Remove the shebang line from pre-commit.sh
since bash isn't available by default on OS X.
2021-05-13 10:49:24 -04:00
softwarefactory-project-zuul[bot]
bb47bdbc43
Merge pull request #10185 from jakemcdermott/fix-10170
Drop the word 'name' from image field, add examples

for #10170
We call this field "Image" in other places, so we want it to match. Also, "Image name" can be confusing because people may think they just need to provide the image name instead of the full image location, which includes registry and tag version.
cc @gamuniz @nixocio @beeankha @tiagodread

Reviewed-by: Kersom <None>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Julen Landa Alustiza <None>
2021-05-13 14:44:38 +00:00
softwarefactory-project-zuul[bot]
d477f04d75
Merge pull request #10175 from AlanCoding/only_have_eyes_for_you
Add more fields to .only since they get referenced

SUMMARY
Fixes a performance bottleneck when saving playbook_on_stats for jobs that use --limit against a small number of hosts while it has a large number in the inventory.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

API

ADDITIONAL INFORMATION
'tis the problem with .only(), that only the developer who wrote the queryset remembers that the other fields cannot be referenced except at the cost of another query
https://github.com/ansible/awx/pull/7352/files

Reviewed-by: Chris Meyers <None>
Reviewed-by: Alan Rominger <arominge@redhat.com>
2021-05-13 14:44:33 +00:00
Alan Rominger
e5f059806b
Add instance_group to inventory update serializer 2021-05-13 09:00:43 -04:00
Alan Rominger
6649b435ce
Fix flake8 error 2021-05-13 08:57:19 -04:00
Alan Rominger
ae320ab228
Do not set openstack env var to blank string 2021-05-13 08:57:19 -04:00
Alan Rominger
29c961e52a
Remove comment 2021-05-13 08:57:19 -04:00
Alan Rominger
fd466c5cff
Finish converting the runner strings 2021-05-13 08:57:19 -04:00
Alan Rominger
623cf0b4cd
Start migrating the /runner path references 2021-05-13 08:57:18 -04:00
Alan Rominger
d33a748eea
Clean up and test patch changing methods 2021-05-13 08:57:18 -04:00
Alan Rominger
1f1cdf8859
start on path helper methods 2021-05-13 08:57:18 -04:00
Alan Rominger
334be9eb25
Use durable switch from container to host path 2021-05-13 08:57:18 -04:00
Alan Rominger
8f9373085a
Fix credential env folder, test_tasks.py 2021-05-13 08:57:18 -04:00
Alan Rominger
11c5d577d6
Fix rel path for other inventories 2021-05-13 08:57:17 -04:00
Alan Rominger
0e17023ba3
Inventory directory already pre-created 2021-05-13 08:57:17 -04:00
Alan Rominger
3c785fbff3
update unit tests to new behavior 2021-05-13 08:57:16 -04:00
Alan Rominger
0061c57577
update inventory injector tests 2021-05-13 08:56:38 -04:00
Alan Rominger
f59da78328
Use inventory and env private_data_dir subfolders
This avoids writing files to the top level
  of the ansible-runner private_data_dir

Inventory is moved to be in the standard "inventory" folder

Credential related files are moved inside of the "env" folder

Also pre-create these folders when preparing for a job run

With this, args is the only top-level file still remaining
2021-05-13 08:56:38 -04:00
softwarefactory-project-zuul[bot]
117bb07f0d
Merge pull request #10187 from jakemcdermott/warn-and-recompile-lint
Warn but still recompile on lint error

Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Keith Grant <keithjgrant@gmail.com>
2021-05-12 21:32:55 +00:00
softwarefactory-project-zuul[bot]
01fdc482be
Merge pull request #10169 from jakemcdermott/fix-10127
Always resolve launching status

SUMMARY
Resolves #10127
Always resolve the launching status after any intermediate async activity that needs to occur while loading prompts, etc.

Reviewed-by: Kersom <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-12 21:31:35 +00:00
softwarefactory-project-zuul[bot]
875abcd31a
Merge pull request #10161 from nixocio/ui_issue_10144
Display error for boolean fields

Display error when modifying Allow Override Branch on Projects.
See: #10144

Reviewed-by: Keith Grant <keithjgrant@gmail.com>
Reviewed-by: Kersom <None>
2021-05-12 21:30:09 +00:00
Jake McDermott
3468153619
Warn but still recompile on lint error 2021-05-12 16:47:49 -04:00
softwarefactory-project-zuul[bot]
27b1d15a7a
Merge pull request #10063 from nixocio/ui_issue_7777_style
Add slider to adjust capacity_adjustment

Add slider to adjust capacity adjustment.
Also add a new custom hook, useDebounce.

See: #7777

Reviewed-by: Kersom <None>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Keith Grant <keithjgrant@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-12 20:17:28 +00:00
Jake McDermott
39ce0ade6d
Update image descriptions, add examples 2021-05-12 16:10:42 -04:00
nixocio
dfb0710d69 Add slider to adjust capacity_adjustment
Add slider to adjust capacity adjustment.

Also add a new custom hook, useDebounce.

See: https://github.com/ansible/awx/issues/7777
2021-05-12 15:42:31 -04:00
nixocio
f6c9621510 Display error for boolean fields
Display error when modifying Allow Override Branch on Projects.

See: https://github.com/ansible/awx/issues/10144
2021-05-12 14:49:16 -04:00
softwarefactory-project-zuul[bot]
7f90a8b2b3
Merge pull request #10183 from beeankha/null_ee_show_error
Show Error if No Execution Environment is Found on Project Sync or Job Run

SUMMARY

Duplicate of PR #10147 fixing issue #10118

Reviewed-by: Jeff Bradberry <None>
Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-05-12 18:47:50 +00:00
mabashian
0d17dfcd87 Pass config request through to subscription edit 2021-05-12 14:47:07 -04:00
mabashian
91134b2537 Remove erroneouos extra param 2021-05-12 14:47:06 -04:00
mabashian
3a56d2447c Adds support for pendo initialization across the app 2021-05-12 14:47:06 -04:00
softwarefactory-project-zuul[bot]
550a66553e
Merge pull request #10113 from AlexSCorey/10045-ProjectListIssues
Adds Job Cancel Button

SUMMARY
This addresses part of #10045 and adds a sync cancel button on the projects list.  It also expands the usage of that button to the Project details page, and the Inventory Source list.  It does this by introducing a new component called JobCancelButton, that basically takes the work of the job cancel button on the Output toolbar and refactors it slightly to make it useable in these other areas.  This button could also be used in the Inventory Source details page once we have websockets hooked up for that view and we can track the status of the sync. (#9013)
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

UI

ADDITIONAL INFORMATION

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Kersom <None>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-12 18:27:06 +00:00
Jake McDermott
7fbe01352f
Drop the word name from image field input
This field is labeled as just "Image" in other places, so we want
it to match. Also, "name" can be confusing because users will think
they just need to provide the image name instead of the full image
location, which includes registry and tag version.
2021-05-12 14:26:18 -04:00
beeankha
3520a6e066 Update fixtures on unit tests 2021-05-12 14:00:04 -04:00
beeankha
19d7f3e346 Update unit tests 2021-05-12 13:56:46 -04:00
softwarefactory-project-zuul[bot]
71f9476a51
Merge pull request #9759 from ghjm/idempotence_is_a_thing
Make tower_license module idempotent

SUMMARY
Currently, the tower_license module always installs a license, without checking if Tower is already licensed.  In general, Ansible modules are supposed to be idempotent.  This PR updates the module to check whether Tower is already licensed, and do nothing in that case.  A new parameter force is provided so the user can always install the license, or override an existing license with a new one.
ISSUE TYPE
Bughancement
COMPONENT NAME
awx_collection
AWX VERSION
awx: 18.0.0
(but really Tower 3.8.2)

Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Graham Mainwaring <graham@mhn.org>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
2021-05-12 17:44:47 +00:00
Tiago
ffcf76ddd0 update ouiaId 2021-05-12 14:41:10 -03:00
softwarefactory-project-zuul[bot]
d36babf506
Merge pull request #10145 from nixocio/ui_issue_8788
Allow modify scm branch override

Source Control Branch was not being displayed as part of the
JobTemplate Edit, since the project did not have the variable
allow_override as part of the summary_fields.


Add source control details for JobDetail and WorkflowJobTemplateDetail


See: #8788

Reviewed-by: Kersom <None>
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Mat Wilson <mawilson@redhat.com>
2021-05-12 17:37:14 +00:00
softwarefactory-project-zuul[bot]
a73cb0280c
Merge pull request #10184 from jbradberry/explicit-pre-commit-script
Break out the pre-commit hook into an explicit script

SUMMARY

This means that

we don't have to be always updating the underlying .git/hooks/pre-commit file
updates to the logic will just work automatically
the logic of the conditional invocation of black has been fixed so that AWX_IGNORE_BLACK=1 should work correctly now


ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

AWX VERSION



  
    
    

    
    

  


ADDITIONAL INFORMATION

Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>
Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Jeff Bradberry <None>
2021-05-12 16:37:27 +00:00
Jeff Bradberry
1e5a0dc7c5 Break out the pre-commit hook into an explicit script
This means that

- we don't have to be always updating the underlying .git/hooks/pre-commit file
- updates to the logic will just work automatically
- the logic of the black logic has been fixed so that AWX_IGNORE_BLACK=1 should work right now
2021-05-12 11:54:17 -04:00